You need to sign in to do that
Don't have an account?
Rajat Mahajan 28
URL param not pre populating in a custom look up - please help !
Hello
I am facing a major challenge in prepopulating values in a custom lookup field from a URL (I am redirected to a new record standard page)
URL :
https://cs10.salesforce.com/001/e?acc2=Greg+Hewitt&CF00NJ0000001x7yoMAA=00QJ000000AQSUtMAP&nooverride=1&retURL=%2F001%2Fo
In the above URL : i am able to prepopulate the standard name field of account from the url param:
acc2=Greg+Hewitt
However, there is a custom field on account called convertedfromlead__c (which is a lookup to lead)
The above needs to be populated from:
CF00NJ0000001x7yoMAA=00QJ000000AQSUtMAP
Where :
00NJ0000001x7yoMAA = Id field of Custom Field
00QJ000000AQSUtMAP = Id field of lead record
The custom lookup field somehow does not get populated.
I had prepended the id with CF as indicated in some articles, however, did not work with or without that
Thanks in advance
Rajat
I am facing a major challenge in prepopulating values in a custom lookup field from a URL (I am redirected to a new record standard page)
URL :
https://cs10.salesforce.com/001/e?acc2=Greg+Hewitt&CF00NJ0000001x7yoMAA=00QJ000000AQSUtMAP&nooverride=1&retURL=%2F001%2Fo
In the above URL : i am able to prepopulate the standard name field of account from the url param:
acc2=Greg+Hewitt
However, there is a custom field on account called convertedfromlead__c (which is a lookup to lead)
The above needs to be populated from:
CF00NJ0000001x7yoMAA=00QJ000000AQSUtMAP
Where :
00NJ0000001x7yoMAA = Id field of Custom Field
00QJ000000AQSUtMAP = Id field of lead record
The custom lookup field somehow does not get populated.
I had prepended the id with CF as indicated in some articles, however, did not work with or without that
Thanks in advance
Rajat
You have to use :
Id field of Custom Field : CF00NJ0000001x7yoMAA__lkid
Id field of lead record : 00QJ000000AQSUtMAP
As well as you have to pass lead name also in url parameters:
Like : CF00NJ0000001x7yoMAA=LeadName
So final url will be :
https://cs10.salesforce.com/001/e?acc2=Greg+Hewitt&CF00NJ0000001x7yoMAA__lkid=00QJ000000AQSUtMAP&CF00NJ0000001x7yoMAA=Leadname&nooverride=1&retURL=%2F001%2Fo
Thanks
Rajendra
Even after populating the URL via apex the following way :
https://cs10.salesforce.com/001/e?acc2=niharika+SHARMA&CF00NJ0000001x7yoMAA=niharika+SHARMA&CF00NJ0000001x7yoMAA_lkid=00QJ000000AQSUtMAP&nooverride=1&retURL=%2F001%2Fo
It did not help
Could you please check if i missed something ?
Here is a snippet of forming the URL:
//This method is used to insert contact
public PageReference createAccount() {
PageReference p = new PageReference('/001/e?nooverride=1&retURL=%2F001%2Fo');
p.getParameters().put('CF' + Id.valueof('00NJ0000001x7yo') + '_lkid',Id.valueof(leadRecord.id));
p.getParameters().put('CF' + Id.valueof('00NJ0000001x7yo'),leadRecord.name);
p.getParameters().put('acc2',leadRecord.name);
return p;
}
Regards
Rajat Mahajan