Directory Connector configured to have a custom DisplayName for the Active Directory (AD) contacts such as Lastname, Firstname
You tried the following options but it did not perform well when UserName field of the source Notes Person Document attribute has several values:
1- Script:
$t1 = $srcObj["sn"]
$t2 = $srcObj["givenName"]
$values = $t1 + ", " + $t2
$values
2.- Default mapping configuration.
In both cases, the connector creates the objects DisplayName value in AD as the last value of the UserName field of the source Notes Person Document.
Once, "Do not commit changes" is enabled, you are able to see multiple values under the displayName.