You need to sign in to do that
Don't have an account?
jyoti
Custom screen dropdown using Salesforce.com data
I have created a custom screen with Accounts owned by a specific user using an S-Control with HTML to build the page . In this screen, someone would reassign the Account records to a new user by selecting a user.
Question: Is there a way for me to query the User table to automatically populate the User dropdown? And then reference it (the User's Id) in the HTML to populate the dropdown?
The following is the S-Control function to pull the users and the HTML where I want to pull each User into my option value.
function getUserList()
{
var userList = sforce.connection.query("select Id, Name from User limit 10");
var userListRecords = userList.getArray("records");
}
<form action="">
<select name="user">
<option value="getUserList()"></option>
</select>
</form>
This should help:
-greg
Thanks Greg; this worked to generate the User List. However, is it possible to get the User Id of what has been selected so as to assign the User to set of records?
The following statements yield a null or objectError
var extUserId = document.getElementById("UserPlaceholder").getAttribute("value");
var extUserId = document.getElementById("UserPlaceholder").value;
Message Edited by jyoti on 02-14-2008 06:58 PM
The "selectedUserValue" variable will contain the option selected by your user.