问题
I want format of fullname like Title + First Name + Last Name.but this type of format is not avalilable in System settings.so,I just want to update fullname not first name or last name.How can I achieve this requirements.
回答1:
The answer is you can't change the format of full name in the database aside from the formats CRM defines as options. But, you do have two options:
Create a Select plugin that updates the value of the full name on the entity (if you're using early bound, the property will still be read-only, but you can edit the value in the attributes collection directly with no issues.) This could potentially be a really bad performance issue since selecting 1000 entities requires the plugin to run a 1000 times. I'd probably recommend the next option:
Create your own field
new_fullname
. And make the format whatever you want. Setting it with a Create/update plugin, as well as potentially through the JavaScript. Then it's just updating your forms, views, and any plugins / workflows that currently reference fullname.
回答2:
I don't know if i understand what you want archive in settings i don't know any way, if have some solutions: plugin, workflow or javascript. You can add in onchange event of firstname, fullname and title and change fullname. Something like that:
Xrm.Page.getAttribute("fullname").setValue(Xrm.Page.getAttribute("firstname").getValue() + Xrm.Page.getAttribute("lastname").getValue());
EDIT: I forgotten that is readonly you can change readonly using Javascript like that:
Xrm.Page.getAttribute("fullname").setSubmitMode("always");
See here another option.
来源:https://stackoverflow.com/questions/18183996/how-can-i-update-fullname-in-contact-in-crm