• Niklas Myrnäs
  • NEWBIE
  • 0 Points
  • Member since 2017
  • Munters AB

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
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?
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?

We would like to have the ability for our Sales Reps to be able to create a new case from within an opportunity screen.  That case then would be related to that opportunity only.

 

Salesforce allows you to see related cases once you enable the relational list for cases in the layout edit mode, but does not give you a NEW CASE button anywhere in the Opportunity screen.

 

Here is what I have done so far. 

 

Under CASES > FIELDS I created a custom relationship lookup field called RELATED OPPORTUNITY | API Name: Related_Opportunity__c.  I added the new lookup field to the case layout.  It works fine from within the case screen.  I can lookup opportunities with no problem.  Under CASES > BUTTONS AND LINKS I created a new list button called NEW CASE.

 

Button Details:  

 

 

/500/e?retURL=%2F500%2Fo

&cas4_lkid={!Account.Id}

&cas4={!Account.Name}

&006M0000004yR7w_lkid={!Opportunity.Id}

&CF006M0000004yR7w={!Opportunity.Name}

&opp4={!Case.Account}

&CF00N00000007E8N3={!Case.CaseNumber}

&cas3_lkid={! NULLVALUE (Case.ContactId, Contact.Id )}

&cas3={! NULLVALUE (Case.Contact, Contact.Name )}

&cas6=Pre-Sale

&cas11=AE - Web

&retURL=/{!Opportunity.Id}

&saveURL=/{!Opportunity.Id}

 

When I hit the NEW CASE button within the opportunity screen, it takes me to new case creation screen like it should.  Some fields like Account Name gets updated with the correct info except for the RELATED OPPORTUNITY field.

 

Where am I doing wrong?  The ID of the RELATED OPPORTUNITY field is: 006M0000004yR7w

 

Please help.

 

  • April 02, 2013
  • Like
  • 1