Let the platform do the work

set_entry

Overview

Creates or updates a specific record.

Available APIs

  • SOAP
  • REST

Definition

set_entry(session, module_name, name_value_list)

Parameters

Name Type Description
session String Session ID returned by a previous login call.
module_name String The name of the module from which to retrieve records. Note: This is the modules key which may not be the same as the modules display name.
name_value_list name_value_list | Array The name/value list of the record attributes.

Result

Name Type Description
result new_set_entry_result | Array The call result.
result.id String The ID of the record that was created/updated.

Change Log

Version Change
v2 Return type was changed from set_entry_result to new_set_entry_result.

Considerations

  • To update an existing record, you will need to specify 'id' in the name_value_list parameter.
  • To create a new record with a specific ID, you will need to set 'new_with_id' in the name_value_list parameter.

Examples

PHP

$set_entry_parameters = array(
    //session id
    "session" => $session_id,

    //The name of the module from which to retrieve records.
    "module_name" => "Accounts",

    //Record attributes
    "name_value_list" => array(
        //to update a record
        /*
        array(
            "name" => "id",
            "value" => "da0b107d-cfbc-cb08-4f90-50b7b9cb9ad7"
        ),
        */

        //to create a new record with a specific ID
        /*
        array(
            "name" => "new_with_id",
            "value" => true
        ),
        */

        array(
            "name" => "name",
            "value" => "Example Account"
        ),
    ),
);