Retrieve record ID after insert

After inserting a record how do I get the new record ID back so I can use to load a table?
I am working on a job manager type page where the user will create new jobs and then add tasks, comments, and upload files for that particular job.
Currently, I display a list of jobs created for the user and sort the jobID as a variable that is used to populate three other tables.
What I want to happen is after a new job is created the new jobID is passed back to the variable and the other tables reloaded.
The only part I can’t figure out how to do is to get the jobID back after inserting the record. I have tried adding the insert to a serverconnect and then getting the identity after inserting but that did not work. I also try using the identity in the server action to query the database using the identity in the same server action as the insert. That also didn’t work.

Community Page
Last updated: