I need give access to user by code to a Record. Like when you access to the access right in the object and add read/edit/delete permitions.
If you want to distribute the access rights to records automatically, you need to use Change access rights element and configure the process in the way you want: https://academy.bpmonline.com/documents/technic-bpms/7-11/change-access-rights-process-item
This element can give such permissions to records automatically.
Sure, you can make it by SQL queries or JS but the standard change access rights functionality is implemented by the business process that can be called by trigger or you can call in the backend code as it is described in our development guide: https://academy.bpmonline.com/documents/technic-sdk/7-11/how-run-process-client-module