You need to sign in to do that
Don't have an account?
John Dayondon
Calling an external REST API using custom button?
Hi,
I trying to create a custom button on our custom object page that would call an external REST API.
When I tested it it gave me the "Unexpeced end of input" error.
I trying to create a custom button on our custom object page that would call an external REST API.
When I tested it it gave me the "Unexpeced end of input" error.
You will need to create a JavaScript button to make an API callout .
Please refer the below links to understand and implement above.
https://developer.salesforce.com/forums/?id=906F00000008sPlIAI
https://developer.salesforce.com/forums/?id=906F0000000991HIAQ
All Answers
You will need to create a JavaScript button to make an API callout .
Please refer the below links to understand and implement above.
https://developer.salesforce.com/forums/?id=906F00000008sPlIAI
https://developer.salesforce.com/forums/?id=906F0000000991HIAQ
Yes, writing a javascript code did solved it. So for those who got into this issue here was how this was solved.
Create an APEX Class to make the external API callout:
Call that APEX class from your custom button.
Now add this custom button on your page layout and your good.
Note: Add handler for the response object on your APEX code as how you would like it handled.