Hello there,
i made a custom routing, so that users asssigned in a form will redirected to the right form.
I am the owner.
Unfortunately this is not working anymore. I do not know what happened, because i have not made any changes (as far as i remember).
The problem is that the OWNER is redirected to the INCOGNITO-Formset instead of the first one at the top. 4b18c612-31e4-4763-8ae9-6422e4a75fe0
var web = new Web('https://mysite.mylist');
return web.siteGroups.getByName('Besitzer von Ideenmanagement').users.get().then(function(result) {
return pnp.sp.web.currentUser.get().then(function(currentUser){
for (var i = 0; i < result.length; i++) {
if(result[i].Email == currentUser.Email){
return '4b18c612-31e4-4763-8ae9-6422e4a75fe0';
}
else if (item) {
var user;
return web.currentUser.get()
.then(function(u) {
user = u;
return item.get();
})
.then(function(item) {
//Fachprüfer
if (user.Id == item.Fachpr_x00fc_fer_PersonId) {
return '358c9335-0ed3-4ac2-94bb-f7e70702b113';
}
//Gremiummitglieder
else if(user.Id == item.GremiumbesetzungId) {
return '91e19746-6e95-4ec2-909c-72ba068ed9da';
}
//Umsetzer
else if(user.Id == item.UmsetzungsverantwortungId) {
return 'e901c555-1b11-48bd-b799-d8f046f5d00f';
}
//Incognito
else if(user.Id != item.AuthorId) {
return '3b12f956-986e-4b3a-9f7b-826009c604ac';
}
//Sonst Default Form wenn Ersteller
});
}
}
});
}).catch(function(err) {
alert("Group not found: " + err);
});
Any suggestions for that?