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
EguiEgui 

URLFOR formula to prefill record fields goes to recordtype selection instead of record creation

Hi,

 

I've created an UrlFor formula called by a button to prefill some field when creating a new record :

 

On one org I have the following formula :

 

{!URLFOR($Action.ALS_Ligne_de_facture__c.New, null,
[
"p3" = "012Q00000008vJ1",
"retURL" = Opportunity.Id,
"saveURL" = Opportunity.Id,
"save"=1
],
true)}

 Which is leading directly to the record creation screen with the recordtype preselected :

 

https://cs3.salesforce.com/a0T/e?retURL=%2Fservlet%2Fservlet.Integration%3FscontrolCaching%3D1%26lid%3D00bQ0000000EFiE%26eid%3D006Q000000BFQiQ%26ic%3D1&RecordType=012Q00000008vJ1&ent=01IQ00000005Bm0&nooverride=1&saveURL=https%3A%2F%2Fcs3.salesforce.com%2F006Q000000BFQiQ

 

And on another org, I have the following formula :

 

{!URLFOR($Action.DA_Depense__c.New, null,
[
"p3" = "012W00000004QKj",
"retURL" = DA__c.Id,
"saveURL" = DA__c.Id,
"save" = 1
],
true)}

 Which is exctaly the same to me (except for the objects) and is leading to the recordtype selection screen :

 

https://cs13.salesforce.com/setup/ui/recordtypeselect.jsp?ent=01IW00000008mPU&retURL=a0NW00000011Cq7&save_new_url=%2Fa0d%2Fe%3FretURL%3D%252Fservlet%252Fservlet.Integration%253FscontrolCaching%253D1%2526lid%253D00bW0000000Hy2s%2526eid%253Da0NW00000011Cq7%2526ic%253D1&nooverride=1&p3=012W00000004QKj&saveURL=a0NW00000011Cq7&save=1

 

Any idea why the second formula does not have the same behavior than the first one ?

 

They both are on sandbox org with summer '13.

 

Thanks for the help.

 

ryanjuptonryanjupton

Do you have the default record type for the object set in the first org but not the second org?

EguiEgui

Yes they are on both org for the user profile I'm using.