User should not be able to update fields after submitted the form

sahana1998
Tera Contributor
 
3 ACCEPTED SOLUTIONS

function onLoad() {
    if(g_form.isNewRecord()){
              g_form.setReadOnly('description'false);// change the field name here
            }
    else{
              g_form.setReadOnly('description'true);// change the field name here
            }
}

View solution in original post

@sahana1998 

create onLoad client script on your table

function onLoad(){
	if(!g_form.isNewRecord())
		g_form.setReadOnly('nameField', true);
}

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

View solution in original post

@sahana1998 

As per new community feature you can mark multiple responses as correct.

If my response helped please mark it correct as well so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

View solution in original post

7 REPLIES 7

@sahana1998 

create onLoad client script on your table

function onLoad(){
	if(!g_form.isNewRecord())
		g_form.setReadOnly('nameField', true);
}

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

@sahana1998 

As per new community feature you can mark multiple responses as correct.

If my response helped please mark it correct as well so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

@sahana1998 

I already shared the answer 2hrs ago with the logic

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader