Hi,
I am trying to create a client via code in a Sandbox environment.
Here is the code I am using :
CustomerRec.Init;
SalesReceivablesSetup.GET();
CustomerRec."No." := NoSeriesMgt.GetNextNo(SalesReceivablesSetup."Customer Nos.", WorkDate(), true);
CustomerRec.Name := 'XXX';
CustomerRec."Gen. Bus. Posting Group" := format('BINNENLAND');
if CustomerRec.Insert() then begin
exit(true)
end else begin
Message('Une erreur est survenue lors de la création du client!');
exit(false);
end;
When inserting, I get the following error: "Gen. Bus. Posting Group" empty


Do you have any idea where the error could come from?
Thanks