Save user provided comments in custom table field in Portal.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2023 02:15 AM
Hello Community,
Could help on this!
As bigginer to ServiceNow, Developed a clickable button using spModal.open() method in portal.
When click button window is populating inside the window user should provide comments. I am facing difficulty in to store those comments in a server with respect to the record.
The User provided comments should update in table Record.
Thanks in Advance!
HTML:
Client Script:
c.reject = function(){
c.comments='';
spModal.open({
title:'Comments',
message:'Please provide comments here:',
input:true,
value:c.comments,
}).then(function(comments){
c.comments=comments;
})
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2023 03:12 AM
Best way is to go to the widgets table and query fields or look for similar widgets. You have to send the data to the server-script who will input it in the worknote/comments , or custom table field.
The work_note/comment fields are actually saved in the journal table and referenced to the record it's being saved.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2023 10:48 PM
Hi @4b0d3 ,
Thanks for reply!
Could you please explain with code to store or update the user provided comments in custom table field through server script and client side script.
Regards,
Mad3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2023 10:21 AM
Hi @Mad3 ,
Were you able to achieve this? I also have the exact same requirement and I tried multiple ways to achieve the same. But I failed everytime!
looking for help..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2023 10:49 PM
Hello @Arpitha2 ,
Sorry I couldn't get solve this yet. I can able to popup but provided comments not able to save in a table in related field. If you get solution can ping here.