Difference between revisions of "ChangeOwnerShipInfo"

From AgileApps Support Wiki
imported>Aeric
(Created page with "{{DISPLAYTITLE:changeOwnerShipInfo}} Change the owner of a record. ;Requirements: To perform this operation, you must either: :* Own the record, :* Be a [[Syste…")
 
imported>Aeric
 
(12 intermediate revisions by the same user not shown)
Line 6: Line 6:
:* Own the record,
:* Own the record,
:* Be a [[System Administrator]], or  
:* Be a [[System Administrator]], or  
:* Have [[Change Ownership of my Team’s Records]] permission and be working on a record that is owned by someone on your [[Team]].  
:* Have [[Change Ownership of my Team’s Records permission]] and be working on a record that is owned by someone on your [[Team]].  
 
{{Note|When adding a record with the [[addRecord]] method, it is only necessary to specify the owner in the requestParams:<br> &nbsp; <tt>requestParams.add("owner_id", "new user id");</tt>}}


;Syntax:
;Syntax:
:<syntaxhighlight lang="java" enclose="div">
:<syntaxhighlight lang="java" enclose="div">
Result result = __apiName__(String objectId, String fields, String criteria);  
Result result;
Result result = __apiName__(String objectId, String fields, String criteria
result = Functions.changeOwnerShipInfo(String objectName, String recordId,
                            [, Parameters params] );
                                      String ownerId [, Boolean notifyEmail] );
Result result = __apiName__(String objectId, String fields, String criteria);
Result result = __apiName__(String objectId, String fields, String criteria,
                            String sortBy, String sortOrder,
                            String sortBy2, String sortOrder2,
                            int offset, int numberOfRows);
</syntaxhighlight>
</syntaxhighlight>


;Parameters:
;Parameters:
:;objectId:The object identifier
:'''objectName -''' The object name or identifier
:;fields:A comma-separated list of names of the fields to retrieve
:'''recordId -''' The record identifier
:;criteria:A [[JAVA API:Filter Expressions in JAVA APIs|filter expression]] that specifies records to select.
:'''ownerId -''' User ID of the new owner.
:;params: Optional. A [[Parameters Class|Parameters]] object that contains additional parameters.
:'''notifyEmail-''' An optional parameter. Set to true to send the new owner an email notification.
::*...other parameters...


;Returns:
;Returns:
:[[Result Class|<tt>Result</tt>]] object<br/>
:[[Result Class|<tt>Result</tt>]] object<br/>
--or--
:An integer containing ...
:A string containing ...


;Throws:
;Throws:
:Exception
:Exception
 
<!--
;Example:This example ....
;Example:This example ....
:<syntaxhighlight lang="java" enclose="div">
:<syntaxhighlight lang="java" enclose="div">
...
...
</syntaxhighlight>
</syntaxhighlight>
<noinclude>
--><noinclude>


[[Category:Java API | changeOwnerShipInfo]]
[[Category:Java API | changeOwnerShipInfo]]
</noinclude>
</noinclude>

Latest revision as of 00:34, 18 November 2014

Change the owner of a record.

Requirements

To perform this operation, you must either:

Notepad.png

Note: When adding a record with the addRecord method, it is only necessary to specify the owner in the requestParams:
  requestParams.add("owner_id", "new user id");

Syntax
Result result;
result = Functions.changeOwnerShipInfo(String objectName, String recordId,
                                       String ownerId [, Boolean notifyEmail] );
Parameters
objectName - The object name or identifier
recordId - The record identifier
ownerId - User ID of the new owner.
notifyEmail- An optional parameter. Set to true to send the new owner an email notification.
Returns
Result object
Throws
Exception