Happy Business Starts Here

Is the Account "Parent" value accessible via the API?


Is the Account "Parent" value accessible via the API?

I am trying to write a script that will perform upload of usage data via SOAP to zuora. I have something working using node.js, but would like to host it in a VisualForce page so that I can share it with non-technical finance users, who are not familiar with installing modules or running scripts in terminal.


I have a VisualForce which uses node_zuora, packaged into a static resource using browserify. But when it tries to connect, it produces "No 'Access-Control-Allow-Origin' header" as follows.


Is there any way to access Zuora SOAP API from javascript in a Visualforce page? It seems like I would like Zuora to configure the SOAP endpoint to allow this from the connected Salesforce instance.


Fetch API cannot load https://apisandbox.zuora.com/apps/services/a/78.0. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://canonical--staging--c.cs87.visual.force.com' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
ZuoraLoadUsage?core.apexpages.devmode.url=1:128 Error connecting: TypeError: Failed to fetch(…)


Zuora Alumni

Re: Is the Account "Parent" value accessible via the API?

Hi Bolaurent,


This looks like the CORS thing. https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS


There are some discussions about this.



I hope this is helpful.






If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √