Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Add your SAP Business ByDesign scripting language implementation for:
- Business Object: Opportunity
- Node: Root
- Validation: OnSave
- Script file signature
- ----------------------------
- Returns: Boolean
- Note:
- - To access the elements of the business object node,
- use path expressions, for example, this.<element name>.
- - To use code completion, press CTRL+J.
- - The solution uses this script before an instance of the business object is saved to the data base.
- It can have a return value of either true or false, which determines whether the instance of the business object is saved or not.
- All fields in this business object are read-only and cannot be changed.
- */
- import ABSL;
- var result = this.allowSave;
- if(result == false) { //Check if there is an error and then show a message, it must show a message.
- //If not it will show by default the message: "Save rejected by validation (Solution aaaaaa, Business Object Opportunity, Node Root)"
- raise GenericMessage.Create("E", "Por favor, verifique as mensagens de erro."); //Generic message
- //See: https://blogs.sap.com/2016/08/04/problem-with-new-feature-mandatory-error-message-for-onsave-validation/
- }
- return result;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement