Categorii adresati - multiple lookup choice of categories of users - Managers,Audit, AccountManager
User must select branch office (it can be some multiple select)For example Branch1,branch2
and select category of user for example - Managers, Audit
In field cat i would like to populate all Managers and Audit users from Branch1,branch2.(fd.field('cat').value=group1;group2)
I have now all security groups Active Directory, but how to make this, need help.
and where i need to setup all this groups.
@mnikitina
Yes, AD user profiles are synchronized with Sharepoint and Active Directory security groups with email enabled are synchronized with SharePoint( i can grant permissions and send email to them) in sharepoint i see only name of security group, but can't see members ,as it seen in Sharepoint group.
i tried to get extra fields from lookup, but it works only with one choice in lookup. if my lookup is multiple i can't get values - undefined
I tried your code, but have some error:
Previosly i used like this fpr SharePoint groups, to check user membership
function showHideFields() {
// get all groups the current user belongs to
var userId = _spPageContextInfo.userId;
var userGroups = [];
pnp.sp.web.siteUsers.getById(userId).groups.get()
.then(function(groupsData){
for (var i = 0; i < groupsData.length; i++) {
userGroups.push(groupsData[i].Title);
}
//check if the user is a member of Administrators user group
if (userGroups.indexOf('Administrators') >= 0) {
//Enable fields
fd.field('AdministratorFeedback').disabled = false;
fd.field('AdministratorComment').disabled = false;
}
//check if the user is a member of Managers user group
if (userGroups.indexOf('Managers') >= 0) {
//Show grid container
$('.manager-section').show();
}
});
}