create a new module

divvi_vamsi
Mega Expert

I need to create a new module which asks for a new value from user and updates it in another table where the user wants to change/update a particular value.

for this i need to create a module and a form..can anyoone help with this.

Thanks

Divya

17 REPLIES 17

Thanks for the update Divya. So is the issue resolved now?


Yes, but my question is the "Create module " checkbox that you mentioned , is it not present in Istanbul or any other reason for me not able to see that? and also


how to write a while/if if there is only one Glide Record in the glide object?



Thanks


Divya


Can you please share screen sot when you hit New button on table, what you get.



to get one record from the table you can use get() function, you can avoid running query() with while/if: GlideRecord - ServiceNow Wiki


Hi Shishir



There might be cases with more than one record too...but most of the time it might be one record with the addQuery filter value.



Thanks


Divya


Something like should help you on your parent table with after update/insert BR.



var gr = new GlideRecord("Custom table name");


gr.addQuery("<Parent record field name>",current.sys_id);


gr.query();


while(gr.next()) {


gr.<FIELD NAME TO BE UPDATED> = current.<FIELD NAME FROM WHERE VALUE NEED TO BE PASSED>;


gr.update();


}