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
VinuVinu 

pre populate an opportunity field from Contact

Hi,

 

I am trying to pre-populate an opportunity field when creating it from an related contact.

Since i tried pre populating a value using a custom button through URL,But it doesnt fetch the values.

 

Is it any other way to do the task thriugh the TRIGGER?

 

Thanks 

AmitSahuAmitSahu

which field you want to populate on opportunity. ?

VinuVinu

Need to populate a contact name field in opportunity , So that the user can know for whom we are creating an opportunity

AmitSahuAmitSahu

Let me get this little clarified ..

You have added a new list button on the related list(Opportunity related list.) of the Contact page.

When you click on your button that should populate the Contact name in the Opportunity page .. am I correct ?

 

If yes,

 

1.please create a lookup field on the Opportunity object which will point to Contact object.

2. Take the ID of the field newly created.

3. Edit the button you have created : The list button

    Behavior : Display in existing window without side bar or header.

Conten source : URL

  Expression : https://ap1.salesforce.com/006/e?lookupcmpgn=1&retURL=%2F00390000005R2Bp&accid=001900000048vtJ&CF00N90000003IaLR={!Contact.Name}

 

Replace the blue part from the URL with your server instace and the second blue text should be replaced with the ID you got from step 2.

4. Save and verify that once you click the custom button that should prepopulate the Contact Name 

(Make sure you add that field created in the above steps to the page layout)

 

Cheers......

VinuVinu

Thanks for your post Jo2o

 

Thanks

Vinu prathap 

VinuVinu

Thanks for the post man,

 

Right now its populating the value as you said,Now the thing is, Is it possible to make a look up field as a read only or else give your suggestion to make that as a read only field

 

 

 

Thanks

Vinu prathap