I am creating a Transfer Order in the Sales Order screen from an Action button on the Appointment screen.
After the Transfer Order is created, I need to override the Shipping Address (SOShippingAddress) with the address values from the Service Order Address.
However, the Shipping Address is not getting overridden, and the values are not updated in the Sales Order. Only overrdie check box is checked other fields not updating.
Below is the code I am currently using:
oGraph.Shipping_Address.Current = soGraph.Shipping_Address.Select();
soGraph.Shipping_Address.Current.IsDefaultAddress = true;
soGraph.Shipping_Address.Current.OverrideAddress = true;
soGraph.Shipping_Address.Current.AddressLine1 = Base.ServiceOrder_Address.Current.AddressLine1;
soGraph.Shipping_Address.Current.AddressLine2 = Base.ServiceOrder_Address.Current.AddressLine2;
soGraph.Shipping_Address.Current.City = Base.ServiceOrder_Address.Current.City;
soGraph.Shipping_Address.Current.State = Base.ServiceOrder_Address.Current.State;
soGraph.Shipping_Address.Current.CountryID = Base.ServiceOrder_Address.Current.CountryID;
soGraph.Shipping_Address.Current.PostalCode = Base.ServiceOrder_Address.Current.PostalCode;
soGraph.Shipping_Address.Cache.Update(soGraph.Shipping_Address.Current);I also attempted using SetValueExt for the address fields and setting OverrideAddress = true, but still no luck
Could anyone please guide me on the correct way to override the Shipping Address when creating a Transfer Order programmatically from the Appointment screen?