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?

7
  • 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, 2015 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, 2015 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. Oct 13, 2015 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 = [email protected] 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. Oct 13, 2015 at 13:49
  • I'm not sure you can update a People field with a string variable containing the email address...
    – Evariste
    Oct 13, 2015 at 15:37

1 Answer 1

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.

6
  • 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. Oct 13, 2015 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, 2015 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\[email protected] which is causing the message not to send. Is there a way to remove the AD\ and just get the nafoster ? Oct 13, 2015 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, 2015 at 16:58
  • Extract Substring from Index of String starting at 3 would accomplish what HarryB suggsted.
    – Erin L
    Oct 13, 2015 at 17:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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