on 07-04-2008 8:28 AM
Hello!
It seems impossible to use the EVLCK function in a report so that a user can
see the workstatus of all entities even though the user hasn´t got the
access to the entities in the member access profile?
Does anyone have an idea how to work around this to create this kind of report? Beacause we want our user to change workstatus on their own entities and be able to see the worksstatus on all other entities.
Daniel,
I know that Joost Hoppenbrouwers recently did this in V5.
@JOOST; hope you can post the trigger code you are using.
Below some code I used in the 4.2 days, the difference with V5 is that each application had his own locking table now, so it needs some adjustments:
CREATE TRIGGER STATUSDUMMY ON dbo.tbllckfinance FOR INSERT, UPDATE, DELETE AS INSERT INTO tblStatusHistory SELECT a.category, a.entity, a.Status, a.Lastupdate, a.UpdateBy, a.Time, a.TimeName FROM tblStatus a WHERE a.Lastupdate not in (SELECT LastUpdate from tbllckfinancedummy)
Alwin
Edited by: Alwin Berkhout on Jul 4, 2008 2:22 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes here is the code I used to lock both finance and intercompany when I update the finance status:
-
--Trigger for Insert Queries
CREATE TRIGGER [dbo].[T_tblFinanceLock_Ins] ON [dbo].[tblFinanceLock]
FOR INSERT
AS
INSERT INTO tblIntercompanyLock (Category,Entity,Statuscode,LastUpdate,UpdateBy,[Time])
SELECT Category,Entity,Statuscode,LastUpdate,UpdateBy, [Time]
FROM inserted I
--Trigger for delete queries
CREATE TRIGGER [dbo].[T_tblFinanceLock_Del] ON [dbo].[tblFinanceLock]
FOR DELETE
AS
DELETE
FROM tblIntercompanyLock
FROM tblIntercompanyLock S INNER JOIN deleted D ON
S.Category = D.Category AND S.Entity = D.Entity AND S.[Time] = D.[Time]
-
-Joost
In addition to my previous post: of course the dimension names might be different in your application, based on which dimensions you use for the workstatus. In this case just rename the dimensions in the trigger code. If you take a look at the design of the tblfinancelock table first you will see which dimensions you need.
-Joost
It worked fine! Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Daniel,
Standard this is not possible because you need authorization to see an entity, to see the workstatus.
Possible solution might be:
- Create an extra cube with the same dimensionality
- set the security in this cube for the entity dimension so that everyone is allowed to see all entities
- create a trigger on the lock table of the original cube to update automatically the lock table of this new cube
Hope this helps,
Alwin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.