on 2020 May 11 3:42 AM
Request clarification before answering.
Hello Juan,
you can use the User api. For it add this to your neoapp.json file:
And then add this to your controller:
var userModel = new sap.ui.model.json.JSONModel("/services/userapi/currentUser");
userModel.attachRequestCompleted(function () {
var userId = userModel.getData().name;
........
});
or with ajax
jQuery.ajax({
type: "GET",
contentType: "application/json",
url: "/services/userapi/currentUser",
dataType: "json",
async: false,
success: function (data) {
_userId = data.name;
_displayName = data.displayName;
......
}
});
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
62 | |
8 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.