- Mark as New
- Bookmark
- Subscribe
- Permalink
- Email to a Friend
- Report Inappropriate Content
Subscription Update Failed By Order Builder
I am running Soap API against Zuora from Salesforce using Order Builder.
The following error occurs when updating the subscription object:
{INVALID_VALUE: Subscription update is not supported in field 'sfdcId'. ,}
When I see an error message, it seems to be an error trying to update a nonexistent item called "sfdcId".
However, I am updating using Update () is a custom field with a different name. (Of course, it is not the name "sfdcId".)
In addition, because I am using Actions Update (), I update about 10 records with one Api Call, but I always fail one record.
I'd like to know how this error is occurring.
Does anyone know?
Thank you
Tomohiro Kimura
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Email to a Friend
- Report Inappropriate Content
Re: Subscription Update Failed By Order Builder
Hi @kimura-tomohiro can you please share the snippet of your code here.
Thank you
Doyeli
If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Email to a Friend
- Report Inappropriate Content
Re: Subscription Update Failed By Order Builder
Doyeli
Thank you for your reply.
I will post only a part of the source.
Custom field parts are masked.
List<Zuora.zObject> updates = new List<Zuora.zObject>(); Zuora.zObject subscription = new Zuora.zObject('Subscription'); subscription.setvalue('Id', subscriptionId); subscription.setvalue('CustomFiled__c', "1"); updates.add(subscription); List<Zuora.zApi.SaveResult> result = zApiInstance.zupdate(updates);
Thank you
Tomohiro Kimura
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Email to a Friend
- Report Inappropriate Content
Re: Subscription Update Failed By Order Builder
Hi @kimura-tomohiro, do you have your custom field added in the WSDL on sfdc end?
Please check the schema setup under Z-360 on salesforce end.
select the Subscription Object and make sure the custom field is added there
i have tested the following code and the custom field value on Zuora end gets updated.
Zuora.zApi zApiInstance = new Zuora.zApi(); zApiInstance.zlogin(); List<Zuora.zObject> updates = new List<Zuora.zObject>(); Zuora.zObject subscription = new Zuora.zObject('Subscription'); subscription.setvalue('Id', '2c92c0856140d0a60161603aee9f522a'); subscription.setvalue('Customfield2__c', 'testcommunity'); updates.add(subscription); List<Zuora.zApi.SaveResult> result = zApiInstance.zupdate(updates); System.debug('result is : ' + result);
Also, in your code, you have to pass the zuora id of the subscription in subscriptionId
Please review and let me know if you still get the error
Thank you
Doyeli
If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Email to a Friend
- Report Inappropriate Content
Re: Subscription Update Failed By Order Builder
Doyeli
It is confirmed that Zuora's custom field has been added to schema setup.
The subscriptionId also stores the Id of Zuora.
In this error I think that my code does not have any problem because updating multiple records with Action Update () failed for only one record.
Thank you
Tomohiro Kimura
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Email to a Friend
- Report Inappropriate Content
Re: Subscription Update Failed By Order Builder
Hi @kimura-tomohiro, how many records you are trying to update in that single update() call?
Based on the following article,
https://knowledgecenter.zuora.com/DC_Developers/G_SOAP_API/E_SOAP_API_Calls/update_call
- You can pass in a maximum of 50 zObjects at a time.
- All objects must be of the same type.
If all these look ok, then I might need to trun on debug log on your org, reproduce the error and review further.
Please let me know
Thank you
Doyeli
If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Email to a Friend
- Report Inappropriate Content
Re: Subscription Update Failed By Order Builder
Hi Doyeli,
I am updating with Update () about ten records.
Also, the update target is a Subscription object.
Other objects are not updated.
By asking for support,
Can you grasp the request and error contents?
In our environment we do not hold the request, so we can not analyze it.
I can tell the API user and the time when the error occurred.
Thank youi
Tomohiro Kimura
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Email to a Friend
- Report Inappropriate Content
Re: Subscription Update Failed By Order Builder
Hi @kimura-tomohiro can you please use zApi.Logger class methods that have been documented in the following article (with sample code) to Log SOAP Request and Response XML Strings
Then run the test again and see if you get to see the whole request .
You can then private message me your SFDC org id, your Zuora tenant id, the user that I need to turn on Debug log for and the steps to run the code and I can see what detail I get in the debug log
Thank you
Doyeli
If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √