0

I have a related list on my object. My Child object has two record types. The record type of the child depends on the record type of the parent, so my button does that correctly. My problem is this: When I click "Create New Child", then I pass the record type and the correct child record type is shown. The problem is, when I click on "Save & New". That will bring the user to the record type choice page. Is it possible to pass the record type of the previously saved record along with the save&new button? Tia.

  • Is "Save & New" a custom created button? – Ashwani Feb 11 '15 at 8:37
  • No, it's the standard button. – Lily Feb 11 '15 at 9:26
1

This time you would need to create a VisualForce page with a controller extension and override the Save & New button. There is this article here about how to implement the save & new functionality.

If you look at the url when you create a new object, in my case the account

/001/e?retURL=%2F001%2Fo&RecordType=0122000000064UU&ent=Account

You can bypass the record type selection by assigning the record type Id to the Url. You would need to create the URL, select the various record type you cannot hardcode ids and encode the url in the extension controller.

Let me know if this is what you desire and will update the answer with more information.

| improve this answer | |
0

I assume 'your button' is a custom button. There is no way of overriding Save & New button. So you can consider a work around: Do you want the user to select the Record Type for the child ever? If they don't have to then,

  • remove both the record type of the child from the profiles
  • Create a workflow on child object, that sets the record type as the parent's.

Does that help?

| improve this answer | |
0

I have the exactly same problem.

From my Master details page I have a custom button that runs some javascript to redirect to create a new child record with the RecordType specified by the Master. It also auto-fills the master record Id.

  var url ='/a6c/e?RecordType=' + record_id + '&CF00NO0000001s1Cj={!Purchase_Request__c.Name}&CF00NO0000001s1Cj_lkid={!Purchase_Request__c.Id}&saveURL={!Purchase_Request__c.Link}&retURL={!Purchase_Request__c.Link}';
  window.location = url;

I've tried to use the save_new_url querystring without success.

Creating a new VisualForce page to override or remove the Save & New button is not an option. I will have over 10 different Record Types, all with their own Page Layout. Maintaining this with custom VisualForce pages is not feasible.

Hope somebody could come up with an idea on how to solve this.

| improve this answer | |
  • 3
    Irri, you've posted this as an answer (=solution) to the above question. If your question is the exact same there is little point in re-posting it here (or as a new question). There is no way to do this in the standard UI at this time. – Samuel De Rycke Aug 6 '15 at 7:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.