Can anybody tell why this is not working - No Error (Using this via Web service) - Ship to option already custom
UpdateShipAddress(InSONo : Text[30];InShipName : Text[30];InShipAddress1 : Text[30];InShipAddress2 : Text[30];InShipCity : Text[30];InShipCounty : Text[30];InShipPostcode : Text[30])
Order.SETFILTER("No.",InSONo);
Order.FINDFIRST;
Order."Ship-to Code" := '';
Order."Ship-to Name" :=InShipName;
Order."Ship-to Address" :=InShipAddress1;
Order."Ship-to Address 2" :=InShipAddress2;
Order."Ship-to City" :=InShipCity;
Order."Ship-to County" :=InShipCounty;
Order."Ship-to Post Code" :=InShipPostcode;
Order.MODIFY;
*This post is locked for comments
Hi Kimo,
I changed the code in the sales header page to set to shipto option to alternative address
42 Sales order -added code set custom address on below methods
OnAfterGetRecord()/OnNewRecord(BelowxRec : Boolean)/ OnInsertRecord(BelowxRec : Boolean) : Boolean/Sell-to Customer Name - OnValidate()
ShipToOptions:=ShipToOptions::"Custom Address";
and added function to update address as below
UpdateShipAddress(InSONo : Text[30];InShipName : Text[30];InShipAddress1 : Text[30];InShipAddress2 : Text[30];InShipCity : Text[30];InShipCounty : Text[30];InShipPostcode : Text[30])
Order.SETFILTER("No.",InSONo);
Order.FINDFIRST;
Order."Ship-to Code" := '';
Order."Ship-to Name" :=InShipName;
Order."Ship-to Address" :=InShipAddress1;
Order."Ship-to Address 2" :=InShipAddress2;
Order."Ship-to City" :=InShipCity;
Order."Ship-to County" :=InShipCounty;
Order."Ship-to Post Code" :=InShipPostcode;
Order.MODIFY;
didnt find any other better solutions. this works for me
Hi Charith, How did you set the ship to option to 'custom' via web service? I tried to use C# to set salesOrder.shippingOptions = "custom address", but it doesn't work.
Hi Amol,
ERRRRR.....Its working fine, Nav service needed a restart....!!!!!
Sorrry for the trouble
Hi Amol,
There is no error at all, It just not chaning the field values. Im wondering code is wrong eventhough it dosnt show any compile errors.
What is the error it is giving ? Kindly provide more information for error you are getting.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156