You need to sign in to do that
Don't have an account?
Sunny Narula
how to update custom picklist values from PHP(Website) to Salesforce
I need to update custom picklist values ( for custom field on Product2 ) from PHP(Website) to Salesforce
I can update data (i.e. records)
but is their a way to update THE VALUES IN THE PICKLIST ITSELF FROM the website, as I have the connection establish ann I can access SDFC from my website.
Thanks in advance
Sunny
I can update data (i.e. records)
but is their a way to update THE VALUES IN THE PICKLIST ITSELF FROM the website, as I have the connection establish ann I can access SDFC from my website.
Thanks in advance
Sunny
Callout a web service on your VF page load and it will get the picklist values from your website.
Hi Pavan,
it's a standard object (Product2) having a custom picklist..
creating a webservice and making callout every time the VF page loads can create problem in long run as the org has many users and I m afraid that it might hit the governer limits...and the process for getting values from the website can slow down the application too..
Is their a way to update the values in the Picklist itself from PHP, as we update records back to saleforce..
Sunny
But still that would be done by Web Service call and there you can write a scheduler which runs 5 or N number of times in a day and update the picklist metadata.
@Pavan
That would work..
Please can I get any example or links to proceed for the second option...
The following custom field types aren’t available for external objects.
Auto-number
Currency
Formula
Geolocation
Master-detail relationship
Picklist
Picklist (multi-select)
Text (encrypted)
Text Area (rich)
So now you need to popule piclist from a Custom Setting and update custom setting data from Web Service.
@Pavan
Please can I get a links or a way to proceed for the same...
I think I need to write a Webservice in Apex that can we called from PHP website that will pass the picklist values to updated in salesforce, then this Apex Webservice will update the metadata.. We can call the webservice only when the values are added to th picklist in website.
Please can I get the way to update the metadata this way.....
any links or example to proceed with will be very helpful...
-
You need to write web service in PHP (the picklist data source) and expose it. (Refer some PHP blogs for the same )
-
Salesforce will consume your web service. (http://www.shivasoft.in/blog/salesforce/consuming-external-webservice-in-apex/)
-
Scheduler will callout the web service as per it is scheduled. (http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_scheduler.htm)
-
Scheduler will update the Custom Setting data.
-
Custom Picklist on Visualforce page will refer the custom setting for refering picklist values. (http://www.sfdcpoint.com/salesforce/custom-picklist-in-visualforce-salesforce/)
Thanks,Pavan