function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
indyindy 

Salesforce URL Hack prepopulate fields - ownerId

Hi All,

 

I am trying to create new opportunity from Account using  ‘Salesforce URL hacking to Prepopulate fields’.

 I can able to populate most of the fields except owner. 

 

Here I am dynamically getting the ownerId and passing to URL. On my final opportunity edit page the owner value is logged in user instead of the owner that I am passing.

 

Any help is greatly appreciated.

 

Here is my url:

------------------------

 

// adds the proper code for inclusion of AJAX toolkit 
{!REQUIRESCRIPT('/soap/ajax/25.0/connection.js')}
{!REQUIRESCRIPT("/soap/ajax/15.0/apex.js")}

 

var ownerId = sforce.apex.execute("HelperClassxxx","Methodxxx",param);

 

var newUrl = "/006/e?opp4_lkid={!Account.Id}&retURL=/{!Account.Id}&opp3={!Account.Name} &newOwn_lkid="+ownerId+"&newOwn=Indu cts";

 

window.parent.location.replace(newUrl);

 

 

Thanks,

Indy