The CreatorCon Call for Content is officially open! Get started here.

how to restrict the requestor to submit single request

Are Kaveri
Tera Contributor

Hi ,

 

I have one scenario for one of my requirements,

 

We have a record producer form and custom table.

 

As Requestor i need to submit only one request and if requestor tries to submit another he should not be able to submit the request and get a popup saying you have already submitted a request on record producer form.

 

How to check this scenario?

 

3 REPLIES 3

Sonam_Tiwari
Kilo Sage

Hi @Are Kaveri ,

 

You can write an OnSubmit script to restrict this. Do a GlideAjax, and in your script include, create a function where you will do a gliderecord for your custom table, check with this requestor, if there exists a record for them, return true. Back in you onSubmit script, if the return value is true i.e. there is an existing request submitted then add an error messase and return false.

Consider indicating the response as helpful and marking it as correct if it meets your needs.

@Sonam_Tiwari 

Please share me any sample script which will help me.

Sonam_Tiwari
Kilo Sage

@Are Kaveri ,

 

Something roughly like

sonamtiwari_0-1701065879863.png

 

 

sonamtiwari_1-1701065893110.png

 

 

But please adust in as per your requirement and refine the script.

Consider indicating the response as helpful and marking it as correct if it meets your needs.