Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2022 02:39 AM
I do not completely understand your current problem - maybe you want to rephrase it so me and the community can help you better.
Just my observations from this thread so far (hopefully it helps you):
To get the sys_id of the parent you should be using current.getValue('parent'). This will return you a string or null (if no parent exists - just a theoretical case).
current.demand yields a value type GlideElement. On GlideElement you cannot use getValue (so e.g. current.parent.getValue('parent') would result in a crash at least in Scoped Applications).
On Scoped Applications, getValue only works on GlideRecords (current most likely is one).