Get Access to RecordID in JS (and submit rules) when creating new records

I’m not sure if this post is referring to the same thing

Once a record is created the record Id is available because we can navigate to the record detail page - and use it in a notification
A. I think it’d be cool if we can show if in the success message but
B. More importantly, how can we easily access this in the JS ?
Im sure more advanced users can creat a webhook and retrieve the record Id, But i feel like Im missing something simple - there must be an easy way to get the record ID on the successful form submission?