Hello everyone!
On the form of the Price List Item entity, I want to create a business rule to show/hide a field based one the Unit lookup:
However, (along with other fields) the Unit field is not listed within the field selector on the Business Rule:
Is there a reason to this or perhaps something that I am not doing? Can I surface the unit field?
Looking forward to your ideas!
Hi fran2105,
This is by design and there is no way to make it show in the business rule.
As a workaround, you could create a event on the Product List Item form with the following code:
function formOnChange(executionContext){ var formContext = executionContext.getFormContext(); var unitName = formContext.getAttribute("uomid").getValue()[0].name; if(unitName != null && unitName == "yourvalue"){ formContext.getControl("yourfieldname").setVisible(false); }else{ formContext.getControl("yourfieldname").setVisible(true); } }