Ben Warren
03/22/2023, 11:22 PMcostEstimate
field on the subrecords within the SalesOrderItemList
sublist of SalesOrder
. Here’s the error message:
type=\"ERROR\"><platformCore:code>INSUFFICIENT_PERMISSION</platformCore:code><platformCore:message>You do not have permissions to set a value for element item.costestimate due to one of the following reasons: 1) The field is read-only; 2) An associated feature is disabled; 3) The field is available either when a record is created or updated, but not in both cases.</platformCore:message><
and here’s my SOAP message:
<record externalId=\"lkj209lkjasjkmnsb\" xsi:type=\"tranSales:SalesOrder\">
<tranSales:entity internalId=\"3\"/>
<tranSales:itemList replaceAll=\"true\">
<tranSales:item>
<tranSales:amount>50</tranSales:amount>
<tranSales:costEstimate>47.5</tranSales:costEstimate>
<tranSales:costEstimateType value=\"_custom\"></tranSales:costEstimateType>
<tranSales:item internalId=\"225\"/>
<tranSales:poRate>47.5</tranSales:poRate>
<tranSales:quantity>1</tranSales:quantity>
<tranSales:rate>50.000000</tranSales:rate>
</tranSales:item>
<tranSales:item>
<tranSales:amount>50</tranSales:amount>
<tranSales:costEstimate>48.5</tranSales:costEstimate>
<tranSales:costEstimateType value=\"_custom\"></tranSales:costEstimateType>
<tranSales:item internalId=\"225\"/>
<tranSales:poRate>48.5</tranSales:poRate>
<tranSales:quantity>1</tranSales:quantity>
<tranSales:rate>50.000000</tranSales:rate>
</tranSales:item>
</tranSales:itemList>
<tranSales:tranDate>2023-01-25T00:00:00+00:00</tranSales:tranDate>
</record>
any suggestions on what might be wrong?
note: I’m able to create/update/upsert this record if I exclude the costEstimate
field. I’m also able to upsert the whole record via the REST API, but I’d like to do it via SOAP to take advantage of batching.battk
03/22/2023, 11:47 PMbattk
03/22/2023, 11:47 PMBen Warren
03/22/2023, 11:48 PMBen Warren
03/22/2023, 11:49 PMcostEstimate
field is what’s giving me trouble unfortunatelybattk
03/22/2023, 11:49 PMBen Warren
03/22/2023, 11:50 PMBen Warren
03/22/2023, 11:51 PMWSDL_v2021_1_0
battk
03/22/2023, 11:52 PMbattk
03/22/2023, 11:52 PMBen Warren
03/22/2023, 11:55 PM<tranSales:costEstimateType>_custom</tranSales:costEstimateType>
i get an error. but when i make an upsert call like this:
<tranSales:costEstimateType value=\"_custom\"></tranSales:costEstimateType>
it works and sets the costEstimateTypeBen Warren
03/22/2023, 11:56 PMbattk
03/23/2023, 12:02 AM<tranSales:costEstimateType value=\"_custom\"></tranSales:costEstimateType>
should not set the cost estimate type at all, you might want to try setting it to other valid values to make surebattk
03/23/2023, 12:12 AMbattk
03/23/2023, 12:12 AMbattk
03/23/2023, 12:12 AMbattk
03/23/2023, 12:12 AMBen Warren
03/23/2023, 12:43 AM<record externalId=\"lkj209lkjasjkmnsb\" xsi:type=\"tranSales:SalesOrder\">
<tranSales:entity internalId=\"3\"/>
<tranSales:itemList replaceAll=\"true\">
<tranSales:item>
<tranSales:amount>50</tranSales:amount>
<tranSales:costEstimate>47.5</tranSales:costEstimate>
<tranSales:costEstimateType xsi:type=\"xsd:string\">_custom</tranSales:costEstimateType>
<tranSales:item internalId=\"225\"/>
<tranSales:poRate>47.5</tranSales:poRate>
<tranSales:quantity>1</tranSales:quantity>
<tranSales:rate>50.000000</tranSales:rate>
</tranSales:item>
<tranSales:item>
<tranSales:amount>50</tranSales:amount>
<tranSales:costEstimate>48.5</tranSales:costEstimate>
<tranSales:costEstimateType xsi:type=\"xsd:string\">_custom</tranSales:costEstimateType>
<tranSales:item internalId=\"225\"/>
<tranSales:poRate>48.5</tranSales:poRate>
<tranSales:quantity>1</tranSales:quantity>
<tranSales:rate>50.000000</tranSales:rate>
</tranSales:item>
</tranSales:itemList>
<tranSales:tranDate>2023-01-25T00:00:00+00:00</tranSales:tranDate>
</record>
Ben Warren
03/23/2023, 12:44 AMcostEstimateType
field. going to look into cleaning up my XML generation. I really appreciate your help in locating the issue 🙏Ben Warren
03/23/2023, 12:44 AM<tranSales:costEstimateType value=\"_custom\"></tranSales:costEstimateType>
Ben Warren
03/23/2023, 12:46 AMxsi:type
attribute. needed to look like this
<tranSales:costEstimateType xsi:type=\"xsd:string\">_custom</tranSales:costEstimateType>