on 01-14-2014 8:07 PM
Hi
I am trying to get the User Menus using NetWeaver UI Services, however it doesnot return the correct entries. The services are activated in SICF, I can get the User Details but not able to get the Menus
Here is the code,
var user = sap.ui2.shell.getUser();
user.load(
{
// depthAtRoot: 1,
// nodeId: " ",
// depthAtNode: 1
},
function() {
//set user data in the json model
Alert(user.getFullName());
//Get the Menus
var menus = user.getMenu().getEntries();
var length = menus.length;
alert("length::"+length); //Length returned is Zero
},
function(sErrorMessage) {
/* failure handler: e.g. display load error */
alert(sErrorMessage);
}
);
What could be wrong here?
Regards
Have you checked the backend configuration, i.e. have you created/assigned a role to the user?
If you used Chrome devtools what do you see in the response?
Jason
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Jason
Thank you for your reply.
in the Devtools, if I click on the Start up file - here is I see
{"client":"400","dateFormat":"1","email":"","firstName":"Test","fullName":"Test_GW","id":"Test_GW","language":"EN","languageBcp47":"en","lastName":"Test ID -","menu":null,"numberFormat":"","rtl":false,"system":"BB2","theme":"","timeFormat":"0","timeZone":"UTC","welcomeMessage":"","isJamActive":false,"initialTarget":[]}
Is this the correct response I am looking at? Looks like Menu field is null.
In the backend, the User does have a role assigned..And if I open up the role in PFCG - I can see 3 items under menu.
Is this the correct way to assign the links?
Thank you
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.