I need to get location ID of parent item in Controls hierarchy and use code STRUCTMGR.fGetLocationParent("Controls", RES.PlngLocKey).
The code works fine in Custom scriptes, inc. Custom web scripts, but unfortunately doesn't work in Event scriptes (AfterFileImport).
For example, RES.pstrActionValue = "lngLocKey " & RES.PlngLocKey & ", ParentKey = " & STRUCTMGR.fGetLocationParent("Controls", RES.PlngLocKey) is ignored entirely, not only last part related to STRUCTMGR. Error 424, Object required is raised, however there are no errors in username.err file.
And I can't understand why there is error and why it works fine in Custom scripts.
What should I do to make STRUCTMGR.fGetLocationParent("Controls", RES.PlngLocKey) works in Event script?
There is a workaround of my problem. I can ask table in FDM schema select startlocationid from tstructpartitionlinks where structureid = 'CONTROLS' and endlocationid = :loc in Event script. But the fact that normal way using FDM API function STRUCTMGR.fGetLocationParent isn't working is still strange to me.