on 08-09-2018 4:58 PM
good day experts
can you help me with an example of validating data, I have the following problem and I do not know how to start solving it
On the sales order screen, when selecting a customer in the Name field, typing a number in the External reference field requires that it is NOT possible to duplicate the number each time a sales order is generated.
If the user when entering a repeated external reference number of the same company, the system will indicate an error message
The validation must be per client, two different clients IF they can have the same external reference number.
This process would avoid duplications by users when typing an external referen
Hi Jairo,
You would need to extend the business object "SalesOrder", and include the check in "Validation-OnSave" ABSL coding.
I imagine, your code would look like this:
- query for all orders using "BuyerID" as the selection parameter
- if any records are returned, loop through them to see if the customer matches
- if a positive match is found, raise an error message
this will prevent the saving of the sales order.
Regards,
Rohan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry! You can add both selection parameters on the query itself.
- query for all orders using "BuyerID" and "PartyBuyerPartyKey.PartyID" as selection parameters
- if a positive match is found, raise an error message
Regards,
Rohan
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.