Can I force REQUIRED for only CREATE/ENTER NEW, and not EDIT? If I tick Required on the attribute, it applies to both creating and updating, but I need these attributes to only be required when creating a new record. The attributes in question is set in creating new objects through reference BOs and rules, and will not be edited in the editing form. But if ticked as required, the editing form can not be saved.
Can I write somthing in my ENTER NEW process rules to make these attributes required when new object is created, intstead of ticking the required checkbox for the attribute?
REQIRED only if CREATE/ENTER NEW, not on EDIT?
-
- Posts: 1462
- Joined: Tue Jan 24, 2017 5:51 am
- Location: 'Stralya
Re: REQIRED only if CREATE/ENTER NEW, not on EDIT?
Code: Select all
IF BO IS NEW AND BO.Attribute IS UNDEFINED THEN REPORT ERROR 'Attribute must have a value'
Re: REQIRED only if CREATE/ENTER NEW, not on EDIT?
Also take a look at the presentation rules which may be used for scenarios like this. Another thing I have done in the past is, I set all attributes to non required BUT I place a red asterix in the label name and then I use regular rules to control, report error etc. for those "required" (label) attributes.
Henrik (V8 Developer Ed. - Windows)
Re: REQIRED only if CREATE/ENTER NEW, not on EDIT?
Thank you both!
I am now testing PointsWells suggestion, combined with an asterix (not red yet, though) in the label name. Will also take a look at the presentation rules, thanks for the tip!
I am now testing PointsWells suggestion, combined with an asterix (not red yet, though) in the label name. Will also take a look at the presentation rules, thanks for the tip!