+ Start a Discussion

Auto populate

I am trying to Auto populate the name of a client in Related to Client field in Idea Page .

Idea page is a salesforce standard page.

Onclick of button I have to pupulate the relateded client name in search test box.

I am passing the value for Related to client field as below in URL which is written on button logic


https://****.salesforce.com/ideas/editIdea.apexp?c=09aJ00000004CgR&idea.Opportunity__c={! Opportunity.id}&Idea.Account__c={!Account.Id}&retURL=%2Fideas%2FideaList.apexp 


On click of button I am getting Id in URL as below



Can anyone suggest Related to client field is not populating with the value which i am passing in URL. 





Check the field's id attribute in the html (with Firebug or similar is easiest). That is what you should be using in your url.




Its standard Object.

onclick of button it will take me to Idea object.

Idea object have Opportunity__c Look up fields with search option.From view source i got as below for Opportunity custom field


<input  id="thePage:mainLayout:formIdea:pb:ideaCustomFields:Opportunity__c" maxlength="255" name="thePage:mainLayout:formIdea:pb:ideaCustomFields:Opportunity__c" onchange="getElementByIdCS('thePage:mainLayout:formIdea:pb:ideaCustomFields:Opportunity__c_lkid').value='';getElementByIdCS('thePage:mainLayout:formIdea:pb:ideaCustomFields:Opportunity__c_mod').value='1';" size="20" type="text" /><script  type="text/javascript"> 


Option is there for searching the Oppertunity name and user can select but my requirement is it should Auto populate the Existing oppertunity name as the button is placed inside detail section of Oppertunity record.

I want to populate the name on Opportunity__c custom field as Oppertunity name onclick of button.


I have tried with below option but its not working.


Please help me on this.










The Ideas page is not like standard and VF pages, the URL hacking does not work. Just look at the url: [...salesforce.com/ideas/editIdea.apexp?id=...] that is not like standard or VF urls.


The only thing I can think of is that the button calls a webservice (passing the id of the Opportunity), then the web service creates the idea and somehow the browser is sent to the edit page for the new idea.




The button goes to a VF page which inserts a new idea and returns the PageReference url for the idea edit page.


Glad you found the solution !


Still i did not find the solution.

That URL i given for your reference.

That URL also not working .Not able to display the value in Related to Opportunity field.


I am not sure is this the correct way to display the value.