Adding a Record Update Diagram Element to a Flow
Functions
This diagram element is for updating instance records of platform objects, akin to using a "UPDATE" statement in a database.
Using the Record Update Diagram Element
- On the flow designer, choose Basic and drag the Record Update diagram element to the canvas.
- Click the Record Update diagram element, click
, and set basic information.
- Click
and complete the configuration.
- If you select Use fast update mode in the previous step, you need to specify a predefined object variable or object variable array and drag it to the variable text box. That is, the object variable is updated to the database according to the record ID in the object variable, and the updated value comes from the value in the object variable. As shown in the following figure, update the value of the object variable to the database according to the record ID in the object variable Accountupdate.
Figure 1 Fast update mode
Table 2 Parameters for the fast update mode Parameter
Description
Variable
Predefined object variable or object variable array.
The system updates the object variable to the database according to the record ID in the object variable. The value to be updated is obtained from the object variable. If the variable is an object array, the system updates the object variable array to the database in batches according to the record ID in the object variable.
You can drag a variable from the context or directly enter an object variable or object variable array.
Rollback if current process ends with error
When an error occurs in the current process, the system rolls back to the previous process.
This parameter is selected by default. Do not change the settings unless otherwise specified.
- If Use fast update mode is not selected in the previous step, you need to specify an object and set the values of some fields of the specified object in Condition. Set the target field to be updated and the updated value, search for the object record that meets the conditions, and update the value in Assignment to the database. As shown in Figure 2, update the name field of the Account object to Lily and set the id field to the value of the variable var_record_id.
Table 3 Parameters for the common update mode Parameter
Description
Object
Name of the object to be updated. Select an object from the drop-down list.
Rollback if current process ends with error
When an error occurs in the current process, the system rolls back to the previous process.
This parameter is selected by default. Do not change the settings unless otherwise specified.
Condition
After an object is selected, the fields of the object are displayed in this area. Click Add Row to set the conditions for updating data.
- Field Name: Select the target object field from the drop-down list.
- Operator: Select an operator from the drop-down list.
- Field Value: Drag a variable from Context or enter {!Variable name}.
Assignment
After an object is selected, the fields of the object are displayed in this area. To assign values to multiple fields, click Add Row.
- Field Name: Select the target object field from the drop-down list.
- Operator: Select the corresponding operator.
- Field Value: Drag a variable from Context or enter {!Variable name}.
Keep nil value assignments
When data is updated, null values in the data are not automatically ignored or deleted. Instead, they are retained as part of valid data.
- If you select Use fast update mode in the previous step, you need to specify a predefined object variable or object variable array and drag it to the variable text box. That is, the object variable is updated to the database according to the record ID in the object variable, and the updated value comes from the value in the object variable. As shown in the following figure, update the value of the object variable to the database according to the record ID in the object variable Accountupdate.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot