Any good patterns for using the update SOAP endpoi...
# suitetalkapi
b
Any good patterns for using the update SOAP endpoint? I've figured enough out where I know I first need to get the record, then make my changes, and then send it back. In my scenario, I'm dealing with ItemFulfillments. First attempt, I was getting an error:
Copy code
You do not have permissions to set a value for element shipmentweightfedex 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.
So I set the
ignoreReadOnlyFields
prop on the preferences in the request body. Second attempt, I get:
Copy code
The Return Shipping Address must be complete when requesting a Return Shipping Label.
I don't even see Return Shipping Address in the payload. Really I'm just trying to change one field of the fulfillment. Is there a better approach?
b
follow the recommendations from update
you do not want to submit the record from a get
specifically because you are doing the equivalent of setting every field
b
Right - ideally I only set the field(s) I want to change, in addition to the internalid. I tried that, but was getting an error about a required field.
b
you also want to make sure that whatever custom form you are using has reasonable mandatory and default values
suitetalk does not have access to all fields
b
Thanks for the info. I was able to circle back with setting the preferences "ignoreReadOnlyFields" and get it to do what I need without doing a get first.