0

In our AD database, the email addresses stored in Sharepoint are often wrong and cause problems for our sites. Unfortunately we don't get much assistance from our AD database administrators, so I need to find a fix around this.

Currently, I am doing the following:

workflow

If a specific field is empty, it creates a variable with the Login Name from a user picked from a People Picker field called Student. Then another variable is set to combine the first variable and @syr.edu to form the email address. Then it forces the Current Item to update with the variable Email Address. Lastly, it sends an email address with the updated Current Item.

However, this does not seem to work. Previously, I tried to just put the Email Address variable in the to: field and set it to an email address, but it would not send out. Any ideas on what might be missing? Or is there another approach?

  • I would start by putting a log entry after each step to show each value. So Log Current Item:Student, Log Variable: User ID, Log Variable: Email Address – Erin L Oct 13 '15 at 13:38
  • Why do you send to Current Item:Student and not to Current Item:SUID? Isn't the purpose of SUID field to store the real/up-to-date email address? Also: are you sure variable User IDstores what you expect? Did you check if Current Item:SUID contains the correct value? – Evariste Oct 13 '15 at 13:40
  • @Evariste SUID is a separate field from Student. Student is the People Picker field we use to get the Student's Information. SUID is just a text field we manually enter numbers into. Currently, I have User ID set to get the Login Name from the Current Item in Student. – Nicole Foster Oct 13 '15 at 13:46
  • @ErinL These are my logs when testing using myself: Current Item in Student = 830 (I set this field to show the Login Name so I'm not sure why that is appearing) User ID = AD\nafoster Email Address = nafoster@syr.edu Theoretically, if I tell the Current Item in the Student field to update with the Email Address variable, it should work, but it doesn't. – Nicole Foster Oct 13 '15 at 13:49
  • I'm not sure you can update a People field with a string variable containing the email address... – Evariste Oct 13 '15 at 15:37
0

Have you tried using your Email address variable in To filed rather than using the student field? Student field will not update if the email address that you are passing into it doesnt match the one in the AD.

  • This is something I have tried. I have set the To field as the Email Address variable and set it to output an email address, but it does not seem to work. – Nicole Foster Oct 13 '15 at 15:40
  • Is your Email Address string variable getting set with the email address? is your workflow getting to the email step? or is it failing at the update step? try removing the update step. Check in the ULS logs what is actually happening when your workflow tries to send email – HarryB Oct 13 '15 at 15:49
  • After looking into the logs after the update item step was removed, the email address generated for the Email Address variable is AD\nafoster@syr.edu which is causing the message not to send. Is there a way to remove the AD\ and just get the nafoster ? – Nicole Foster Oct 13 '15 at 16:48
  • There are utility actions for string manipulation in SP designer. So you can extract a substring from the Email Address variable or replace AD\ with blank space... – HarryB Oct 13 '15 at 16:58
  • Extract Substring from Index of String starting at 3 would accomplish what HarryB suggsted. – Erin L Oct 13 '15 at 17:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.