Attachment to Form issue

Mohan Mallapu
Kilo Sage

Hi All/ @Ankur Bawiskar ,

I have created one custom form which will have some fields eg : 'Category' and 'Sub-Category' and 'custom attachment field' as per the requirement not used the attach icon. and Created one On-Change Client script(When category becomes 'software' need make the sub category field read-only and auto fill with some value) ------> Until here it is working as expected.

After selecting the category , While trying to add an attachment using custom attachment field it was redirected to another page to choose the file and routed back to the existing form after added the file.

But in the form the sub-category value is getting cleared. We don't have anything to clear this sub category field.


Kindly help me why this read only field is getting cleared???
Thanks in advance,,,,

8 REPLIES 8

Ankur Bawiskar
Tera Patron
Tera Patron

@Mohan Mallapu 

when you select the file in file attachment field and return back the form gets auto-saved.

That's platform behavior or issue which you cannot control

So that might be the reason you sub category field is behaving in that way

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

HI @Ankur Bawiskar  Thank you for the quick  
But when auto save is happening , it should also save the field value right ?

Then why this read only fields alone got cleared in the form ? any specific reason or any solution to restore those back?

@Mohan Mallapu 

did you check any client script or UI policy is clearing the field

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

@Ankur Bawiskar ,Yes Ankur i have checked the client scripts and UI policies, but there is nothing to clear the field value.