- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2017 08:09 AM
Hi All,
I'm trying to add a confirm box on a record producer for our service portal. I've got the below code, when I go through the 'try it' button the confirm box appears, but regardless of if I select 'ok' or cancel it still submits the record. I need it to only submit if 'ok' is selected and to return to the form if 'cancel' is selected.
My other issue is when I tried to run this by logging into the portal when I clicked submit on my form the confirm box never appeared?
Any help is greatly appreciated.
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2017 08:12 AM
I haven't done anything in the service portal, but I believe you need to return the confirm response
so
function onSubmit() {
return confirm("Please confirm");
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2017 08:12 AM
I haven't done anything in the service portal, but I believe you need to return the confirm response
so
function onSubmit() {
return confirm("Please confirm");
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2017 08:21 AM
Hi Chris,
Thanks for the quick response. That has worked and now returns to form if cancel is selected.
I still have the issue however where this is working when I go through the 'try it button, but if I actually log into the portal it is not working any suggestions?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2017 08:52 AM
That's unfortunately where I can't help you yet. From my understanding client scripts work completely different in the Portal, but we have not started our Portal implementation and I've only glanced at it a few times.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2017 02:18 AM
After a bit of playing around I've managed to get it to work on the portal. It appears to be the UI type field that I had set to desktop. Once I changed this to both it then worked on the portal for me. Cheers for your help with the code earlier.