Cannot update LocationSurname
Exporting LocationSurname to CM v9 is not working. The CM API returns no error, it just doesn't update the Surname.
I have successfully updated other attributes including LocationGivenNames, LocationJobDescription, LocationEmailAddress, LocationPhoneNumber and LocationIdNumber.
Some emailing around with the customer has revealed that they had a similar problem trying to bulk load data into the UAT environment using the "Data Loader". Someone thinks that the "Unique Name" field must be provided with the upload data when using a CSV file, and that this is a recent change in CM. (I have been unable to verify this and have no idea if the same issue would affect the API.)
I did try setting the LocationNickname as well (which is titled "Unique Name" in the API doco). I can also set this field but it doesn't make any difference to the Surname. I tried both:
- Setting the NickName then attempting to update the Surname on a subsequent export
- Setting the NickName and the Surname at the same time
For both the NickName was set, but the Surname did not change in CM.
Answer
Hi Carol
The LocationSurname is a composite field of LocationSurnamePrefix and LocationSurnameNoPrefix. In the API explorer, it is possible to set the LocationSurname field and the Prefix and NoPrefix fields are updated as needed. The CM client library, however, seems to block the ability to set LocationSurname, presumably because if you assign a no-prefix surname to LocationSurname instead of LocationSurnameNoPrefix, any value in LocationSurnamePrefix is lost.
To set the surname you'll have to use the LocationSurnamePrefix and LocationSurnameNoPrefix fields. Consider LocationSurname a readonly field, it will be by default in the next release.
Ahhh thankyou - clear as mud that API!
I'd also figured out that LocationSortName is not actually writeable either, and CM populates it based on the GivenNames and Surname values.
Yes, LocationSortName is weird. Required but what you provide doesn't actually matter. Next release will probably have that field as readonly, as well.
Seems LocationSortName is the primary name field for non-user locations which is probably why it's a required field. It's the users type that has the strange behaviour. Will just make sure its documented along with LocationSurname and related fields.
Customer support service by UserEcho
Hi Carol
The LocationSurname is a composite field of LocationSurnamePrefix and LocationSurnameNoPrefix. In the API explorer, it is possible to set the LocationSurname field and the Prefix and NoPrefix fields are updated as needed. The CM client library, however, seems to block the ability to set LocationSurname, presumably because if you assign a no-prefix surname to LocationSurname instead of LocationSurnameNoPrefix, any value in LocationSurnamePrefix is lost.
To set the surname you'll have to use the LocationSurnamePrefix and LocationSurnameNoPrefix fields. Consider LocationSurname a readonly field, it will be by default in the next release.