Need Pop Up window to enter date field to update the existing record with the date
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-21-2016 02:54 AM
Hi Guys,
my situation is i need to create list of records from one table to another table. Before creating the record in another table i need a pop up window where i can enter the date and the date needs to be update in the selected record. then only the new records have to be created in another table.
Please find my below code. I am able to create list of records in another table. and i am able to update list of selected report using pop up. now both are not happening same time. some one help me to resolve issue.
Thanks in Advance
Malaisamy J
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-21-2016 03:03 AM
Hi Malaisamy,
If my understanding is correct, you want a popup window while clicking the button and it should get date and create new records along with date which entered.
To achieve that, Please create one ui page and in ui action script run the page and pass the values and from UI page create records with date.
Refer,
http://wiki.servicenow.com/index.php?title=GlideDialogWindow_API_Reference
http://wiki.servicenow.com/index.php?title=Displaying_a_Custom_Dialog#gsc.tab=0
GlideDialogWindow: Advanced Popups Using UI Pages - ServiceNow Guru
http://www.servicenowguru.com/system-ui/glidedialogwindow_popup_record_list/
- Mansoor
-- Mark Helpful or Correct as applicable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-21-2016 03:11 AM
Hi Mansoor,
I have tried that also. My Requirement is different. I will explain clearly.
We have a list of records. which will not contain a field called service month which we will update once the record is created. This field wont be available in the parent table(Source Table). but it will be available in child table(target table). In between this we need a field called service month as a pop up and it needs to be updated in child table(target table) along with parent table value(source table value).
I am very new to coding. So if possible could you please explain me step by step.
Thanks for the reply
Malaisamy J
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-21-2016 03:05 AM
Create custom view and call a that in ui action using glidedialogue window api.
in the view place your list of fields you need to insert in another table.
GlideDialogWindow API Reference - ServiceNow Wiki
http://wiki.servicenow.com/index.php?title=Displaying_a_Custom_Dialog#gsc.tab=0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-21-2016 03:30 AM
Hi Balaji,
Could you please provide me the code.
I will give you the field names and table name. so that i can test in my instant.
var cal = new GlideRecord('x_isgi_isg_governa_pm_sl_s');
cal.initialize();
cal.s_wf=1;
cal.met_num = current.met_num;
cal.sla_id= current.sys_id;
cal.cl_name = current.client_name;
cal.sp_name = current.sp_name;
cal.sla_name = current.sla_name;
cal.met_type = current.m_type;
cal.sl_type = current.sl_type;
cal.sla_per_cate = current.sla_per_cat;
cal.cl_co = current.cl_co;
cal.cl_re = current.cl_re;
cal.tower = current.tower;
cal.type = current.type;
cal.priority_one = current.priority_one;
cal.priority_two = current.priority_two;
cal.exp_sl=current.exp_sl;
cal.min_sl=current.min_sl;
cal.sig_min_sl=current.sig_min_sl;
cal.sla_rep_fre=current.rep_fre;
cal.low_vol=current.low_vol;
cal.per_log=current.per_log;
//
cal.insert();
action.setRedirectURL('x_isgi_isg_governa_pm_sl_s_list.do');
This is the code i have used to create record in target table.
Source table; x_isgi_isg_governa_pm_sl_c
Target Table:x_isgi_isg_governa_pm_sl_s
Left hand side fields are source table fields
right hand side fields are target table fields
So here we are introducing the new date field which has to come as a pop and the date has to be update in all selected records at this field "serv_month" and
then the selected records has to be created in target table along with this date value what user enters.
Thanks