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
Niklas MyrnäsNiklas Myrnäs 

URL hacking - Create NEW CASE button from within Opportunity.

Hi!
I'm completely new to Salesforce and URL hacking done this way.

Create NEW CASE button from within Opportunity.

I am haveing problem populating the field Contact Name - cas3 (lookup field) with the value from my Opportunity custom field Contact__c. Or more exact the value is shown in the field Contact Name on the new case, but I get - Error: Invalid Data. If I save the case anyway it gets saved correctly using the button seen below. I have tried to use Id cas3_lkid=, as it is a lookup field, but apparently, don't know how.

Here is my button code:

retURL=%2F500%2Fo&
accid={!Account.Id}
&cas4={!Account.Name}
&cas3={!Opportunity.Contact__c}
&CF00N0Y00000Cq2kO_lkid={!Opportunity.Id}
&CF00N0Y00000Cq2kO={!Opportunity.Name}


Can someone please tell me what I'm doing wrong here?
Nayana KNayana K
retURL=%2F500%2Fo&
accid={!Account.Id}
&cas4={!Account.Name}
&cas3={!Contact__r.Name}
&CF00N0Y00000Cq2kO_lkid={!Opportunity.Id}
&CF00N0Y00000Cq2kO={!Opportunity.Name}

Please try this once
Niklas MyrnäsNiklas Myrnäs

Hi, Nayana!

Thanks for your answer. The result is this (the syntax isn't excepted):

Error: Field Contact__r.Name does not exist. Check spelling.

The custom field on the Opportunity is Contact__c.