- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-25-2024 10:22 AM
Hi Developers,
Hope you are doing great!!
I am using two attachment fields in my ServiceNow Portal Form:
- A custom attachment field
- The OOB "Add Attachments" field.
The issue occurs when I attach a new template in the custom field, which results in any attachment in the OOB attachment field being removed or deleted. This behavior is not expected, and I need a solution where both attachment fields can function independently, allowing attachments to be uploaded and retained in both fields simultaneously.
Desired Outcome:
- Ensure that attachments added in the custom "Add Creator Attachment" field do not interfere with or remove attachments from the OOB "Add Attachments" field.
- Both fields should be able to retain their respective attachments.
Has anyone else encountered this issue? If so, how did you resolve it? Any guidance or solutions would be great help.
Thanks,
Krishnakant Yadav
Analysis
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-27-2024 01:35 PM
Hi Developers,
After multiple analysis and many attempts in Widget Script, Onchange Catalog client script, checking BRs, Inspecting portal forms at last found out that this is happenning because of Onchange of Add Creator Attachment" Catalog Client Script. After furthur investigation found out that we are calling one Script Include that is for File name validation on Add Creator Attachment. Additionaly few months back we have noticed one more issue for add creator attachment that if any attchment is already attched previously and we try to upload one more file without deleting the existing attachment then in attachmnet table two records were there for same table sys id which is not expected so we wriiten one more script include to delete that existing attachment record sys id.
Code -
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-27-2024 01:35 PM
Hi Developers,
After multiple analysis and many attempts in Widget Script, Onchange Catalog client script, checking BRs, Inspecting portal forms at last found out that this is happenning because of Onchange of Add Creator Attachment" Catalog Client Script. After furthur investigation found out that we are calling one Script Include that is for File name validation on Add Creator Attachment. Additionaly few months back we have noticed one more issue for add creator attachment that if any attchment is already attched previously and we try to upload one more file without deleting the existing attachment then in attachmnet table two records were there for same table sys id which is not expected so we wriiten one more script include to delete that existing attachment record sys id.
Code -