Which syntax should I used instead of 'current' in client script.When I use 'current' it is getting run time error and showing the message 'The object "current" should not be used in client scripts.'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2016 12:13 AM
Which syntax should I used instead of 'current' in client script.When I use 'current' it is getting run time error and showing the message 'The object "current" should not be used in client scripts.'
- 9,991 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2016 12:21 AM
Hi Soumen,
current is used in server side scripting.
You can use g_form instead of current in client script.
Thanks
Mihir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2016 12:30 AM
Thanks Mihir.It is working I am quite new with service now so i am facing this types of problem in regular basis
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2016 12:36 AM
Ok.
Please go through below link.It might helpful to you to learn scripting in ServiceNow.
Script in ServiceNow - ServiceNow Wiki
Thanks,
Mihir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2016 12:23 AM
What are you trying to achieve in the first place with client scripts that you need to use the "current" object?
For client scripts you can use g_form to set or get values.
Regards,