+ Start a Discussion
Eyal HutterEyal Hutter 

SalesForce1 Auto populate fields when using sforce.one.createrecord

Hello,

I'm using a visualforce button in custom object layout page to create related list record of another custom object. when I use the sforce.one.createrecord the SF1 navigate to the create record page but I cannot auto populate the fields just like in standard salesforce when I passed parameters in url.
the creation page looks like this:
User-added image 
The lookup fields in yellow should present a read only value that is taken from a parameter passed from.
Any solution for this or a workaround?
Best Answer chosen by Eyal Hutter
kgilkgil
I am late to the party here, but there is no way to pass parameters to standard pages in Salesforce1 with the sforce.one.createRecord method.

Only way would be to use the sforce.one.navigateToURL method and use a custom Visualforce page for the new record. You can pass parameters as needed to a Visualforce page. The only way with standard functionality is to create a record with an action in the action bar. Those actions can have predefined field values defined in the setup page. 

All Answers

devindiaadevindiaa
Got any solution?
kgilkgil
I am late to the party here, but there is no way to pass parameters to standard pages in Salesforce1 with the sforce.one.createRecord method.

Only way would be to use the sforce.one.navigateToURL method and use a custom Visualforce page for the new record. You can pass parameters as needed to a Visualforce page. The only way with standard functionality is to create a record with an action in the action bar. Those actions can have predefined field values defined in the setup page. 
This was selected as the best answer
VIVEK 998VIVEK 998
Also you can use action button to create the related reocrd, it will provide you with tha parent details while creating new child record.
Let me know if any other conditions you do have.
Hope it helps!
 
Eyal HutterEyal Hutter
@VIVEK 998 this will result at auto-fill one field only - the reference to the parent object. After trying all this time at different tasks to do it, the best way is to create a visualforce page with referance by sforce.one.navigateToURL methodwith parameters as @kgil suggested.
Phil SpenceleyPhil Spenceley

Please vote for the following idea to allow sforce.one.createRecord to take an additional parameter to allow these fields to be set.

https://success.salesforce.com/ideaView?id=08730000000Dzx3AAC

Thanks
Jeffrey Clark 32Jeffrey Clark 32
Absolutely:
var Parms = {"WhatId":recordId,"Subject":"Call","Type":"Call","Type_Of_Task__c":"Call"};
sforce.one.createRecord("Task",null,Parms);
Cheers
 
DoondiDoondi
@jeffrey Clark 32 any additional link or supporting document please, Am able to create record but not able to populate values. 
Irfan Khalid 1Irfan Khalid 1
Very correct information up to the mark. Check coworking space in Noida (https://workshalas.com/) at ( https://workshalas.com/about-us/ ) 
farhan khan 90farhan khan 90
Thanks for the great content.
Farhantech (https://www.farhantech.com/)
Luiza ZdebskaLuiza Zdebska

Hello! I have encountered a requirement from Salesfroce to track BOTH ACCESS_BACKGROUND_LOCATION and ACCESS_FINE_LOCATION of our mo app users (https://salesforce-marketingcloud.github.io/MarketingCloudSDK-iOS/location/geolocation-overview.html )  Hovewer our app was forbidden to track ACCESS_BACKGROUND_LOCATION by Apple & Google.

I would like Salesforce to make changes in their requirements location so that ONLY ACCESS_FINE_LOCATION is needed for Geopushes sending. (WITHOUT ACCESS_BACKGROUND_LOCATION)
These changes will allow 19 500 customers, including our retail company goodwine Ukraine, to use all functionalities of Marketing Cloud that will contribute in sales boosting.

Please, vote for my idea at ideaexchange here: https://trailblazer.salesforce.com/ideaView?id=0874V0000010znOQAQ 
nensyi brijaniyanensyi brijaniya
Schoology Fbisd Login Student – Guys!! Here you can get all the information about the “Schoology Fbisd Login” at Fortbendisdschoologycom.