+ Start a Discussion

URLFOR + Custom Objects + Avoid RecordType Selection

I'm able to create an URL S-Control which allow to reach the creation page of an event in avoiding recordtype selection.

My working code :

{!URLFOR($Action.Activity.NewEvent, null,
retURL=$Request.retURL], false)}

My problem :
When I do the same thing with a custom object, the intermediate recordtype selection page is coming.

My Question:
How can I use URLFOR (or another function) on custom objects in order to avoid recordtype selection page?


I have done something like this on a Custom button without using URLFOR and it worked ok. Maybe you could try something similar. Excerpt from the code I user:





However, URLFOR should work, did you double check the RecordType Id you are using is a valid one?







I don't want to build URL by hand.

I want to use URLFOR in order to be compatible with future salesforce platform upgrades.


I check my RecordType Id many times.

And I test URLFOR on various custom objects with different RecordType.


When I build URL by hand it works well, when I use URLFOR, it doesn't work :(