You need to sign in to do that
Don't have an account?
DanielSand
How to populate custom fields with external data (rest API)
Hi!
I'm trying to set up a way to populate custom fields automatically with data from an API from another host.
What I'm aiming for is to get Salesforce to pull this data automatically.
Does anyone know how I should go about to get started with this?
Many thanks!
Daniel,
There a host of options to move existing data in bulk from one system to your custom fields in SFDC, from DataLoader (http://wiki.developerforce.com/page/Apex_Data_Loader), to open source tools like ApatarForge (www.apatarforce.org) to commercial tools like SnapLogic (http://www.snaplogic.com).
If you are looking to do this in real time as you add data to your system programmatically there are a number of ways to do this in APEX. We've assisted folks with both of these scenarios.
Hope this helps, feel free to reach out if you'd like some assistance.
Dan Smith
http://www.virtrock.com
Daniel,
Sorry given you posted in REST forum should have realized that is what you were getting at how to do this programmatically from the get go.
You could do this (call out to external to get data for custom fields) either in a Visual Force Page with a custom controller and have this in UI or using Triggers asynchronously using an @future method to do the HttpRequest callout and then read read the response back and insert the data into the custom field. However, you will have to be careful in your object trigger to notice that custom field updates do not make the the callout and cause a loop. ;-) There are some nice code examples if you search on 'APEX HttpRequest @future trigger'
Hope this helps more,
Dan Smith
www.virtrock.com