Hi Expert,
I created a new field which has several options (A,B,C,D) in the customer table.
If option is A then, change the salesperson code from x to y.
"Account Type" := Customer."Account Type";
If "Account Type" := "Account Type":: A Then
xxxxx
The salesperson code has changed, but it also change the type which is B,C,D.
Please advise! Thank you
Hi, because of the limited information you have given, we may not be able to give the correct answer.
From your code, this code can be placed in the OnValidate (Field) Trigger of "Account Type" field, please make sure it is in the right place.
Hope this helps as well.
Thanks.
ZHU
No, it does not work even though the line was removed. Thank you!
Hi,
Please remove the below marked line from your code.
"Account Type" := Customer."Account Type";
If "Account Type" := "Account Type":: A Then
xxxxx
Hi, please delete first line, "Account Type" := Customer."Account Type";
And try the following.
If Rec."Account Type" := Rec."Account Type":: A Then
xxxxx
Hope this helps.
Thanks.
ZHU
Then you have to put the code in the OnValidate trigger of your account type field.
Sohail Ahmed
754
YUN ZHU
698
Super User 2025 Season 1
Mansi Soni
529