Service Desk Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

SD5 Primary email import

Highlighted
HPOPV+
Collector

SD5 Primary email import

hi all,
Usually when i import the "E-mail Addresses" form AD it will automatically update the "Primary E-mail Address" in the Person form this field is grayed out.
But when i change the email in AD and import it again, the "E-mail Addresses" is updated but the "Primary E-mail Address" is not updated.
what i know is
"E-mail Addresses" is part of the email template
"Primary E-mail Address" is part of the person template

i tryed to import the "Primary E-mail Address" as a field of the person template but it didnt work

any hint ??
Thanks
7 REPLIES
Elias Abboud
Honored Contributor

Re: SD5 Primary email import

Dear friend,

All you have to do is to set the Primary flag on the email that you want to be Primary E-mail Address. because Primary E-mail Address is not a seperate field. It is just a regular email with a flag set (primary).

So when you are importing emails from AD you probably only have one email per person.

If this is your case then while importing the email addresses, import a constant value of 1 to the ema_default field in the database table cdm_emailaddresses

But beware, if some persons have two or more email addresses, this would not work and it would also confuse SD since SD only expects one email to be primary.

In the case where some person items would have more than one email, I would import them in 3 steps:

1. import one email per person from AD (the one you want to be primary)
2. import a constant value of 1 to the ema_default field in the database table cdm_emailaddresses
3. import the remaining email addresses

Have fun
w salim 3al shabeb

PS: I am expecting no less then 10 points for this :)
If you can't solve it, post it :)
HPOPV+
Collector

Re: SD5 Primary email import

Hi Elias,

Thx for you reply;
In my case i only have one email address; for all the email i import i have the value 1 in ema_default
The primary email address is filled when i import it; but my problem is that when i modify the email form AD and import it again from the same templates and import mapping
the Email address will update but the primary email address wont notting that the primary flag is checked too;

i dont know if this is related cause the sp email that gives the username and password dont work the sp email uses the primary email address noting that the email hostname is the same as the one in the email address after the @
Thanks
Elias Abboud
Honored Contributor

Re: SD5 Primary email import

Hi Ziad,

This is very weird. if you have only one email and the primary flag is checked then the primary email address should be automaticaly filled for you.

Check the cdm_emailaddresses table after the second import. see if you have duplicate entries. and If yes then this might be the problem. SD expects one email to be primary so only one email should have the primary email flag set for each person item.

in your case, if you find repeated entries in the table then check the import settings. There is one setting that you can set for modifying imported entries instead of inserting new ones. But I do not exactly remember where and I don't have access to a sd server now.

Hope this helps
If you can't solve it, post it :)
HPOPV+
Collector

Re: SD5 Primary email import


Hi Elias ;
Thx for your reply ;
There are no duplicate email addresses in cdm_emailaddress.
NB: when I fix the email address manually the primary email address get updated
And when I delete the email address and put it again manually the sp email for the accounts and username works
Any hints?
Thx
David Borojevic
Frequent Visitor

Re: SD5 Primary email import

Hi Ziad,

Given you only ever have one email address for each person, simply feed a a fixed value of 'True' and map to the Primary field (might need to value map)
Elias Abboud
Honored Contributor

Re: SD5 Primary email import

Sorry for being so late to reply.

Well it looks to me like a bug or misconfiguration :(

I wish I could have earned one dollar for each bug I discovered since SD5 release :)

Did you know that SP1 is released? try patching things up and see what you get.

Hope this helps.
If you can't solve it, post it :)
HPOPV+
Collector

Re: SD5 Primary email import

Dear Freind,

Thanks for your reply, and thanks for notify me for the SP1 but i am not very happy with the SP1 realse caues concerning the role its is not a cash issue its some kind of bugs as you noticed and the SP1 localisation text is not stated in the patch documentation same as the primary email issue.
I didnt test SP1 yet. hope to see some results

Regards;
//Add this to "OnDomLoad" event