Change Area Code

Hi pips i have this scenario:When you change the Area Code on the Salespeople/Purchaser Card, All Customers with Account Types O1* and O2* linked to that Salespeople Code must change to other Salespeople which belongs to the previous Area Code. A message must be populated asking Which Salesperson Code Do you want to change these Customers to? A Dropdown field is needed to show all the Salesperson Code belongs to the previous Area Code. Write a report showing all the Customers that were changed and the changes must be populated on the “Change Log Entry” .

Can i do this in a processing report or on the OnValidate of the Area Code? if its possible on the processing report can somebody please help by a code,because i’m starting this on the OnVaildate field.

Thanks in advance!!

I think you can:

  • use a form for the user to choose the new Salesperson assigned
  • when selected, change all the Customers from a Salesperson to the other and mark them using MARK function
  • use the MARKEDONLY function for the record var only to contain the Customers changed
  • call a Customers report with the customer’s record var as parameter


Thanks i’ve used this code:

IF “Area Code” <> xRec.“Area Code” THEN
rAccTypes.SETRANGE(rAccTypes.“Field Officer Code”,Code);
rAccTypes.SETRANGE(rAccTypes.“Account Type Dimension”,‘O1*’,‘O2*’);
rAccTypes.VALIDATE(rAccTypes.“Field Officer Code”,“Replacement FO”);

So where can i used the MARKEDONLY function?