public function insertRecords($data, $params = [], $options = [])
    {
        // if (!isset($params['duplicateCheck'])) {
        //     $params['duplicateCheck'] = 1;
        // }
        if (!isset($params['version']) && isset($data['records']) && count($data['records']) > 1) {
            $params['version'] = 4;
        }

        return $this->call('insertRecords', $params, $data, $options);
    }
public function insertRecords($data, $params = [], $options = [])
    {
        // if (!isset($params['duplicateCheck'])) {
        //     $params['duplicateCheck'] = 1;
        // }
        if (!isset($params['version']) && isset($data['records']) && count($data['records']) > 1) {
            $params['version'] = 4;
        }

        return $this->call('insertRecords', $params, $data, $options);
    }
public function insertRecords ( $ data , $ params = [ ] , $ options = [ ] ) { // if (!isset($params['duplicateCheck'])) { //     $params['duplicateCheck'] = 1; // } if ( ! isset ( $ params [ 'version' ] ) && isset ( $ data [ 'records' ] ) && count ( $ data [ 'records' ] ) > 1 ) { $ params [ 'version' ] = 4 ; } return $ this -> call ( 'insertRecords' , $ params , $ data , $ options ) ; }
Implements insertRecords API method.

@param array $data     xmlData represented as an array
array will be converted into XML before sending the request
@param array $params   request parameters
wfTrigger          Boolean    Set value as true to trigger the workflow rule
while inserting record into CRM account. By default, this parameter is false.
duplicateCheck    Integer    Set value as "1" to check the duplicate records and throw an
error response or "2" to check the duplicate records, if exists, update the same.
isApproval        Boolean    By default, records are inserted directly . To keep the records in approval mode,
set value as true. You can use this parameters for Leads, Contacts, and Cases module.
newFormat       Integer    1 (default) - exclude fields with null values in the response
2 - include fields with null values in the response
version         Integer    1 (default) - use earlier API implementation
2 - use latest API implementation
4 - enable duplicate check functionality for multiple records.
It's recommended to use version 4 for inserting multiple records
even when duplicate check is turned off.
@param array $options Options to add for configurations [optional]

@return Response The Response object

@todo
Implements insertRecords API method .