Forum Discussion
Zahar_Chernov
9 years agoIdeator I
Hello Tom,
If I understand it right, you want to be able to set Identity name to different value than "First Name & Last Name"?
If you, you can create serverMethod onAfterAdd of the ItemType Alias and then get User item from source_id property and the Identity from related_id property. Then update name property of Identity item based on properties from User item. Something like this:
Item userItm = this.getPropertyItem("source_id"); Item identItm =this.getPropertyItem("related_id"); Item updateIdnt = this.getInnovator().newItem(identItm.getType(), "merge"); updateIdnt.setID(identItm.getID()); updateIdnt.setProperty("name", userItm.getProperty("{prop1}", "") + " " + userItm.getProperty("{prop2}") + " " + userItm.getProperty("{prop3}")); updateIdnt.apply();