on 2017 Aug 03 8:17 AM
Hi everyone! Is anybody knows how to get security info about user (like Team, Task Profile, Data Access Profile) using the API VBA in Excel? This info is needed to determine ability to push the button on a report sheet.
Request clarification before answering.
The only way it can be done using write back badi:
In write back badi you check for some specific dummy members intersection and reject the value with error message!
In this error message you provide string with Team, profile etc... (define some format to parse later).
Then you create extra worksheet with some input form that will write some value to the specific dummy members intersection.
In VBA use:
Option Explicit
Public api As New FPMXLClient.EPMAddInAutomation
Public submres() As FPMXLClient_OlapUtilities.SubmitResult 'Array!!!
Public Sub SubmitData()
Dim lngTemp As Long
submres = api.SubmitWorkSheet(ThisWorkbook.Worksheets("Sheet1"))
For lngTemp = 0 To UBound(submres)
MsgBox CStr(submres(lngTemp).ErrorMessage)
Next lngTemp
End Sub
ErrorMessage will contain required info!
Don't forget to add references:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vadim!
Thank you very much for good idea.
But unfortunately ErrorMessage (and other properties) not contaned info about user security. Only info about target slice. Perhaps this is due to the choice of a node member for writing. maybe i have to get different error, wich return report with requaired info?
Time to learn 🙂 And it's not a hard work - like 50 lines of code!
Look on the old sample (still valid!)
User | Count |
---|---|
80 | |
30 | |
9 | |
9 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.