Hello Epiusers!
Background:
After lurking for awhile I’ve managed to create a successful connection to my company and create and order header. Its very basic but it works! My next objective is to connect to the second company and inject an order header there instead. This is where my issue arises: CompanyB seems to require different fields for REST order creation.
Responses:
I have attempted to add to the post fields new fields based on the error messages returned. For example I received this response from the server and so I added “RateGrpCode”: “MAIN”:
BadRequest REST API Exception Site references invalid value. Rate Type Code references invalid value. Ice.Common.BusinessObjectException Site references invalid value. Rate Type Code references invalid value. Error OrderHed
Epicor.RESTApi.dll ThrowUpdateExtException 17 40
^this also caused me to add “Plant” and “ShipViaCode”.
And I continued to add more fields one at a time hoping to “complete” all the stealth “required” fields. I am stuck at this next response. I have been unable to identify the single field that could be assigned to meet the requirement:
BadRequest REST API Exception A valid Currency Rate Group is required. Ice.Common.BusinessObjectException A valid Currency Rate Group is required. Error OrderHed
Epicor.RESTApi.dll ThrowUpdateExtException 17 40
^I consider the possibility that it is referencing a table not a field… in which case I am unsure how to format the required input.
Searching:
I attempted to find the required fields in several places besides just checking the response codes and digging through fields. The ZData field looked promising in BAQ but I ended up just seeing the small list of required fields I working had for the main companies post fields. I have also searched the entire internet for an answer.
Questions:
Is there a better way for me to find the required fields for companyB?
Could this be some administrative setting I am unaware of?
Where is the Currency Rate Group located? If it is a table and not a field, how do I the data in post?
=========Additional Info==========
Rest call is to Erp.BO.SalesOrderSvc/SalesOrders
This is my working postfields for the main company:
CURLOPT_POSTFIELDS => ‘{
“CustNum”: 100,
“PONum”: “3003”,
“CurrencyCode”: “BASE”,
“TermsCode”: “30RW”}’
This is my incomplete postfields for company B:
CURLOPT_POSTFIELDS => ‘{
“Company”: “25556B”,
“CustNum”: 3,
“PONum”: “3001”,
“ShipViaCode”: “”,
“Plant”: “MfgSys”,
“RateGrpCode”: “MAIN”,
“CurrencyCode”: “BASE”,
“TermsCode”: “30RW”}’
Thank you for any guidance.