Hello I am using a report to effect the change of customer number often.
For Example;
OldCustomerNumber to be 'xx'
NewCustomerNo to Be 'yy'
However am getting an error: Customer Does not Exist. Identification Fields and Values: No.='yy'
The error is popping up when the Modify function is triggered under modify customer number section. The same code is working out perfectly for all other customer related tables.
Anyone with a better idea of doing this?
Here is the code,
Customer - OnAfterGetRecord()
Customer."Old Customer Code":=Customer."No.";
Customer.MODIFY;
OldCustomerNo:=Customer."Old Customer Code";
NewCustomerNo:=Customer."New Customer No";
//Modify Customer No:
Cust.SETCURRENTKEY(Cust."Old Customer No");
Cust.GET(OldCustomerNo);
Cust.VALIDATE(Cust."No.",NewCustomerNo);
Cust.MODIFY;
*This post is locked for comments
I have the same question (0)