CheckIn

You can use the CheckIn function to lock an Optiva object to prevent modifications by another user.

Once the object is checked in, the object cannot be modified until it is checked out by an authorized user.

When to use

You can use this function:

  • When the object changes are finalised and is not modifiable for other users.
  • After the modifications are done and prevent any further modification.

When not to use

You cannot use this function during:

  • The modification when the objects must remain modifiable.
  • Temporary or draft objects that require modification.

Syntax

int CheckIn(string objSymbol, string objKey);

Parameters

Parameter Type Required Description
objSymbol string Optional

The symbol of the object.

Note: You can use empty quotation marks ("") for the current workflow symbol.
objKey string Optional

The key of the object.

Note: You can use empty quotation marks ("") for the current workflow symbol.

Return Value

The application returns a value one (1) if successful, and zero (0) if the operation is failed.

Side Effects

  • Prevents any modifications until the object is explicitly checked out.
  • The user who performed the check-in operation in audit logs is recorded.
  • The object is available for checkout by other authorized users.

Prerequisites

  • The user must have check-in permissions for the specified object type.
  • The object must have checkout/checkin functionality.
    Note: You must enable the IMPLICITLOCKING profile attribute.
  • The object locking rules and privileges must be applicable.

Examples

Example 1:
Check In Specific Formula
CheckIn("FORMULA", "FS-0010\0001");
Description
Locks the formula "FS-0010\0001", preventing any modifications until it is checked out again.
Example 2:
Check In Current Workflow Object
CheckIn();
Description
Locks the object upon which the workflow is launched (uses current workflow context).