Modify Attribute (modifyattribute)

An opening ID is an entry point used to customize business logic. modifyattribute modifies an attribute of an object.

Warning: This trigger is also fired at create.
Note: For more information about customization by business rules, see Installation and Setup: Customize: Behavior: Data Setup: Customization by Business Rules.

This page discusses:

Environment: Cloud only

General Information

This opening ID is a precommit trigger. For more information about the specifities of a precommit trigger, see About Precommit Triggers.

Definition Description
PLM Opening ID modifyattribute
Customization intent Not applicable
Execution context Cloud server

Input Objects

  • ThisObject (input) the object on which the trigger has been fired.
  • Parameters: RuleContext. For more information, see Installation and Setup: Customize: 3DEXPERIENCE Platform: 3DSpace Data Model: Unified Typing Reference Dictionary: Server Packages: Standard Types.
  • Validation (output) Boolean indicating if the rule has been validated.

Context Object Parameters

No context object parameters.

Sample

Trace(1, "Execution MyCATRule on ", ThisObject.PLM_ExternalID )
Report("Information", "infoMsg ", "attribute PLM_ExternalID changed to #", ThisObject.PLM_ExternalID )
	
if (ThisObject.PLM_ExternalID == "error")
{
	Parameters.Message = "This is an error"
	Validation = false
}
else
{
	Report("Warning", "warnMsg", "This is a warning")
	ThisObject.SetAttributeString("PLMEntity.PLM_ExternalID ", "modified by script")
	Validation = true
}