Page 1 of 1

Element unlocking Bug?

Posted: Tue Oct 29, 2013 5:05 pm
by Darkhorse
Hi all

I created a TI to lock and unlock an individual element within a dimension using a TI to send the tm1users name to the properties cube Lock attribute, It works for an Admin but when a normal user uses the process it works perfectly for the Locking however for the unlocking it removes the name in the properties cube but still leaves it locked and greyed out,
I have tried updating the security settings but it remains locked until an admin unlocks it again. Is this normal behaviour? If there is no name in the cube should it not unlock straight away?

heres my code

Code: Select all

pType =  # parameter set when running
pUser= TM1User();
pCube = '}ElementProperties_Year';
pOpt1= '2013';

cubelockoverride(1);

#Lock an Element
                if(pType@='Lock');
                                CellPutS(pUser,pCube,pOpt1,'Lock') ;
                endif;

#Unlock an Element
                if(pType@='Unlock');
                                CellPutS('',pCube,pOpt1,'Lock') ;
                endif;
is this a bug?

thanks all

Re: Element unlocking Bug?

Posted: Tue Oct 29, 2013 7:15 pm
by jim wood
Have you set the process so that it can update security? Right click security access.

Re: Element unlocking Bug?

Posted: Tue Oct 29, 2013 8:07 pm
by lotsaram
In addition to security property being checked you need to make sure to use CubeLockOverride(1) in order to be able to do the unlocking.

Re: Element unlocking Bug?

Posted: Tue Oct 29, 2013 8:54 pm
by Darkhorse
Ive tried the right click for securities and that didnt work and the cube lock override is already in my program.

it still remains grey and locked even after the names removed