Skip to Content
0

SAP IDM REST API V72ALPHA - ContextID doesn't work

Jul 05, 2017 at 11:01 AM

54

avatar image
Former Member

Hello Experts,

I'm using IDM REST API v72alpha to grant business role to user. It works like a charm except if I want to set a context to the role.

According this link I have to set the value CONTEXTID=MSKEYOFTHECONTEXT, but It doesn't work.

Below my code

var parameters = {
				"MXREF_MX_ROLE" : {
					"VALUE" : "46054",
					"CONTEXTID" : "129785",
					"REASON" : "New assignment request with context only",
				}
			};


			var url = ProxyUtil.proxyfiAddress(JsonUrlCfg.v72Home() + this._mskey + "/tasks/" + taskIdManageUserAssignments);


			// Close the dialog
			if (this._oDialog != null) {
				this._oDialog.close();
			} else {
				this._oDialog = sap.ui.xmlfragment("com.idm.ui5.fragments.ReviewAssignment", this);
				this._oDialog.close();
			}


			// Post data
			var oModel = new sap.ui.model.json.JSONModel();
			oModel.loadData(url, parameters, true, "POST", false, false, headers);


			// Show information
			MessageToast.show(JsonUrlCfg.getResourceText("businessRoleAssignmentComplete", [ this._selectedRoleDisplayName ]));

And the POST return me this error

Do you have any idea what I'm doing wrong?

Thanks for your help!

sans-titre.png (11.9 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
avatar image
Former Member Sep 20, 2017 at 11:10 AM
2

Hey Nicolas,

had the same issue. Please try this notation:

{
"REFERENCED_ID":46054,
"CONTEXT":{
"CONTEXT_ID":129785
},
Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Oct 09, 2017 at 06:31 AM
0

I will try thanks a lot Hendrik

Share
10 |10000 characters needed characters left characters exceeded