Skip to main content
Solved

REST API: how do I set Subaccount on a Sales Order Details line?

  • September 20, 2024
  • 2 replies
  • 64 views

Forum|alt.badge.img+2

I use $expand to examine an existing Sales Order:

https://sandbox.com/entity/Default/22.200.001/SalesOrder/WB/WB00162584?$expand=FinancialSettings,BillToContact,BillToAddress,ShippingSettings,ShipToAddress,ShipToContact,Details,Totals

However, the Details JSON doesn’t include Subaccount.  Do I need to expand something else to see it?  I want to be able to create another details line and include the Subaccount but I’m not sure what to use.

Best answer by hdussa

Hello @bpgraves ,

 

It appears to be the Endpoint does not expose the “SubID” field. You will need to customize [extend] the SalesOrder endpoint and add the SubID.

View original
Did this topic help you find an answer to your question?

2 replies

hdussa
Jr Varsity I
Forum|alt.badge.img
  • Jr Varsity I
  • 99 replies
  • Answer
  • September 24, 2024

Hello @bpgraves ,

 

It appears to be the Endpoint does not expose the “SubID” field. You will need to customize [extend] the SalesOrder endpoint and add the SubID.


Forum|alt.badge.img+2
  • Author
  • Semi-Pro I
  • 66 replies
  • October 2, 2024
hdussa wrote:

Hello @bpgraves ,

 

It appears to be the Endpoint does not expose the “SubID” field. You will need to customize [extend] the SalesOrder endpoint and add the SubID.

After I extended the SalesOrder endpoint, I added the Subaccount (not SubID) field to the Details (SalesOrderDetail[]) and then I was able to set the Subaccount for each Details line in the SalesOrder.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings