When updating a record via 4D Open, you should always check to see if the record in question on the server is currently locked. When using commands such as OP Goto selected record, OP Goto record, or OP Load record you will always be returned the locked status of the record. As shown in our example below, after our call to OP Goto selected record we check the status of the record. If the record is not locked we continue with our update. If the record is locked, we alert the user.
$ErrCode:=OP Goto selected record (vl_ConnectID;$TableNum;$RecNumber;vl_BindID2;$LockStatus)
ALERT("Record is currently locked.")
$ErrCode:=OP Update record (vl_ConnectID;vl_BindID2)
$ErrCode:=OP Unload record (vl_ConnectID;$TableNum)
$ErrCode:=OP All records (vl_ConnectID;$TableNum)
$ErrCode:=OP Selection to array (vl_ConnectID;vl_BindID)