+ Start a Discussion
Gitakul0121Gitakul0121 

URL Parameter Pass - How to preserve a lookup field in the pass?

Hi, this is probably ridumentary by now, but I have created a custom object and am passing field values from the standard opportunity to the custom object. There is a button on the opportunity page to create the new object. I am able to populate the new fields, but they all must be text-based. Is there a way to pass a lookup field value to a field on a new object via URL but have it preserve the lookup functionality in pass. Here is my URL for the new button below. The LAST field after the ampersand is the Opportunity Account. I want that to preserve as a lookup value in the new record.

 

https://na7.salesforce.com/a06/e?00NA0000002ld3f={!Opportunity.Id}&00NA0000002lcvS={!Opportunity.Name}&00NA0000002ld4d={!Opportunity.Projected_Go_Live_Date__c}&00NA0000002leO0={!Opportunity.Amount}&CF00NA0000002VTPv_lkid={!Opportunity.AccountId}

 

Appreciate you help,

Gita

Ispita_NavatarIspita_Navatar

Yes that is possible, I did it for task creation for the field "AssignedTo", I passed the userid and it populated the appropriate username.

Just open the HTML source of the page which opens on the click of the button and there on close scutiny of the HTML you will come across the html field id which needs to be passes int he URL. Give it a shot if you are still stuck I will share my code with you and also give you the source HTMl so that you can co-relate and write your code.

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.

Gitakul0121Gitakul0121

Hi Ispita,

 

 

Thank you for helping me.

 

In your pass, did the userid look like lookup on save of the new record created? I can only pass the Account Name over to a new object when the new field where this value passes is a text field. I need the new field to be a lookup field and to take the lookup on the opportunity record (Account Name) and pass it to the new object as Account Name (hyperlinked).

 

I am using Mozilla Firefox (CSS form) to get the form ID for the source field to prepopulate new fields in the new object, but it passes Account Name only when I make the source field of text type. When I make the source field a lookup, it does not save. it needs to be a lookup.

 

Can you help?

 Gita