The CreatorCon Call for Content is officially open! Get started here.

g_form.getParameter("sysparm_item_guid"); is not working on service portal

ArcRaj
Giga Contributor

Hi all,

g_form.getParameter("sysparm_item_guid"); is not working  on service portal  AND

g_form.getUniqueValue() is also not working

is there any alternate way.

 

 

1 ACCEPTED SOLUTION

Harsh Vardhan
Giga Patron

in newyork its available , without writing a single code. 

 

find_real_file.png

 

Give a try. 

View solution in original post

13 REPLIES 13

Even on Madrid this is already available 🙂

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

agreed 🙂

Like I mentioned:

var cat_id=g_form.getUniqueValue();

This does not give you the sys_id of the form you are trying to submit. This gives you the sys_id of the Catalog Item itself. So using cat_id doesn't make any sense.

Have a look at the article I shared. You can achieve this No Code, and still if you are after code: proven working example script is in the article.

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP

---

LinkedIn
Community article list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

can you add screenshot of your catalog item. 

that option should  be available. 

Right click on header >> configure form layout >> add "Mandatory Attachment" field on form. see if you will able to add.