... | ... | @@ -143,7 +143,7 @@ If the intent is to create Contacts module record by accepting (firstname, lastn |
|
|
|
|
|
|
|
|
|
|
|
#### Create Record WIth Reference Field
|
|
|
#### Create Record With Reference Field
|
|
|
|
|
|
Reference field rules can have a combination of select and create rules which gives the ability to create reference records if select does not yield any match.
|
|
|
|
... | ... | @@ -177,6 +177,43 @@ Reference field rules can have a combination of select and create rules which gi |
|
|
|
|
|
|
|
|
|
|
|
#### Create Record and related to a parent records
|
|
|
|
|
|
You can create a record and also link it parent record using link node.
|
|
|
In the below example you will see label in link node, this is the relationship name(label you see in related list in summary page) between newly created and parent record. If you are not sure then you can leave it skip mentioning it.
|
|
|
|
|
|
|
|
|
```
|
|
|
<?xml version="1.0"?>
|
|
|
<api method="post">
|
|
|
<create module="Documents">
|
|
|
<record>
|
|
|
<field name="notes_title" value="@notes_title"></field>
|
|
|
<field name="notecontent" value="@notecontent" presence="optional"></field>
|
|
|
<field name="filelocationtype" value="I"></field>
|
|
|
<field name="fileversion" value="@fileversion" presence="optional"></field>
|
|
|
<field name="filestatus" value="1"></field>
|
|
|
<field name="folderid" value="22x1"></field>
|
|
|
<field name="document_source" value="Vtiger"></field>
|
|
|
<field name="document_type" value="Public"></field>
|
|
|
</record>
|
|
|
|
|
|
<link label="Documents">
|
|
|
<select module="Contacts">
|
|
|
<where>
|
|
|
<field name="id" value="@parent_id"></field>
|
|
|
</where>
|
|
|
</select>
|
|
|
</link>
|
|
|
|
|
|
<return>
|
|
|
<field name="id"></field>
|
|
|
</return>
|
|
|
</create>
|
|
|
</api>
|
|
|
```
|
|
|
|
|
|
|
|
|
#### Update Record
|
|
|
|
|
|
To replace email field value with incoming parameter (new_email) on all Contacts record matching incoming parameter (old_email) and respond back with record ID of changed records.
|
... | ... | |