Customization Exception ParseRuleActionCodeLine

I am customizing a dashboard and I got this error after adding some row rules.

Length cannot be less than zero. The Row rules work, but everytime I go into the customization screen, I get this Error.

image

Yep that’s a standard “feature” - I have multiple row rules on 1 dashboard, I have to click through that message 12 times…! It’s not causing any harm, just a tad annoying.

With what Epicor has already shown on Kinetic, I guess in vNext or the version after that we might be designing in an all together different way anyhow. :slight_smile:

1 Like

Sorry to drag up an old thread. What the parser is looking for is a style that’s in the form like SettingStyle.Warning.

What I did was wrap the custom settings in a class, so when I use it like RowRuleSettings.Style I don’t get those annoying popups.

public class MockRuleSettings
{
	public ControlSettings Style { get { return _style;} }
		
	private ControlSettings _style;
	
	public MockRuleSettings(ControlSettings controlSettings)
	{
		_style= controlSettings;
	}
}

Then in my Row Rule definition I use it like this:

	private void CreateRowRuleOrderDtlShortChar07Equals_B()
	{
		// Description: NonStock
		ControlSettings myCustomSetting = new ControlSettings();
		myCustomSetting.BackColor=System.Drawing.Color.Blue;
		myCustomSetting.ForeColor=System.Drawing.Color.White;
		MockRuleSettings RowRuleSettings = new MockRuleSettings(myCustomSetting);
		// **** begin autogenerated code ****
		RuleAction warningOrderDtl_RowAction = RuleAction.AddRowSettings(this.oTrans, "OrderDtl", true, RowRuleSettings.Style);
		RuleAction[] ruleActions = new RuleAction[] {
				warningOrderDtl_RowAction};
		// Create RowRule and add to the EpiDataView.
		RowRule rrCreateRowRuleOrderDtlShortChar07Equals_B = new RowRule("OrderDtl.ShortChar07", RuleCondition.Equals, "B", ruleActions);
		((EpiDataView)(this.oTrans.EpiDataViews["OrderDtl"])).AddRowRule(rrCreateRowRuleOrderDtlShortChar07Equals_B);
		// **** end autogenerated code ****
	}

The annoying box is gone now.

5 Likes

Excellent work @Doug.C - it’s been an annoyance for a long time!

@TobyLai - having tested this I can confirm it works, you could consider awarding Doug the credit for answering :slight_smile:

Ugh, I fixed mine but they are still there!

Missed one…
Avoid The Office GIF