This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision |
| pr_methods:setreferences [2023/04/05 04:32] – ↷ Links adapted because of a move operation sean | pr_methods:setreferences [2023/05/03 04:54] (current) – sean |
|---|
| {{tag>Programmers_Reference Methods IEntity_Interface IEntity_Interface_Methods SetReferences}} | {{tag>Index Programmers_Reference Methods IEntity_Interface SetReferences Index}} |
| ====setReferences (String, ObjectReference [])==== | ====setReferences (String, ObjectReference [])==== |
| <code java>public void setReferences (String attributeName, ObjectReference [] refs) | <code java>public void setReferences (String attributeName, ObjectReference [] refs) |
| throws InvalidParameterException</code> | throws InvalidParameterException</code> |
| |
| This method sets references of the business object or notification. Note that if the ''[[pr_methods:updateentity|updateEntity]]'' method of the [[docs:3500:0300_add_custom_processes:0315_iexecutionengine_interface|IExecutionEngine]] interface is used to update the business object in the database after setting its references the system will delete any existing references of the business object and add whatever references are set by the ''setReferences'' method. If, however, the ''setReferences'' method sets the value to ''null'' and then the ''[[pr_methods:updateentity|updateEntity]]'' method is called, the null value is interpreted by the system as “no change” so no existing references are deleted. To clear existing references use the [[pr_methods:deletereferences|deleteReferences]] method in the [[docs:3500:0300_add_custom_processes:0315_iexecutionengine_interface|IExecutionEngine]] interface. | This method sets references of the business object or notification. Note that if the ''[[pr_methods:updateentity|updateEntity]]'' method of the [[docs:3500:0300:0315|IExecutionEngine]] interface is used to update the business object in the database after setting its references the system will delete any existing references of the business object and add whatever references are set by the ''setReferences'' method. If, however, the ''setReferences'' method sets the value to ''null'' and then the ''[[pr_methods:updateentity|updateEntity]]'' method is called, the null value is interpreted by the system as “no change” so no existing references are deleted. To clear existing references use the [[pr_methods:deletereferences|deleteReferences]] method in the [[docs:3500:0300:0315|IExecutionEngine]] interface. |
| ===Parameters=== | ===Parameters=== |
| |''attributeName''|the name of the attribute of the business object or notification the references of which are being set (must be of the reference type)| | |''attributeName''|the name of the attribute of the business object or notification the references of which are being set (must be of the reference type)| |