Confirm popup on submit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-19-2017 03:53 PM
Hello experts,
So I'm trying to get a confirmation pop up to work onSubmit off a referenced field in a SCOPED APP. I want to say get the display value from the 'source' field and put it in the confirm box. I've checked to make sure the display is 'true' for 'name' on source table. trying this following code, but not working for me.
If I do getValue('source'), then I get a sysid back, so that tells me since it's a reference, I need to dot walk it. But can't seem to figure it out. Please help! Thanks.
function onSubmit() {
var source = g_form.getDisplayValue('source.name');
var confirm = confirm("Are you sure "+ source + " is correct?");
if (confirm == false){
return false;
}
}
- Labels:
-
Scripting and Coding
-
Team Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-19-2017 05:30 PM
can you post your complete code?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-19-2017 05:48 PM
Hi, this is the complete code -
function onSubmit() {
var source = g_form.getDisplayBox('source.name').value;
var confirm = confirm("Are you sure "+ source + " is correct?");
if (confirm == false){
return false;
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-19-2017 05:52 PM
try like below
function onSubmit() {
var source = g_form.getDisplayBox('source.name').value;
var confirm = confirm("Are you sure "+ source + " is correct?");
if (answer==true)
{
gsftSubmit(null, g_form.getFormElement(), '[your_action_name]'); //MUST call the 'Action name' set in this UI Action
}
else
{
return false;
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-19-2017 06:09 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-19-2017 06:19 PM
if below code does not work, please post the screen grab your onSubmit client script.
function onSubmit() {
var source = g_form.getDisplayBox('assigned_to').value;
var answer=confirm("Are you sure "+ source + " is correct?");
if (answer==false)
{
return false;
}
}