Hi all,
I have an issue with using the getuserprofilebyname service.
I can use it to auto populate the person picker on a new item, I can even do it upon editing an item. What I can't figure out is how to use upon editing an item, in case it was blank when opening the the item for editing.
What I'm trying to achieve is this:
Once an item is created there is droplist whit the default value of pending. Usually the item will be saved in this status. Later on someone will come and edit the item, at which time he will change the pending value to something else. Upon this change I'm want the editor name to fill the person picker. Later on the item might be edited again, and I need to continue changing the person whenever the value of the droplist changes.
In case the value is pending, I want it to be blank.
Everything seems to work (I used rules to invoke the change upon vale change, and I set the values of: Accountype, AccountId, and Display name), unless I save the form with no value in the person picker. Once i save it like this no matter what I do, I'm unable to automatically populate the field. What's even weirder is that I'm able to save the form with a seemingly empty person picker (I have a validation rule against saving and empty picker with a non-pending droplist value). I can't however save it like this with a new item, which suggests that the rule works. and that the picker isn't empty. for some reason though it seems empty.
Any suggestions