locked
Custom Plugin Field Update RRS feed

  • Question

  • I have 3 fields FirstName, LastName and FullName.

    FullName = FirstName + LastName.... This executes properly during save.... but when i update this record only the updated value gets assigned to the FullName field. Please suggest me the solution as i am a beginner in Dynamics CRM

    My personal mail id : nikhil.naralkar@infinxinc.com

    Thursday, May 29, 2014 7:15 AM

Answers

  • HI,

    Please go through the following links,

    http://www.magnetismsolutions.com.au/blog/paulnieuwelaar/2013/08/25/set-custom-full-name-format-in-crm-2011-with-plugin

    http://gonzaloruizcrm.blogspot.in/2011/07/how-to-update-full-name-format-in-crm.html

    https://customfullname.codeplex.com/

    http://davecorun.com/blog/2012/01/05/crm-2011retrieve-plugin/


    Thanks & Regards, MS CRM Consultant, V.Surya. My Blog: http://inventcrm.wordpress.com/

    Thursday, May 29, 2014 7:29 AM
  • Hi Nikhil,

    When you are updating an entity, only fields which have changed are included in the property bag.
    This means that when you reference a field in the property bag, it will only have a value if you have just updated it.

    To get around this you will need to do a retrieve on the entity to get the fields, and generate the full name based on that.

    Entity contact = _sdk.Retrieve("contact", contactId, new ColumnSet("firstname", "lastname"));

    If this has helped you, please mark as answer, or reply if you need more information. :)

    ~ Atomic Coder

    Friday, May 30, 2014 1:31 PM

All replies

  • HI,

    Please go through the following links,

    http://www.magnetismsolutions.com.au/blog/paulnieuwelaar/2013/08/25/set-custom-full-name-format-in-crm-2011-with-plugin

    http://gonzaloruizcrm.blogspot.in/2011/07/how-to-update-full-name-format-in-crm.html

    https://customfullname.codeplex.com/

    http://davecorun.com/blog/2012/01/05/crm-2011retrieve-plugin/


    Thanks & Regards, MS CRM Consultant, V.Surya. My Blog: http://inventcrm.wordpress.com/

    Thursday, May 29, 2014 7:29 AM
  • Hi,

    You might have registered you plugin only for create message,

    could you please try registering on update message also

    for more info follow this url

    http://msdn.microsoft.com/en-us/library/hh237515.aspx 

    Regards,

    Abdul Raziq

    Thursday, May 29, 2014 11:45 AM
  • Hi Nikhil,

    When you are updating an entity, only fields which have changed are included in the property bag.
    This means that when you reference a field in the property bag, it will only have a value if you have just updated it.

    To get around this you will need to do a retrieve on the entity to get the fields, and generate the full name based on that.

    Entity contact = _sdk.Retrieve("contact", contactId, new ColumnSet("firstname", "lastname"));

    If this has helped you, please mark as answer, or reply if you need more information. :)

    ~ Atomic Coder

    Friday, May 30, 2014 1:31 PM