Skip to main content
1-Visitor
June 15, 2018
Question

infotable parameter of AddEntityVisibilities service

  • June 15, 2018
  • 1 reply
  • 1181 views

How to pass infotable here? I need to pass one OrganizationalUnit actually, which is not being added straightly, I need to create an infotable and then add it in this infotable... plz let me know if you have another workaround to add visibility based on the project name to a single Organizational Unit.

 

var params = {
organizationReferences: undiefined /* INFOTABLE */,
includeDependents: undiefined /* BOOLEAN */,
projectName: undiefined  /* PROJECTNAME */,
tags: undiefined  TAGS */
};
Resources["EntityServices"].AddEntityVisibilities(params);

 

Regards,

Abhishek kumar

 

1 reply

5-Regular Member
June 15, 2018

You can create an infotable with fields name and type .Name will hold the name of the organization to which you want to set the visibility as allow to the entities tagged with the project or tag name (These are also attributes in the service) .And type would be Organization .By this way you can set visibility of entities tagged with a tag name or project name and provide the organization name in the infotable name field .

 

Here is the full service code you can refer from -

 

var params = {
 infoTableName : "myInfoTable",
 dataShapeName : "entityservice"
};

// CreateInfoTableFromDataShape(infoTableName:STRING("InfoTable"), dataShapeName:STRING):INFOTABLE(entityservice)
var result1 = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape(params);

var newRow = new Object();
newRow.name = 'Org1';
newRow.type = 'Organization';
result1.AddRow(newRow);


var params = {
 organizationReferences: result1 /* INFOTABLE */,
 includeDependents: true /* BOOLEAN */,
 projectName: "MyProject" /* PROJECTNAME */,
 tags: undefined /* TAGS */
};

// no return
Resources["EntityServices"].AddEntityVisibilities(params);

 

1-Visitor
June 18, 2018

I have tried exactly the same steps except that I have tried this with OrganizationalUnit not with Organisation, but failed to do that. Actually, I am not able to add visibility for a certain group under that Organisation. I have found this(AddEntityVisibilities) service but with this, it is not straightforward as in case of AddEntityVisibility.

Regards,

Abhishek Kumar