Hi guys i create a rule wizard to enable the warehouse field when make direct is true i did the custome code below but is not working please advise thanks.
private static void CreateRowRuleOrderRelMakeEquals_true()
{
// Description: CreateFieldRuleMakeEqual_true
// **** begin autogenerated code ****
RuleAction[] ruleActions = new RuleAction[0];
// Create RowRule and add to the EpiDataView.
// Dummy Context Object
object contextObject = null;
RowRule rrCreateRowRuleOrderRelMakeEquals_true = new RowRule(“OrderRel.Make”, RuleCondition.Equals, true, new RowRuleActionDelegate2(Script.OrderRelMakeEqualstrue_CustomRuleAction), contextObject);
((EpiDataView)(Script.oTrans.EpiDataViews[“OrderRel”])).AddRowRule(rrCreateRowRuleOrderRelMakeEquals_true);
// **** end autogenerated code ****
}
Right but it is being set as disabled by the ExtendedProperties on that business object,
However what you are trying to do appears violates the constraints of the business object, you “can’t” (read really shouldn’t) do that…
May I ask why do you need this field if its Make Direct?
“Sales Need it” is generally a REALLY bad way to handle system modifications. It is highly recommended that “Sales Needed” be turned into a more explicit explanation of why / how / when etc. Modifying the core behavior of ANY system just because “Sales Said So” or “X said so” can lead to corrupted data, broken workflows and just general instability in the system.
I recommend that you go to Sales and figure out exactly what the reason is for needing this field, for example if they need to display it somewhere (a report) there are ways you can do that without compromising the system integrity and core functionality.
Outside of that, the reason you don’t find where it is disabled is because that behavior is part of the “CORE” business logic of Epicor. There are ways to get around it and we might be able to help you with that. But in order to avoid “I shot myself in the foot syndrome” you should figure out what the business need is they are trying to meet, and then see if there are other ways to do what they need.
jose you are not my consultant if you don have a solution just say it but don’t advise me that i cannot give you details about why this is need it because is a business information that is not of you interest. thanks for the information that it cannot be done but there is no need to be mean you were the one who was gossip i just answer with what i can say. Next time think before answer because there is no need to be mean.
Alex
I wasn’t being mean I was just trying to make a point that changing core functionality without knowing the reason behind is a bad idea. Sorry if you thought I was being mean, I was trying to help you understand my point.
Either way, what you are trying to do can be done but you’ll have to modify the Extended Properties in the EpiDataView.
I will gladly show you how, I was just making sure you knew / understood the reasons / risks behind such a modification.
I do know the reasons why we are doing it but i cannot tell you. We just want to know if it could be done. I thought that make a rule wizard will change the Extended Properties
Alex, Jose makes a good point though. the customizations you are taking about here are dangerous and could cause all kinds of problems in the system if you try to do it the way you are suggesting. A better option is to use a UD field to enter the Warehouse into that field then display and push that UD field data to the place that sales needs…
No worries, water under the bridge. I would use a UD field. I tried finding a work around but even if we manage to enable it. Epicor clears it on the back end