Tree View
Tree
List View
Alphabetical List
Share
Share
Search:
id:
186

name:

Retrieving id for new elements



description:
If you use JavaScript to create a new item, you may want to retrieve the ID of the element just created. To do this, use the _returnresult=true option in the querystring.

For example, submitting a querystring like the following will create a new item in the Person table with a name of Linda.

var id = getUrlString('db.aspx?t=person&name=linda&o=5&_returnresult=true');

You can now use the value in ID to add information to other tables that is related to the person Linda. Like this:

var taskid = getUrlString('db.aspx?t=tasks&name=Register+for+intranet&person=' + id + '&o=5&_returnresult=true');



ParentTopic: