You need to sign in to do that
Don't have an account?
Auto populate value on custom field
I am trying to Auto populate the name of client in Related to Client field which is a custom field on standard Idea object .
Idea is a salesforce standard object.
Onclick of button I have to display relateded Opportunity Name on Related to opportunity test box.
I am trying to pass the value for Related to opportunity field as below in URL which i have written on button logic
https://cs10.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
https://cs10.salesforce.com/ideas/editIdea.apexp?c=09aJ00000004CgR&idea.Opportunity__c=006J00000024XX9&Idea.Account__c=001J0000002cQ1n&retURL=%2Fideas%2FideaList.apexp
Opportunity value is displaying on the text box.
Can anybody suggest on above issue.
how to populate value which i am passing in URL.
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">
I have tried with below option but its not working.
Please help me on this.
https://cs10.salesforce.com/ideas/editIdea.apexp?c=09aJ00000004CgR&thePage:mainLayout:formIdea:pb:ideaCustomFields:Opportunity__c={!Opportunity.Name}&thePage:mainLayout:formIdea:pb:ideaCustomFields:Opportunity__c_lkid={!Opportunity.Id}&retURL=%2Fideas%2FideaList.apexp
https://cs10.salesforce.com/ideas/editIdea.apexp?c=09aJ00000004CgR&Opportunity__c={!Opportunity.Name}&Opportunity__c_lkid={!Opportunity.Id}&retURL=%2Fideas%2FideaList.apexp
Thanks
Ajit
This post will give you pointers to other posts, that try solving the same problem : http://www.tgerm.com/2012/02/field-id-lkid-describe.html
Hi Thanks for your response .
I have tried to use
https://cs10.salesforce.com/ideas/editIdea.apexp?c=09aJ00000004CgR&CF00NJ0000000GTkQ={!Opportunity.Name}&CF00NJ0000000GTkQ_lkid={!Opportunity.Id}&retURL=%2Fideas%2FideaList.apexp
Same issue not able to display the name in Related to opportunity custom text field.
Can you please guide me if i can try something else.
Thanks
Ajit
If its a task related screen this can work for you
https://ap1.salesforce.com/00T/e?what_id=00690000002FQ74
here 00690000002FQ74 is opportunity id.
Hi
I have tried with below URL
https://cs10.salesforce.com/ideas/editIdea.apexp?c=09aJ00000004CgR&What_id={!Opportunity.Id}&retURL=%2Fideas%2FideaList.apexp
Getting opportunity Id in URL as below
https://cs10.salesforce.com/ideas/editIdea.apexp?c=09aJ00000004CgR&What_id=006A000000BIRNj&retURL=%2Fideas%2FideaList.apexp
Still name or id is not able to display.
In controller u assign {! Opportunity.id},{!Account.Id} this to two string {get;set;} variables and u access those values in url.
it will work.
like
publick string accountID {get;set;}
accountID = Account.Id;
in url u use like this &Idea.Account__c={!accountID };