Skip to content

Instantly share code, notes, and snippets.

@hasokeric
Created April 9, 2018 16:48
Show Gist options
  • Save hasokeric/fa6695bbfea16865d78c00707d7d5557 to your computer and use it in GitHub Desktop.
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

pmalicki11 commented Jul 28, 2020

Do you have a list of possible ExtendedProperties? I'm trying to make some fields Required. I have tried "Required" and "Req" without a success.

edvHDCase.dataView.Table.Columns["OppValue_c"].ExtendedProperties["Req"] = true;

Maybe the reason is that the field is ud field.

@hasokeric
Copy link
Author

// List off Possible Extended Props
                case "INVALIDATED":
                case "ALLOWATTACHMENT":
                case "ISATTACHMENTTABLE":
                case "EXTERNAL":
                case "HIDEFOREIGN":
                case "ISHIDDEN":
                case "READONLY":
                case "SECURED":
                case "SUPPRESSCONTEXTMAINT":
                case "SUPPRESSCONTEXTSEARCH":
                case "SYSTEMCOLUMN":
                case "INDEXED":
                case "DELIMITERCHECK":
                case "ISCURRENCY":
                    return "False";
 
                case "ENABLED":
                    return "True";
 
                case "ATTACHMENTTABLENAME":
                case "BINDINGCOLUMNS":
                case "PARENTTABLENAME":
                case "BASEFORM":
                case "BASESEARCH":
                case "BIZTYPE":
                case "CUSTOMCONTEXT":
                case "EMAILCOLUMN":
                case "FORMAT":
                case "LIKE":
                case "PARTDESC":
                case "PARTNUM":
                case "TOOLTIP":

@hasokeric
Copy link
Author

However I think the Mandatory is determined by Row Rules... I think you can add a

SettingStyle.Mandatory which is then Registered as Mandatory by the Rule Engine

@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