2

I have a custom object that has various record types. How would I construct URLFOR statement to take me to the new action for a particular record type?

URLFOR($Action.Relationship_Detail__c.New)

The RecordType I want to go to is called AccountAccountRelationship in the Record Type Name field

Also I feel like I should mention that this is part of an outputLink and the value is being set to this URLFOR

1

I believe you would need to use the p3 parameter for that.

{!URLFOR($Action.Relationship_Detail__c.New, null, [p3="Id of your record type",save=1])}

Please check the syntax though.

  • When I do that it goes to the new relationship page but it only prepopulates the dropdown box with the correct record type and then I have to push continue. Any way to skip the pushing continue and just go straight to the correct record type page? – Louis Pujol Jun 19 '14 at 16:44
  • try adding save=1, I edited my answer – Richard N Jun 19 '14 at 16:46
  • No that hasn't changed anything. – Louis Pujol Jun 19 '14 at 16:49
  • Sorry the save=1 actually saves the record. What id are you using for the p3 param? Is it the 15 digit or 18 digit number? – Richard N Jun 19 '14 at 16:56
  • The 15 digit one – Louis Pujol Jun 19 '14 at 16:57

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.