Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2024 05:54 AM
hi @Kri
g_form object is only available on forms and not on Service Portal pages.
In Service Portal, the equivalent object is '$sp'. This object provides methods and properties tailored for Service Portal widgets and pages, enabling you to interact with the Service Portal environment.
You would need to adjust it for Service Portal like this:
var fieldValue = $sp.getField('field_name'); // Assuming you're in a widget context
if (fieldValue === 'some_value') {
// Do something
}I hope my answer helps you to resolve your issue, if yes please mark my answer helpful and correct.
thank you
Rajesh