plz me help me out

plz help me out…

Requirement is to restict the user not to enter the credit limit more than a threshold values defined in the customer parameters ?


you will have to add the code into validateField() method of the CustTable, where you would verify if the value entered in customer table is smaller then the general value in customer module parameters:

// code should be put somewhere after the call of super()

if (CustTable.CreditMax > CustParameters::find().CreditLimit)

ret = checkFailed(“Individual credit limit cannot exceed the limit set in customer parameters!”);

KEEP IN MIND, I haven’t checked the actual field names in AX and simply wrote this code fragment out of the blue assuming that my guess about the field names is correct.