cancel
Showing results for 
Search instead for 
Did you mean: 

validate fields ByDesign

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

rohanarthur
Participant
0 Kudos

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

rohanarthur
Participant

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

Answers (0)