modify
Changes the specified record in the class table, resets the associated cache, and saves history. Modification may be prohibited by profile settings (modify_command|editable at the class/client object level).
As stated in the description above, the method modifies a specific record. The system does not support bulk modification by conditions. This is intentional to provide higher control by the developer and logging for changes. So far, there have been no tasks requiring bulk changes in such a short period that modifying records one by one (can be done in parallel) would not suffice.
If necessary, such a method may be developed and might appear in future versions of the core.
Input Parameters. IAPIQueryParams Interface
The id of the record to be modified and the fields you want to change.
Fields prohibited for modification in the profile (editable/server_editable/updateable/server_updateable) will be ignored.
You can also specify virtual fields, such as sysname, then the system will automatically go to the corresponding lookup, find the id of this value (most often from the cache), and substitute it into the corresponding physical field.
Applicable for virtual fields referencing lookups.
The system will check records for uniqueness according to the class/client object profile settings.
In case of non-uniqueness, the system will return an error (UserError) recExist (code: 105).
Output Parameters. IAPIResponse/IError Interface
In case of an error, the method will return an error object - an instance of UserError/MyError.
In case of success, the method will return the id of the modified record in the data object of the UserOk instance (res.data.id).