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
dietcoladietcola 

custom button (URL) on Parent Opp for new Child Opp not working

Hi, Helpful Ones-

 

I'm trying to create a custom button on the "Child Opportunity" related list on my Opportunity object.  (My data model is such that my users can create a child opportunity from an existing Opportunity.)

 

I need the button to mimick the functionality of a standard "New" button on a related list (i.e. the return URL should be the Parent Opportunity, and the Parent Opportunity field should be automatically populaed for the user), but I also want to have several other custom fields auto-fill from the Parent Opportunity.  (These need to be editable--otherwise I would just use cross-object formula fields.)

 

I'm just trying to get the standard functionality to work right now (forgetting the additional custom fields for a moment)... and it's not!  Here's what I have:

 

/006/e?CF00Nf0000000GjTk={!Opportunity.Parent_Opportunity__c}&CF00Nf0000000GjTk_lkid={!Opportunity.Parent_OpportunityId__c}&RecordType=01240000000M5NG&ent=Opportunity&retURL=/{!Opportunity.Parent_OpportunityId__c}

 

According to everything I've been reading, this should work.  It saves with no problems (no syntax errors or anything), but when I execute it, the Parent Opportunity field is always blank--it never auto-populates as it should.

 

 

Any help will be most appreciated!

Best Answer chosen by Admin (Salesforce Developers) 
dietcoladietcola

Never mind--got it!

 

Now if only I could figure out how to delete this thread.

All Answers

dietcoladietcola

Quick update:  I tried removing the &ent=Opportunity part, and still no luck.

dietcoladietcola

Never mind--got it!

 

Now if only I could figure out how to delete this thread.

This was selected as the best answer