Is there any alternative for available for gs.setproperty()

Anuja Jadhav
Tera Contributor

I am searching for alternative for gs.setproperty() .As it leads to the performance issue.

1 ACCEPTED SOLUTION

Mark Roethof
Tera Patron
Tera Patron

Hi there,

Is there any more help needed on your question?

If your question is solved with my answer, please mark the answer as correct. This will help others searching for a similar question, and will take the question off the unsolved list.

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

---

LinkedIn
Community article, blog, video list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

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

LinkedIn

View solution in original post

4 REPLIES 4

Prasad Pagar
Mega Sage

Hi @Anuja Jadhav 

I used is many times but never notice any major performance issue unless I am doing cache flush regularly which we mostly dont do.

Still if you want to set any value for current user in session you can use gs.getSession().putClientData();

OR

you can glide on property table and set the value.

Thank you
Prasad

Hi there,

"you can glide on property table and set the value."

That won't make a difference. A system property update causes a cache flush.

Kind regards,
Mark

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

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

LinkedIn

Mark Roethof
Tera Patron
Tera Patron

Hi there,

In theory indeed this can cause performance issues. Though it depends really on your usage. If you are just updating system properties once in a while, and even outside of office hours... you won't feel anything.

Though if you are using this to update system properties frequently, multiple times a month, etc.: Then re-design! Then using a system property isn't the correct way to go for your functionality. Instead, use a custom table to store regularly changing information.

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

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

---

LinkedIn
Community article, blog, video list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

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

LinkedIn

Mark Roethof
Tera Patron
Tera Patron

Hi there,

Is there any more help needed on your question?

If your question is solved with my answer, please mark the answer as correct. This will help others searching for a similar question, and will take the question off the unsolved list.

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

---

LinkedIn
Community article, blog, video list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

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

LinkedIn