Hello,
I have a process where i import one Sales Order from SalesForce to table Sales Header.
After the importation, it is possible to Update the Gen. Bus. Posting Group depending of the location?
For Example
IF "Sales Header"."Location Code"='MAI-AM' THEN
"Sales Header"."Gen. Bus. Posting Group"='AMOSTRAS'
"Sales Header".Modify;
I tried to use this code on the table, but when i send the sales order from Sales Force to NAV it says an error where it sayd the Document Header No. does not exist.
Should this code been written in the table or ?!
Thanks for the help
Just a note
I Have this code in the XML Port
<Sales Line> - Import::OnAfterModifyRecord()
//"<Sales Line>".VALIDATE("<Sales Line>"."No.");
IF TipoOper='DELETE' THEN
BEGIN
"<Sales Line>".DELETE(TRUE);
END
ELSE
location.GET("<Sales Line>"."Location Code");
IF location.Amostras THEN
"<Sales Line>".VALIDATE(Oferta,"<Sales Line>".Oferta::Amostra);
"<Sales Line>".MODIFY;
"<Sales Line>".AutoReserve;
Can i from here update Sales Header?
Answers
Let us know if it works.
Regards
Ratnesh
Thanks for the help
Wrote this code in Sales Header - Import::OnAfterInsertRecord() and it worked just fine!