/
var
/
www
/
html
/
sugardemo
/
include
/
api
/
help
/
Upload File
HOME
<!-- /* * Your installation or use of this SugarCRM file is subject to the applicable * terms available at * http://support.sugarcrm.com/Resources/Master_Subscription_Agreements/. * If you do not agree to all of the applicable terms or do not have the * authority to bind the entity as an authorized representative, then do not * install or use this SugarCRM file. * * Copyright (C) SugarCRM Inc. All rights reserved. */ --> <h2 xmlns="http://www.w3.org/1999/html">Overview</h2> <span class="lead"> Create a new record of a specified type. </span> <h2>Request Arguments</h2> <table class="table table-hover"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Description</th> <th>Required</th> </tr> </thead> <tbody> <tr> <td> <record field> </td> <td> <record field type> </td> <td> The name value list of fields to populate. </td> <td> True </td> </tr> </tbody> </table> <h3>Request</h3> <pre class="pre-scrollable"> { "name":"Example Account", "account_type":"Customer", "description":"My Example Account", "meetings": { { "add": ["21e3385e-404f-b470-407e-54044e3d8023"], "create": [ { "name": "Test Meeting" } ] } } } </pre> <h3>Link fields</h3> <span class="lead"> It is possible to add record relations to other records and create new related records. </span> <table class="table table-hover"> <thead> <tr> <th>Action</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td> <code>add</code> </td> <td> List </td> <td> List of related records ID. See <a onclick="openLongHelp('d929047c54d78ad96401be98aa699ccf');">RelateRecordApi</a> for details. </td> </tr> <tr> <td> <code>create</code> </td> <td> List </td> <td> List of name to value arrays of related records. </td> </tr> </tbody> </table> <h2>Response Arguments</h2> <table class="table table-hover"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td> <record field> </td> <td> <record field type> </td> <td> Returns the fields for the newly created record. </td> </tr> </tbody> </table> <h3>Response</h3> <pre class="pre-scrollable"> { "id":"e91b1fa7-1bd8-3c71-be96-512e643f9ca4", "name":"Example Account", "date_entered":"2013-02-27T19:56:00+00:00", "date_modified":"2013-02-27T19:56:00+00:00", "modified_user_id":"1", "modified_by_name":"Administrator", "created_by":"1", "created_by_name":"Administrator", "description":"My Example Account", "img":"", "deleted":false, "assigned_user_id":"", "assigned_user_name":"", "team_name":[ { "id":1, "name":"Global", "name_2":"", "primary":true } ], "linkedin":"", "facebook":"", "twitter":"", "googleplus":"", "account_type":"Customer", "industry":"", "annual_revenue":"", "phone_fax":"", "billing_address_street":"", "billing_address_street_2":"", "billing_address_street_3":"", "billing_address_street_4":"", "billing_address_city":"", "billing_address_state":"", "billing_address_postalcode":"", "billing_address_country":"", "rating":"", "phone_office":"", "phone_alternate":"", "website":"", "ownership":"", "employees":"", "ticker_symbol":"", "shipping_address_street":"", "shipping_address_street_2":"", "shipping_address_street_3":"", "shipping_address_street_4":"", "shipping_address_city":"", "shipping_address_state":"", "shipping_address_postalcode":"", "shipping_address_country":"", "email1":"", "parent_id":"", "sic_code":"", "parent_name":"", "email_opt_out":"", "invalid_email":"", "email":[ ], "campaign_id":"", "campaign_name":"", "my_favorite":false, "_acl":{ "fields":{ } } } </pre> <h2>Change Log</h2> <table class="table table-hover"> <tr> <th>Version</th> <th>Change</th> </tr> <tr> <td> v10 (7.6.0) </td> <td> Added support for link fields. </td> </tr> <tr> <td> v10 </td> <td> Added <code>/<module></code> POST endpoint. </td> </tr> </table>