Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Clearing Composite fields

(0) ShareShare
ReportReport
Posted on by 379

After clearing composite fields data using plug-in, still they are returning previous data whenever I saved the record . Initially it's showing data , but when ever I just click on address composite field , data is clearing , and it's coming back after saving the record . If I modify any address composite field, it's just showing only new value.

*This post is locked for comments

  • Drew Poggemann Profile Picture
    Drew Poggemann 4 on at
    RE: Clearing Composite fields

    Hi ZeroHar, please mark your answer verified so others do not need to review...

    Thanks!

  • Verified answer
    ZeroHar Profile Picture
    ZeroHar 379 on at
    RE: Clearing Composite fields

    community.dynamics.com/.../150607.

    This post solved my problem. Thanks for trying to help me Goutam

  • ZeroHar Profile Picture
    ZeroHar 379 on at
    RE: Composite fields clearing data

    Thanks for the response. I am calling update method while passing null value, I am calling this plug-in from java script using action message

    code:

                      string fieldList = context.InputParameters["fieldList"].ToString();

                      EntityCollection results = service.RetrieveMultiple(new FetchExpression(new_fetchxml));

                           foreach (Entity item in results.Entities)

                        {                  

                        Entity obj = new Entity();

                               obj.Id = item.Id;

                               obj.LogicalName = item.LogicalName;

                     foreach (string str in fieldList.Split(','))

                               {

                                 var name = str.Split(':');                              

                                       switch (name[1])

                                           {    

                                             case "Memo":

                                           obj[name[0]] =null;

                                           break;

                                     //for  other data types

                                          default:

                                               obj[name[0]] = null;

                                               break;

                                        }

                          }

                      service.Update(obj);

                    }

  • Suggested answer
    gdas Profile Picture
    gdas 50,089 Moderator on at
    RE: Composite fields clearing data

    If you clear the composite field in the plugins then make sure you are calling update method to make the changes happen.

    In addition could you please share plugin code and some more details which message, operation plugin has registered.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,409 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans