- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2016 10:50 PM
Use this code in your ui action:
var t=current.getValue('field_name');
var gr=new GlideRecord('table_name');
gr.addQuery('field_name!=""');
gr.query();
while(gr.next())
{
if(gr.field_name==t)
{
gs.addInfoMessage('There is a record with same invoice number');
//current.setAbortAction(true); //use this if you don't want to update the record or use current.update()
break;
}
else
current.update();
}
let me know if this helps.
Thanks
Priyanka
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2016 11:45 PM
Hi Malaisamy,
is it working?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2016 11:47 PM
Hi Priyanka,
It works perfectly... Thanks for the support
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2016 11:49 PM
Can you please mark the answer correct and close this thread so that others find it useful.
Thanks
Priyanka.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2016 12:51 AM
Hi Priyanka,
I am not getting the 'correct answer button'. SO that i have marked this as useful.
Let me know if you want me to do anything