In the process management options of a Kintone App, you may have noticed that you can only auto-assign the creator of the record when a record is created. This sample code initiates the Update Status API after the record is added, and automatically assigns the first person listed in the User Selection field while also moving the process management on to the next status.
The Process Management Settings for the App must be enabled for this code to run.
The Process Management Settings can be found in the App Settings under General Settings. In the Assignee List for the second status, choose "Add a field for selection", and then select the User Selection field that will contain the user that you want to auto-assign to.
In the following screen capture, the selected User Selection field is named "Approver".
Assign only 1 user
This sample code assigns the first user listed in the User Selection field.
Assign multiple users
This sample code assigns all users listed in the User Selection field. In the Process Management settings, set the "Assignee List" of the status to "All assignees in the list must take action".
Refer to the Tutorial page, on how to add scripts to your app.
This sample only assigns the first user listed in the user selection field. Any other users will be ignored.