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
kjunkjun 

Salesforce1 Quick Actions and remoteObjects, picklist

Created a custom quick action button and visual force page for SF1, I want to add a picklist to my form, how can I achieve this? 

Does this syntax look correct for creating a picklist onto my form using the Account "RecordTypeId" label? 

Also what is the syntax to place the picklist onto the form, I have the syntax for the Account Name correct (<input type="text" id="accountName"/>), but I can't figure out the syntax for a picklist.
<apex:remoteObjects >
        <apex:remoteObjectModel name="Account" fields="Id,RecordTypeId,Name"/>
    </apex:remoteObjects>
    
    <div class="mypage">
        Account Name:
        <input type="text" id="accountName"/>
         <button onclick="createAccount()">Create Account</button>
    </div>
Here's a screenshot of the rendered page within SF1: 

Screenshot of Salesforce 1 Quick Action

This is my entire VF code in case you need to review it. 
<apex:page docType="html-5.0" title="Create Account">

<style>
    .mypage {
        font-family: "ProximaNovaSoft-Regular", Calibri; 
        font-size: 110%;
        padding-top: 12px;
        width: 100%;
    }
    .mypage input[type=text] {
        width: 100%;
        height: 35px;
        -webkit-appearance: none;
        padding: 0 8px;
        margin: 4px 0;
        line-height: 21px;
        background-color: #fff;
        border: 1px solid #ddd;
        border-radius: 3px;
        outline: none;
    }
    .mypage button {
        -webkit-appearance: button;
        border-radius: 3px;
        display: block;
        padding: 12px;
        margin: 4px 0;
        width: 100%;
        background: #eee;
        border: solid 1px #ccc;
    }
</style>
    
    <apex:remoteObjects >
        <apex:remoteObjectModel name="Account" fields="Id,RecordTypeId,Name"/>
    </apex:remoteObjects>
    
    <div class="mypage">
        Account Name:
        <input type="text" id="accountName"/>
         <button onclick="createAccount()">Create Account</button>
    </div>
    
    <script>
        function createAccount() {
            var accountName = document.getElementById("accountName").value;
            var account = new SObjectModel.Account();
            account.create({Name: accountName}, function(error, records) {
                if (error) {
                    alert(error.message);
                } else {
                   sforce.one.navigateToSObject(records[0]);
                }
            });
        }
    </script>
    
</apex:page>

Thank you in advance!