service/v4/SugarWebServiceImplv4.php

Show: inherited
Table of Contents

Constants

Constant  sugarEntry = true

\SugarWebServiceImplv4

Package:
Parent(s)
\SugarWebServiceImplv3_1 < \SugarWebServiceImplv3 < \SugarWebServiceImpl
Children
\SugarWebServiceImplv4_1

Properties

Methods

methodpublic__construct( ) : void

methodpublicget_available_modules( String $session, String $filter = 'all' ) : Array
inherited

Retrieve the list of available modules on the system available to the currently logged in user.

Inherited from: \SugarWebServiceImplv3_1::get_available_modules()
Parameters
Name Type Description
$session String

-- Session ID returned by a previous call to login.

$filter String

-- Valid values are: all - Return all modules, default - Return all visible modules for the application mobile - Return all visible modules for the mobile view

Returns
Type Description
Array 'modules' -- Array - An array of module names
Details
Exception
'SoapFault' -- The SOAP error, if any  
methodpublicget_document_revision( String $session, String $id ) : \new_return_document_revision
inherited

This method is used as a result of the .htaccess lock down on the cache directory. It will allow a properly authenticated user to download a document that they have proper rights to download.

Inherited from: \SugarWebServiceImpl::get_document_revision()\SugarWebServiceImplv3::get_document_revision()\SugarWebServiceImplv3_1::get_document_revision()
Parameters
Name Type Description
$session String

-- Session ID returned by a previous call to login.

$id String

-- ID of the document revision to obtain

Returns
Type Description
\new_return_document_revision - Array String 'id' -- The ID of the document revision containing the attachment String document_name - The name of the document String revision - The revision value for this revision String 'filename' -- The file name of the attachment Binary 'file' -- The binary contents of the file.
Details
Exception
'SoapFault' -- The SOAP error, if any  
methodpublicget_entries( String $session, String $module_name, Array $ids, Array $select_fields, Array $link_name_to_fields_array ) : Array

Retrieve a list of SugarBean's based on provided IDs. This API will not wotk with report module

Parameters
Name Type Description
$session String

-- Session ID returned by a previous call to login.

$module_name String

-- The name of the module to return records from. This name should be the name the module was developed under (changing a tab name is studio does not affect the name that should be passed into this method)..

$ids Array

-- An array of SugarBean IDs.

$select_fields Array

-- A list of the fields to be included in the results. This optional parameter allows for only needed fields to be retrieved.

$link_name_to_fields_array Array

-- A list of link_names and for each link_name, what fields value to be returned. For ex.'link_name_to_fields_array' => array(array('name' => 'email_addresses', 'value' => array('id', 'email_address', 'opt_out', 'primary_address')))

Returns
Type Description
Array 'entry_list' -- Array - The records name value pair for the simple data types excluding link field data. 'relationship_list' -- Array - The records link field data. The example is if asked about accounts email address then return data would look like Array ( [0] => Array ( [name] => email_addresses [records] => Array ( [0] => Array ( [0] => Array ( [name] => id [value] => 3fb16797-8d90-0a94-ac12-490b63a6be67 ) [1] => Array ( [name] => email_address [value] => hr.kid.qa@example.com ) [2] => Array ( [name] => opt_out [value] => 0 ) [3] => Array ( [name] => primary_address [value] => 1 ) ) [1] => Array ( [0] => Array ( [name] => id [value] => 403f8da1-214b-6a88-9cef-490b63d43566 ) [1] => Array ( [name] => email_address [value] => kid.hr@example.name ) [2] => Array ( [name] => opt_out [value] => 0 ) [3] => Array ( [name] => primary_address [value] => 0 ) ) ) ) )
Details
Exception
'SoapFault' -- The SOAP error, if any  
methodpublicget_entries_count( String $session, String $module_name, String $query, int $deleted ) : Array
Parameters
Name Type Description
$session String

session -- Session ID returned by a previous call to login.

$module_name String

module_name -- module to retrieve number of records from

$query String

query -- allows webservice user to provide a WHERE clause

$deleted int

deleted -- specify whether or not to include deleted records

Returns
Type Description
Array result_count - integer - Total number of records for a given module and query
Details
Exception
'SoapFault' -- The SOAP error, if any  
methodpublicget_entry( String $session, String $module_name, String $id, Array $select_fields, Array $link_name_to_fields_array,  $track_view = FALSE ) : Array
inherited

Retrieve a single SugarBean based on ID.

Inherited from: \SugarWebServiceImplv3_1::get_entry()
Parameters
Name Type Description
$session String

-- Session ID returned by a previous call to login.

$module_name String

-- The name of the module to return records from. This name should be the name the module was developed under (changing a tab name is studio does not affect the name that should be passed into this method)..

$id String

-- The SugarBean's ID value.

$select_fields Array

-- A list of the fields to be included in the results. This optional parameter allows for only needed fields to be retrieved.

$link_name_to_fields_array Array

-- A list of link_names and for each link_name, what fields value to be returned. For ex.'link_name_to_fields_array' => array(array('name' => 'email_addresses', 'value' => array('id', 'email_address', 'opt_out', 'primary_address')))

$track_view
Returns
Type Description
Array 'entry_list' -- Array - The records name value pair for the simple data types excluding link field data. 'relationship_list' -- Array - The records link field data. The example is if asked about accounts email address then return data would look like Array ( [0] => Array ( [name] => email_addresses [records] => Array ( [0] => Array ( [0] => Array ( [name] => id [value] => 3fb16797-8d90-0a94-ac12-490b63a6be67 ) [1] => Array ( [name] => email_address [value] => hr.kid.qa@example.com ) [2] => Array ( [name] => opt_out [value] => 0 ) [3] => Array ( [name] => primary_address [value] => 1 ) ) [1] => Array ( [0] => Array ( [name] => id [value] => 403f8da1-214b-6a88-9cef-490b63d43566 ) [1] => Array ( [name] => email_address [value] => kid.hr@example.name ) [2] => Array ( [name] => opt_out [value] => 0 ) [3] => Array ( [name] => primary_address [value] => 0 ) ) ) ) )
Details
Exception
'SoapFault' -- The SOAP error, if any  
methodpublicget_entry_list( String $session, String $module_name, String $query, String $order_by, integer $offset, Array $select_fields, Array $link_name_to_fields_array, integer $max_results, integer $deleted,  $favorites = false ) : Array

Retrieve a list of beans. This is the primary method for getting list of SugarBeans from Sugar using the SOAP API.

Parameters
Name Type Description
$session String

-- Session ID returned by a previous call to login.

$module_name String

-- The name of the module to return records from. This name should be the name the module was developed under (changing a tab name is studio does not affect the name that should be passed into this method)..

$query String

-- SQL where clause without the word 'where'

$order_by String

-- SQL order by clause without the phrase 'order by'

$offset integer

-- The record offset to start from.

$select_fields Array

-- A list of the fields to be included in the results. This optional parameter allows for only needed fields to be retrieved.

$link_name_to_fields_array Array

-- A list of link_names and for each link_name, what fields value to be returned. For ex.'link_name_to_fields_array' => array(array('name' => 'email_addresses', 'value' => array('id', 'email_address', 'opt_out', 'primary_address')))

$max_results integer

-- The maximum number of records to return. The default is the sugar configuration value for 'list_max_entries_per_page'

$deleted integer

-- false if deleted records should not be include, true if deleted records should be included.

$favorites
Returns
Type Description
Array 'result_count' -- integer - The number of records returned 'next_offset' -- integer - The start of the next page (This will always be the previous offset plus the number of rows returned. It does not indicate if there is additional data unless you calculate that the next_offset happens to be closer than it should be. 'entry_list' -- Array - The records that were retrieved 'relationship_list' -- Array - The records link field data. The example is if asked about accounts email address then return data would look like Array ( [0] => Array ( [name] => email_addresses [records] => Array ( [0] => Array ( [0] => Array ( [name] => id [value] => 3fb16797-8d90-0a94-ac12-490b63a6be67 ) [1] => Array ( [name] => email_address [value] => hr.kid.qa@example.com ) [2] => Array ( [name] => opt_out [value] => 0 ) [3] => Array ( [name] => primary_address [value] => 1 ) ) [1] => Array ( [0] => Array ( [name] => id [value] => 403f8da1-214b-6a88-9cef-490b63d43566 ) [1] => Array ( [name] => email_address [value] => kid.hr@example.name ) [2] => Array ( [name] => opt_out [value] => 0 ) [3] => Array ( [name] => primary_address [value] => 0 ) ) ) ) )
Details
Exception
'SoapFault' -- The SOAP error, if any  
methodpublicget_language_definition( string $session, array $modules, bool $MD5 = FALSE ) : void
inherited

Enter description here...

Inherited from: \SugarWebServiceImplv3_1::get_language_definition()
Parameters
Name Type Description
$session string
  • Session ID returned by a previous call to login.
$modules array

Array of modules to return

$MD5 bool

Should the results be md5d

methodpublicget_last_viewed( String $session,  $module_names ) : Array
inherited

Retrieve a list of recently viewed records by module.

Inherited from: \SugarWebServiceImplv3::get_last_viewed()\SugarWebServiceImplv3_1::get_last_viewed()
Parameters
Name Type Description
$session String

-- Session ID returned by a previous call to login.

$module_names
Returns
Type Description
Array The recently viewed records
Details
Exception
'SoapFault' -- The SOAP error, if any  
methodpublicget_module_fields( String $session, String $module_name, Array $fields = array() ) : Array
inherited

Retrieve vardef information on the fields of the specified bean.

Inherited from: \SugarWebServiceImpl::get_module_fields()\SugarWebServiceImplv3::get_module_fields()\SugarWebServiceImplv3_1::get_module_fields()
Parameters
Name Type Description
$session String

-- Session ID returned by a previous call to login.

$module_name String

-- The name of the module to return records from. This name should be the name the module was developed under (changing a tab name is studio does not affect the name that should be passed into this method)..

$fields Array

-- Optional, if passed then retrieve vardef information on these fields only.

Returns
Type Description
Array 'module_fields' -- Array - The vardef information on the selected fields. 'link_fields' -- Array - The vardef information on the link fields
Details
Exception
'SoapFault' -- The SOAP error, if any  
methodpublicget_module_fields_md5( String $session, String $module_name ) : String
inherited

Retrieve the md5 hash of the vardef entries for a particular module.

Inherited from: \SugarWebServiceImplv3_1::get_module_fields_md5()
Parameters
Name Type Description
$session String

-- Session ID returned by a previous call to login.

$module_name String

-- The name of the module to return records from. This name should be the name the module was developed under (changing a tab name is studio does not affect the name that should be passed into this method)..

Returns
Type Description
String The md5 hash of the vardef definition.
Details
Exception
'SoapFault' -- The SOAP error, if any  
methodpublicget_module_layout( String $session,  $a_module_names,  $a_type,  $a_view,  $acl_check = TRUE,  $md5 = FALSE ) : arrayarray

Retrieve the layout metadata for a given module given a specific type and view.

Parameters
Name Type Description
$session String

-- Session ID returned by a previous call to login.

$a_module_names
$a_type
$a_view
$acl_check
$md5
Returns
Type Description
arrayarray $type The type(s) of views requested. Current supported types are 'default' (for application) and 'wireless'$view The view(s) requested. Current supported types are edit, detail, list, and subpanel.
Details
Exception
'SoapFault' -- The SOAP error, if any  
methodpublicget_module_layout_md5( String $session,  $module_name,  $type,  $view,  $acl_check = TRUE ) : arrayarray
inherited

Retrieve the md5 hash of a layout metadata for a given module given a specific type and view.

Inherited from: \SugarWebServiceImplv3_1::get_module_layout_md5()
Parameters
Name Type Description
$session String

-- Session ID returned by a previous call to login.

$module_name
$type
$view
$acl_check
Returns
Type Description
arrayarray $type(s) The type of view requested. Current supported types are 'default' (for application) and 'wireless'$view(s) The view requested. Current supported types are edit, detail, and list.
Details
Exception
'SoapFault' -- The SOAP error, if any  
methodpublicget_note_attachment( String $session, String $id ) : Array
Parameters
Name Type Description
$session String

-- Session ID returned by a previous call to login.

$id String

-- The ID of the appropriate Note.

Returns
Type Description
Array 'note_attachment' -- Array String 'id' -- The ID of the Note containing the attachment String 'filename' -- The file name of the attachment Binary 'file' -- The binary contents of the file. String 'related_module_id' -- module id to which this note is related String 'related_module_name' - module name to which this note is related
Details
Exception
'SoapFault' -- The SOAP error, if any  
methodpublicget_relationships( String $session, String $module_name, String $module_id, String $link_field_name, String $related_module_query, Array $related_fields, Array $related_module_link_name_to_fields_array, \Number $deleted, String $order_by = '' ) : Array
inherited

Retrieve a collection of beans that are related to the specified bean and optionally return relationship data for those related beans.

Inherited from: \SugarWebServiceImplv3::get_relationships()\SugarWebServiceImplv3_1::get_relationships()

So in this API you can get contacts info for an account and also return all those contact's email address or an opportunity info also.

Parameters
Name Type Description
$session String

-- Session ID returned by a previous call to login.

$module_name String

-- The name of the module that the primary record is from. This name should be the name the module was developed under (changing a tab name is studio does not affect the name that should be passed into this method)..

$module_id String

-- The ID of the bean in the specified module

$link_field_name String

-- The name of the lnk field to return records from. This name should be the name the relationship.

$related_module_query String

-- A portion of the where clause of the SQL statement to find the related items. The SQL query will already be filtered to only include the beans that are related to the specified bean.

$related_fields Array
  • Array of related bean fields to be returned.
$related_module_link_name_to_fields_array Array
  • For every related bean returrned, specify link fields name to fields info for that bean to be returned. For ex.'link_name_to_fields_array' => array(array('name' => 'email_addresses', 'value' => array('id', 'email_address', 'opt_out', 'primary_address'))).
$deleted \Number

-- false if deleted records should not be include, true if deleted records should be included.

$order_by String

-- field to order the result sets by

Returns
Type Description
Array 'entry_list' -- Array - The records that were retrieved 'relationship_list' -- Array - The records link field data. The example is if asked about accounts contacts email address then return data would look like Array ( [0] => Array ( [name] => email_addresses [records] => Array ( [0] => Array ( [0] => Array ( [name] => id [value] => 3fb16797-8d90-0a94-ac12-490b63a6be67 ) [1] => Array ( [name] => email_address [value] => hr.kid.qa@example.com ) [2] => Array ( [name] => opt_out [value] => 0 ) [3] => Array ( [name] => primary_address [value] => 1 ) ) [1] => Array ( [0] => Array ( [name] => id [value] => 403f8da1-214b-6a88-9cef-490b63d43566 ) [1] => Array ( [name] => email_address [value] => kid.hr@example.name ) [2] => Array ( [name] => opt_out [value] => 0 ) [3] => Array ( [name] => primary_address [value] => 0 ) ) ) ) )
Details
Exception
'SoapFault' -- The SOAP error, if any  
methodpublicget_server_info( ) : Array
inherited

Gets server info. This will return information like version, flavor and gmt_time.

Inherited from: \SugarWebServiceImplv3::get_server_info()\SugarWebServiceImplv3_1::get_server_info()
Returns
Type Description
Array - flavor - String - Retrieve the specific flavor of sugar. - version - String - Retrieve the version number of Sugar that the server is running. - gmt_time - String - Return the current time on the server in the format 'Y-m-d H:i:s'. This time is in GMT.
Details
Exception
'SoapFault' -- The SOAP error, if any  
methodpublicget_upcoming_activities( String $session ) : Array
inherited

Retrieve a list of upcoming activities including Calls, Meetings,Tasks and Opportunities

Inherited from: \SugarWebServiceImplv3::get_upcoming_activities()\SugarWebServiceImplv3_1::get_upcoming_activities()
Parameters
Name Type Description
$session String

-- Session ID returned by a previous call to login.

Returns
Type Description
Array List of upcoming activities
Details
Exception
'SoapFault' -- The SOAP error, if any  
methodpublicget_user_id( String $session ) : String
inherited

Return the user_id of the user that is logged into the current session.

Inherited from: \SugarWebServiceImpl::get_user_id()\SugarWebServiceImplv3::get_user_id()\SugarWebServiceImplv3_1::get_user_id()
Parameters
Name Type Description
$session String

-- Session ID returned by a previous call to login.

Returns
Type Description
String -- the User ID of the current session
Details
Exception
'SoapFault' -- The SOAP error, if any  
methodpublicjob_queue_cycle( string $session, string $clientid ) : void

Run cleanup and schedule

Parameters
Name Type Description
$session string
$clientid string
methodpublicjob_queue_next( string $session, string $clientid ) : void

Get next job from the queue

Parameters
Name Type Description
$session string
$clientid string
methodpublicjob_queue_run( string $session, string $jobid, string $clientid ) : void

Run job from queue

Parameters
Name Type Description
$session string
$jobid string
$clientid string
methodpubliclogin( \UserAuth $user_auth, String $application, array $name_value_list = array() ) : Array

Log the user into the application

Parameters
Name Type Description
$user_auth \UserAuth

array $user_auth -- Set user_name and password (password needs to be in the right encoding for the type of authentication the user is setup for. For Base sugar validation, password is the MD5 sum of the plain text password.

$application String

-- The name of the application you are logging in from. (Currently unused).

$name_value_list array

-- Array of name value pair of extra parameters. As of today only 'language' and 'notifyonsave' is supported

Returns
Type Description
Array - id - String id is the session_id of the session that was created. - module_name - String - module name of user - name_value_list - Array - The name value pair of user_id, user_name, user_language, user_currency_id, user_currency_name, - user_default_team_id, user_is_admin, user_default_dateformat, user_default_timeformat
Details
Exception
'SoapFault' -- The SOAP error, if any  
methodpubliclogout( String $session ) : \Empty
inherited

Log out of the session. This will destroy the session and prevent other's from using it.

Inherited from: \SugarWebServiceImpl::logout()\SugarWebServiceImplv3::logout()\SugarWebServiceImplv3_1::logout()
Parameters
Name Type Description
$session String

-- Session ID returned by a previous call to login.

Returns
Type Description
\Empty
Details
Exception
'SoapFault' -- The SOAP error, if any  
methodpublicoauth_access(  $session = '' ) : void

Parameters
Name Type Description
$session
methodpublicoauth_access_token( ) : void

Get OAuth access token

methodpublicoauth_request_token( ) : void

Get OAuth reqtest token

methodpublicseamless_login( String $session ) : \1\0
inherited

Perform a seamless login. This is used internally during the sync process.

Inherited from: \SugarWebServiceImpl::seamless_login()\SugarWebServiceImplv3::seamless_login()\SugarWebServiceImplv3_1::seamless_login()
Parameters
Name Type Description
$session String

-- Session ID returned by a previous call to login.

Returns
Type Description
\1\0 -- integer - if the session was authenticated-- integer - if the session could not be authenticated
methodpublicsearch_by_module( string $session, string $search_string, \string[] $modules, int $offset, int $max_results, string $assigned_user_id = '', \string[] $select_fields = array(), bool $unified_search_only = TRUE, bool $favorites = FALSE ) : Array

Given a list of modules to search and a search string, return the id, module_name, along with the fields We will support Accounts, Bug Tracker, Cases, Contacts, Leads, Opportunities, Project, ProjectTask, Quotes

Parameters
Name Type Description
$session string
  • Session ID returned by a previous call to login.
$search_string string
  • string to search
$modules \string[]
  • array of modules to query
$offset int
  • a specified offset in the query
$max_results int
  • max number of records to return
$assigned_user_id string
  • a user id to filter all records by, leave empty to exclude the filter
$select_fields \string[]
  • An array of fields to return. If empty the default return fields will be from the active list view defs.
$unified_search_only bool
  • A boolean indicating if we should only search against those modules participating in the unified search.
$favorites bool
  • A boolean indicating if we should only search against records marked as favorites.
Returns
Type Description
Array return_search_result - Array('Accounts' => array(array('name' => 'first_name', 'value' => 'John', 'name' => 'last_name', 'value' => 'Do')))
Details
Exception
'SoapFault' -- The SOAP error, if any  
methodpublicset_campaign_merge( String $session, Array $targets, String $campaign_id ) : \-
inherited

Once we have successfuly done a mail merge on a campaign, we need to notify Sugar of the targets and the campaign_id for tracking purposes

Inherited from: \SugarWebServiceImpl::set_campaign_merge()\SugarWebServiceImplv3::set_campaign_merge()\SugarWebServiceImplv3_1::set_campaign_merge()
Parameters
Name Type Description
$session String

session -- Session ID returned by a previous call to login.

$targets Array

targets -- a string array of ids identifying the targets used in the merge

$campaign_id String

campaign_id -- the campaign_id used for the merge

Returns
Type Description
\- No output
Details
Exception
'SoapFault' -- The SOAP error, if any  
methodpublicset_document_revision( String $session, Array $document_revision ) : Array
Parameters
Name Type Description
$session String

-- Session ID returned by a previous call to login.

$document_revision Array

-- Array String 'id' -- The ID of the document object String 'document_name' - The name of the document String 'revision' - The revision value for this revision String 'filename' -- The file name of the attachment String 'file' -- The binary contents of the file.

Returns
Type Description
Array - 'id' - String - document revision id
Details
Exception
'SoapFault' -- The SOAP error, if any  
methodpublicset_entries( String $session, String $module_name, Array $name_value_lists ) : Array
Parameters
Name Type Description
$session String

-- Session ID returned by a previous call to login.

$module_name String

-- The name of the module to return records from. This name should be the name the module was developed under (changing a tab name is studio does not affect the name that should be passed into this method)..

$name_value_lists Array

-- Array of Bean specific Arrays where the keys of the array are the SugarBean attributes, the values of the array are the values the attributes should have.

Returns
Type Description
Array 'ids' -- Array of the IDs of the beans that was written to (-1 on error)
Details
Exception
'SoapFault' -- The SOAP error, if any  
methodpublicset_entry( String $session, String $module_name, Array $name_value_list, Bool $track_view = FALSE ) : Array
inherited

Update or create a single SugarBean.

Inherited from: \SugarWebServiceImplv3_1::set_entry()
Parameters
Name Type Description
$session String

-- Session ID returned by a previous call to login.

$module_name String

-- The name of the module to return records from. This name should be the name the module was developed under (changing a tab name is studio does not affect the name that should be passed into this method)..

$name_value_list Array

-- The keys of the array are the SugarBean attributes, the values of the array are the values the attributes should have.

$track_view Bool

-- Should the tracker be notified that the action was performed on the bean.

Returns
Type Description
Array 'id' -- the ID of the bean that was written to (-1 on error)
Details
Exception
'SoapFault' -- The SOAP error, if any  
methodpublicset_note_attachment( String $session, Array $note ) : Array

Optionally you can set the relationship of this note to Accounts/Contacts and so on by setting related_module_id, related_module_name

Parameters
Name Type Description
$session String

-- Session ID returned by a previous call to login.

$note Array

'note' -- Array String 'id' -- The ID of the Note containing the attachment String 'filename' -- The file name of the attachment Binary 'file' -- The binary contents of the file. String 'related_module_id' -- module id to which this note to related to String 'related_module_name' - module name to which this note to related to

Returns
Type Description
Array 'id' -- String - The ID of the Note
Details
Exception
'SoapFault' -- The SOAP error, if any  
methodpublicset_relationship( String $session, String $module_name, String $module_id, String $link_field_name, array $related_ids, array $name_value_list, integer $delete ) : Array
inherited

Set a single relationship between two beans. The items are related by module name and id.

Inherited from: \SugarWebServiceImpl::set_relationship()\SugarWebServiceImplv3::set_relationship()\SugarWebServiceImplv3_1::set_relationship()
Parameters
Name Type Description
$session String

-- Session ID returned by a previous call to login.

$module_name String

-- name of the module that the primary record is from. This name should be the name the module was developed under (changing a tab name is studio does not affect the name that should be passed into this method)..

$module_id String
  • The ID of the bean in the specified module_name
$link_field_name String

link_field_name -- name of the link field which relates to the other module for which the relationship needs to be generated.

$related_ids array

related_ids -- array of related record ids for which relationships needs to be generated

$name_value_list array

-- The keys of the array are the SugarBean attributes, the values of the array are the values the attributes should have.

$delete integer

-- Optional, if the value 0 or nothing is passed then it will add the relationship for related_ids and if 1 is passed, it will delete this relationship for related_ids

Returns
Type Description
Array - created - integer - How many relationships has been created - failed - integer - How many relationsip creation failed - deleted - integer - How many relationships were deleted
Details
Exception
'SoapFault' -- The SOAP error, if any  
methodpublicset_relationships( String $session, array $module_names, array $module_ids, array $link_field_names, array $related_ids, array $name_value_lists, array $delete_array ) : Array
inherited

Set a single relationship between two beans. The items are related by module name and id.

Inherited from: \SugarWebServiceImpl::set_relationships()\SugarWebServiceImplv3::set_relationships()\SugarWebServiceImplv3_1::set_relationships()
Parameters
Name Type Description
$session String

-- Session ID returned by a previous call to login.

$module_names array

-- Array of the name of the module that the primary record is from. This name should be the name the module was developed under (changing a tab name is studio does not affect the name that should be passed into this method)..

$module_ids array
  • The array of ID of the bean in the specified module_name
$link_field_names array

-- Array of the name of the link field which relates to the other module for which the relationships needs to be generated.

$related_ids array

-- array of an array of related record ids for which relationships needs to be generated

$name_value_lists array

-- Array of Array. The keys of the inner array are the SugarBean attributes, the values of the inner array are the values the attributes should have.

$delete_array array

int $delete_array -- Optional, array of 0 or 1. If the value 0 or nothing is passed then it will add the relationship for related_ids and if 1 is passed, it will delete this relationship for related_ids

Returns
Type Description
Array - created - integer - How many relationships has been created - failed - integer - How many relationsip creation failed - deleted - integer - How many relationships were deleted
Details
Exception
'SoapFault' -- The SOAP error, if any  
Documentation was generated by DocBlox 0.18.1.