Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
Help with Builder function call
Kin_Yee
We found the following script in the LL8 Ospace area. If we could get this script (which is written in the new Oscript format) to work, When we run it in Debug we get ?object not specified?, right on the highlighted line [Object dapiCtx = .fPrgCtx.DSession()] when it tries to define the object. We are hoping that one of you might have some insight on this.Please take a look. function String GetRightIDs() Object dapiCtx = .fPrgCtx.DSession() string retVal = "" Integer id if ( $TypeVolRelease == .fRootSubType ) id = .fDapiNode.pVOLUMEID elseif ( IsDefined( .fDapiNode.pPERMID ) ) id = .fDapiNode.pPERMID else id = .fDapiNode.pID end RecArray recs = CAPI.Exec(\ dapiCtx.fDbConnect.fConnection,\ 'select RightID from DTreeACL where DataID=:A1 and See > 1',\ id ) if ( IsNotError( recs ) ) Record rec for rec in recs retVal = retVal + STR.ValueToString( rec.RightID ) + " " end else echo( "GetRightIDs: CAPI.Exec failed" ) end return retVal end
Find more posts tagged with
Comments
Dylan_Wright_(xisdylan_-_(deleted))
This is because .fPrgCtx (the program context) is undefined. This is set to an actual object ref. when the script is run externally, but for debugging a PrgCtx is not generated. I've modified a script to generate one for you for debugging purposes ONLY (caution - it generates an administrator prgCtx, so you're script will have permissions to completely break everything in livelink)create a new script feature and paste the contents in...then invoke it so:.fPrgCtx = .GimmeAPrgCtx().prgCtxGood luck and be careful.