1

I've created a button in my package to pass data to a new page. When I upload the package and install it on another org, the url doesn't work because the server, page name and field id's are different. How can I create a url that is more 'universal' and will accommodate other org installations? Here's the url.

https://na17.salesforce.com/a02/e?CF00No0000008adBn={!PI_SFINT__Project__c.Name}&CF00No0000008adBn_lkid={!PI_SFINT__Project__c.Id}&00No000000EGtmZ={!PI_SFINT__Project__c.Name}&retURL=%2Fa00o000000XLyhu
0

1 Answer 1

0

By reading the package url it looks like that you want to pre-populate some values in specific fields of an object.

Unfortunately complete URL can not be made universal because here field ID is needed. Field ID can only be fetched either by Metadata or Tooling API and it will require api call-outs.

Workaround: Create a custom visualforce using that sObject as standard controller and pre-populate those fields through controller/extension code. Provide the page's relative URL (apex/MyPAckagePage) behind the custom button.

Object pre-fix can be found using SObject describe call. Custom Object also have different Ids when created in different environment.

0

Not the answer you're looking for? Browse other questions tagged .