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
Sourav PSourav P 

NEW CASE button in Opportunity Object

Hi
I want to bring the New Case creation button in the opp object. i used as per below,
Its working OK, while creating a new case, But its neither returning to the Opportunity object after case creation nor in the Case object Opportunity lookup , its showing the related Opp ID. Can you plz suggest on my below URL how to achieve it?. Thanks
https://cs6.salesforce.com/500/e?retURL=%2F{!Opportunity.Id}&save_new_url={!Opportunity.Name}


User-added image
Best Answer chosen by Sourav P
Shivdeep KumarShivdeep Kumar
Hi Sourav,

Please try this.
​/500/e?CF00N9000000ER484_lkid={!Opportunity.Id}&CF00N9000000ER484={!Opportunity.Name}&saveURL=%2F{!Opportunity.Id}&retURL=%2F{!Opportunity.Id}

Let me explain about this .:
  • CF00N9000000ER484_lkid  :- Its a lookup field id. when you open a case on edit mode then inspect the lookup icon then you will find the id.
User-added image
  • Split _lkid and you can get the name of opportunity.
Please let me know if this help

Thanks 
Shivdeep
 

All Answers

Shivdeep KumarShivdeep Kumar
Hi Sourav,

Please try this , its working for me ..
 
/500/e?saveURL=%2F{!Opportunity.Id}&retURL=%2F{!Opportunity.Id}

Please let me know if this help, and choose the best answer.

Thanks
Shivdeep
 
Sourav PSourav P
Hi Shiv

Thanks. I used this, but its not returning to Opp page, also in the opp lookup in Case object the related opp ID should be visible.
custom field ( API : Opportunity__c, 00NN0000002HLQh),

I tried the below, its returning to the opp page, but while creating the new case, its not saving in the opp look up field. plz suggest.
https://cs6.salesforce.com/500/e?retURL=/{!Opportunity.Id}&&saveURL=/{!Opportunity.Id}&def_account_id={!Opportunity.AccountId}

 
Shivdeep KumarShivdeep Kumar
Hi Sourav,

Please try this.
​/500/e?CF00N9000000ER484_lkid={!Opportunity.Id}&CF00N9000000ER484={!Opportunity.Name}&saveURL=%2F{!Opportunity.Id}&retURL=%2F{!Opportunity.Id}

Let me explain about this .:
  • CF00N9000000ER484_lkid  :- Its a lookup field id. when you open a case on edit mode then inspect the lookup icon then you will find the id.
User-added image
  • Split _lkid and you can get the name of opportunity.
Please let me know if this help

Thanks 
Shivdeep
 
This was selected as the best answer
Sourav PSourav P
Hi Shiv, Thanks a lot. It helped.