Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

SavedQueryVisualization always creates two records - Update / Retrieve-Problem

Posted on by

hi,

my plugin is creating an record of type "savedqueryvisualization" to display some information right beside the account-list (where the charts are located).

The problem I have right now is, that after I've created that record a second record with the same Id but different uniqueid gets created.

The view "savedqueryvisualization" only returns one record, but the table "savedqueryvisualizationbase" has two of these records.

The Problem:

when I retrieve the record from my plugin it returns the first record.

when I update the record it updates the second record (because they have the same Id)...

So I can never retrieve my updated record...

I checked the View "savedqueryvisualization": there is an orderby overwritetime asc which returns the wrong record.

any ideas how to fix this issue?

Tobias

*This post is locked for comments

  • RE: SavedQueryVisualization always creates two records - Update / Retrieve-Problem

    hi Radu,

    thanks for your help. That was the problem...one is published, one is not.

    After I published my entity the second record is gone.

    Tobias

  • Verified answer
    Radu Chiribelea Profile Picture
    Radu Chiribelea 6,667 on at
    RE: SavedQueryVisualization always creates two records - Update / Retrieve-Problem

    One is published while the other one is unpublished: msdn.microsoft.com/.../gg328546.aspx

    Can you share your code here? Also are you generating the SavedQueryVisualizationID from the code or are you letting the CRM Platform handle it?

  • T.Koller Profile Picture
    T.Koller 145 on at
    RE: SavedQueryVisualization always creates two records - Update / Retrieve-Problem

    one is 0, the other one 1...i think there is an issue within my plugin.

    when I simply just create a new savedqueryvisualization it only creates one record.

  • Radu Chiribelea Profile Picture
    Radu Chiribelea 6,667 on at
    RE: SavedQueryVisualization always creates two records - Update / Retrieve-Problem

    How about the component state ?

  • T.Koller Profile Picture
    T.Koller 145 on at
    RE: SavedQueryVisualization always creates two records - Update / Retrieve-Problem

    no, the solutionid and the savedqueryvirtualizationid are exactly the same...the only difference is the unique id

  • Suggested answer
    Radu Chiribelea Profile Picture
    Radu Chiribelea 6,667 on at
    RE: SavedQueryVisualization always creates two records - Update / Retrieve-Problem

    Looks to be related to the solution layering. What are the SolutionIds for each of the entries? Can you share the code you're using the perform these operations ?

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans