Module Click with Confirmation Dialog

DeltekDev
Tera Contributor

I have a use case where the principal wants to display a confirmation dialog to the fulfiller once they click the module in the filter navigator and if the fulfiller confirms then go to the incident form while applying a template: Lost/Stolen+Asset

 

I have tested the following in DEV as the Link type URL from arguments with the following supplied arguments:

 

 

 

javascript:confirm('Are you sure you want to do this?') ? window.location.href = 'now/nav/ui/classic/params/target/incident.do?sys_id=-1&sysparm_template=Lost/Stolen+Asset' : false

 

 

 

This triggers the confirmation dialog and if the user confirms it creates the incident using the supplied template but it redirects them to the new incident form rather than the created incident record form which is not ideal.

 

I suspect it is because I am using global window.location property.

 

Update: if I change it to (below) the following, it shows the correct record but opens it in a new window, thus losing the UI and navigation.

 

javascript:confirm('Are you sure you want to do this?') ? window.location.href = '/incident.do?sys_id=-1&sysparm_template=Lost/Stolen+Asset' : false

 

If you were to do this, how would you go about it?

0 REPLIES 0