How to get the sys_id of the current form which is not yet submitted in portal?

Kannan Nadar
Tera Guru

Hi Team,

I am submitting a new record to a custom table on the portal, before submit I need to check if there are any attachments added to the form. I am using an onSubmit client script for this but when I try to query the sys_attachment table, I dont get any records. The g_form.getUniqueValue() returns -1.

Thanks,

Kannan