This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Synch Mapping FK relation ADSAccount <> EX0Mailbox

Hello all,

I have a Synch-Mapping question.

I am in the AD Synch-Project mapping from the ADSAccount.

From that point, I want to have the values "EmailAddresses" which are stored in the table "EX0Mailboxes".

There is an FK relation from EX0Mailboxes to ADSAccount. How can I get the value EmailAddresses from EX0Mailboxes?

I tried with scripted properties but I cannot use
Connection.GetSingleProperty("EX0Mailbox","EmailAddresses", f.Comparision("UID_ADSAccount), $UID_ADSAccount$)
as the Connection object is based on VI.Projector and unfortunately I dont have any insight how to use it correctly.

Thanks, Fatih

Parents
  • Hi Fatih,

    the sample code for your read-script in the scripted property for your example with ADSAccount and EX0MailBox would look like the following.

    Imports VI.Projector.Connection

    Dim email = SystemObject.Connection.QueryObject(SystemQuery _
    .From("EX0MailBox") _
    .Select("EmailAddresses") _
    .Filter(String.Format("UID_ADSAccount='{0}'", $UID_ADSAccount$)) _
    ).Result.First.GetValue("EMailAddresses").AsString

    Return email

    Please note, that I assumed that you want to return a single string value and not a multi-value property. You may have to convert the String into a 1-dimensional array of String.

    Additional Note

    You need to have the table EX0MailBox in your schema of the AD Sync Project. To keep the table sticky during schema shrinks, you have to exclude the table from the schema shrink.

    Performance - Advise

    Please consider if you really have to map the data from a CR relation in that fashion. Every read access to that property will result in an additional database roundtrip to fetch the value.

Reply
  • Hi Fatih,

    the sample code for your read-script in the scripted property for your example with ADSAccount and EX0MailBox would look like the following.

    Imports VI.Projector.Connection

    Dim email = SystemObject.Connection.QueryObject(SystemQuery _
    .From("EX0MailBox") _
    .Select("EmailAddresses") _
    .Filter(String.Format("UID_ADSAccount='{0}'", $UID_ADSAccount$)) _
    ).Result.First.GetValue("EMailAddresses").AsString

    Return email

    Please note, that I assumed that you want to return a single string value and not a multi-value property. You may have to convert the String into a 1-dimensional array of String.

    Additional Note

    You need to have the table EX0MailBox in your schema of the AD Sync Project. To keep the table sticky during schema shrinks, you have to exclude the table from the schema shrink.

    Performance - Advise

    Please consider if you really have to map the data from a CR relation in that fashion. Every read access to that property will result in an additional database roundtrip to fetch the value.

Children
No Data