on 06-21-2017 12:28 PM
Hello,
As my pictures show:
I set custom BO filed mandatory(without ABSL check) and it did not work
Attention please!It's a Custom BO so I can't "edit layout" in H5 or SL to set mandatory attribute.
If I must to add extra checks using ABSL like the blog:https://archive.sap.com/discussions/thread/3608195 ?????
In UI designer mandatory property is for marking field with red star (as you attached in picetures).
If you want make field mandatory and prohibit save action, you have at least two possibilities:
1. possibility:
in BO define corresponding field as AlternativeKey if necesary
[AlternativeKey] AgreementDate : Date;
or
2. possibility:
in BO define flag:
[Transient] element MandatoryFieldsSet:Indicator;
in "Event - AfterModify" script:
this.GetFirst().MandatoryFieldsSet= true;
if (this.GetFirst().AgreementDate==""){
this.GetFirst().MandatoryFieldsSet= false;
}
in "Validation - OnSave" script:
return this.GetFirst().MandatoryFieldsSet;
Please use following code snippet and mark this answer correct if you accept this 🙂
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Zoran,
As you say,it just mark the field as mandatory and we need to use extra absl to implement the mandatory check.
Btw,I reported an incident and received the following answer:
“Question:If this function mentioned can be supported in 1705.
Answer:=> No it cannot be supported as for custom logic to replicate there should be some script files and current frame work does not support without creating validation script files. Its not possible in the current or future releases. ”
Thanks very much for your reply!
Hello Baoxiang,
The setting in the UI Designer is just for the visibility -> show a red star.
To have a real check you need some ABSL coding in the validation for the rep. node.
Or define it as an AlternativeKey (if it is really one) like Zoran mentioned above. In this case the check (incl. a uniqueness check) is done by the system.
HTH,
. Horst
User | Count |
---|---|
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.