MscrmTools / MsCrmTools.ScriptsFinder

List all client events defined in Dynamics CRM/365 organization
GNU General Public License v3.0
5 stars 3 forks source link

Unable to find control with id: grid_competitors #16

Closed alen1979 closed 3 years ago

alen1979 commented 3 years ago

Hi

I was getting the same error as in https://github.com/MscrmTools/MsCrmTools.ScriptsFinder/issues/15

I've then updated to the version you provided in in that issue (v.1.2021.6.51). When using this version I'm getting following error System.Exception: Unable to find control with id : grid_Competitors when Finding Scripts usage for all Entities. I've tested this again an on-premise v9 system and Online V9.1

See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box.

** Exception Text ** System.Exception: Unable to find control with id : grid_Competitors at MsCrmTools.ScriptsFinder.ScriptsManager.LoadScripts(List1 emds) at MsCrmTools.ScriptsFinder.ScriptsManager.Find(List1 solutions, Boolean loadManagedEntities, Version crmVersion) at MsCrmTools.ScriptsFinder.ScriptsFinder.b__20_0(BackgroundWorker bw, DoWorkEventArgs e) at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e) at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)

** Loaded Assemblies ** mscorlib

MscrmTools commented 3 years ago

That means that there is a remaining scripts registered for that control whereas it has been removed (or renamed) from the form. Can you try to find the form that raises this issue and check if my assumption is correct?

alen1979 commented 3 years ago

many thanks ... that helped. I've exported the default solution and found

event name="onchange" application="false" active="false" attribute="yominame" relationship="" control="grid_Competitors">

            </event

After manually removing it from the XML an reimporting the solution the issue is gone. Not sure why we still had this entry in the XML. I couldn't find the related control/attribute anymore on the Form.

MscrmTools commented 3 years ago

I guess this is a platform bug that does not remove the event associated with a grid when it's removed from the form