Attachment to Form issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2023 02:49 AM - edited 01-06-2023 03:54 AM
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,,,,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2023 08:02 PM
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
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2023 12:08 AM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2023 12:49 AM
did you check any client script or UI policy is clearing the field
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2023 12:52 AM
@Ankur Bawiskar ,Yes Ankur i have checked the client scripts and UI policies, but there is nothing to clear the field value.