I am trying to redirect to specific record type's edit page layout of an object. Redirection works in Full salesforce site but not in Salesforce1. I tried below function to redirect the page in Salesforce1. But it doesn't work, it always displays default record type's edit page layout of the object


I tried redirecting the page by below way.Redirection happens in Salesforce1 but it displays the page of full salesforce site. Please advise how to achieve this

  • I can use sforce.one.createrecord function to achieve the same.But I would like to pass default values to fields as url parameters and createrecord doesn't support the same
    – Suneel
    Jun 22, 2015 at 13:04

2 Answers 2


Try the createRecord method instead:

sforce.one.createRecord('Opportunity', '01280000000UIuJ');


createRecord(​entityName​[, recordTypeId])

Opens the page to create a new record for the specified entityName, for example, “Account” or “MyObject__c”.

recordTypeId is optional and, if provided, specifies the record type for the created object.


This is how I am using to redirect in SF1 and it works absolutely fine. Do you think, your process is similar?


function toUrl(url){
 if(typeof sforce == 'undefined') 
   window.location.href = url;
  • I too tried the same. Page layout displays but that is not the one associated with record type I mentioned in the URL(01280000000UIuJ in mycase). It is the page layout of default record type of the user. Did you make sure that the record type you are using in the URL is not the default record type of the user?
    – Suneel
    Jun 22, 2015 at 4:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .