Skip to content

Instantly share code, notes, and snippets.

@hasokeric
Created April 9, 2018 16:48
Show Gist options
  • Select an option

  • Save hasokeric/fa6695bbfea16865d78c00707d7d5557 to your computer and use it in GitHub Desktop.

Select an option

Save hasokeric/fa6695bbfea16865d78c00707d7d5557 to your computer and use it in GitHub Desktop.
Epicor Manual Extended Properties - OLD Example
private void SetExtendedProperties()
{
// Begin Wizard Added EpiDataView Initialization
EpiDataView edvUDCodes = ((EpiDataView)(this.oTrans.EpiDataViews["UDCodes"]));
// End Wizard Added EpiDataView Initialization
// Begin Wizard Added Conditional Block
if (edvUDCodes.dataView.Table.Columns.Contains("Number01"))
{
// Begin Wizard Added ExtendedProperty Settings: edvUDCodes-Number01
edvUDCodes.dataView.Table.Columns["Number01"].ExtendedProperties["Format"] = "->>>9";
edvUDCodes.dataView.Table.Columns["Number01"].ExtendedProperties["MaskInput"] = "-nnn";
numReportStyleNum.MinValue = 0;
numReportStyleNum.MaxValue = 99999;
numReportStyleNum.MaskInput = "nnnnnn";
// End Wizard Added ExtendedProperty Settings: edvUDCodes-Number01
}
// End Wizard Added Conditional Block
}
@pmalicki11
Copy link

Function below works for me. Thakns for help.

private void setMandatoryFields()
{
	RuleAction[] ruleActions = new RuleAction[]
	{
		RuleAction.AddControlSettings(this.oTrans, "HDCase.OppValue_c", SettingStyle.Mandatory),
		RuleAction.AddControlSettings(this.oTrans, "HDCase.ECloseDate_c", SettingStyle.Mandatory),
		RuleAction.AddControlSettings(this.oTrans, "HDCase.EQuoteDate_c", SettingStyle.Mandatory),
		RuleAction.AddControlSettings(this.oTrans, "HDCase.ESampleDate_c", SettingStyle.Mandatory),
		RuleAction.AddControlSettings(this.oTrans, "HDCase.EValidationDate_c", SettingStyle.Mandatory),
		RuleAction.AddControlSettings(this.oTrans, "HDCase.ESerialProdDate_c", SettingStyle.Mandatory)
	};
	RowRule rule = new RowRule("HDCase.HDCaseNum", RuleCondition.Equals, "HDCaseNum", ruleActions);
	((EpiDataView)(this.oTrans.EpiDataViews["HDCase"])).AddRowRule(rule);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment