Hello,
I read a lot of topic about this,
but in my case I think is little bit different.
I have a sharepoitn site where I invited external users (guest), and these users must be upload in the list their informations/documents.
I want that my forms retrieve their profile informations and populate the fields, but if I try to run form with my internal user no problem, while when my guest try i have this error in console:
This is the code:
function updateCurrentUserInfo() {
pnp.sp.profiles.myProperties.get().then(function(result) {
var props = result.UserProfileProperties;
console.log(props);
for (var i = 0; i < props.length; i++) {
switch (props[i].Key) {
case 'FirstName':
fd.field('Title').value = props[i].Value;
break;
case 'LastName':
fd.field('Supplier_x0020_Code').value = props[i].Value;
break;
}
}
});
}
fd.spRendered(function() {
//executes updateCurrentUserInfo on form load
updateCurrentUserInfo();
});
This is the console error:
How I can solve this issue?
Thank you.