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
ShriramShriram 

Url creation for recordType

Hi,

I have 2 Objects say P and another Object C. Object  C has a field of type look up  for Object P.Object C also has two record types. Now when a user goes to the detail page of object P he can see Object C records in the related list of Object P. When a user clicks on the New button in the relatedlist of Object C, record type selection page is displayed. When the user selects a recordtype and clicks Continue button i have some validation to be done. After the validation the user is either taken to Object C page layout or redirected back to the Object P's detail view. For validation I have thought of using VF page or S-control that will override the New button of Object C.

If i use s-control the main issue  is  reconstructing the  record type  URL in  s-control with all those  CN<field Id > and lkid found in standard recordtype page layout.
If i want to useF page how is that call any action onload of the VF page so that i do my validation in the action method any redirect from their.

If possible i wish to create Url for the record type using URLfor or some other function of salesforce.
I dont want to hardcode parts of  URL  like the field Id, lkid

Any inputs on how i can fulfill my requirement would help me a lot..

Thanks