web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

FieldOne Mobile app - The given key was not present in the dictionary

(0) ShareShare
ReportReport
Posted on by 255

I have added a Look up view on Product Services (Product) entity where I select (Lookup) from the Work Order Products form and search for available products and I can definitely see and can select a product however on selection I get an error

The given key was not present in the dictionary

How to figure out which key it is expecting? 

 

Any help appreciated, thanks

 

Logs below dont make any sense to me unless I am missing something

 ----

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

************** Exception Text **************
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at MobileCrm.Data.FetchXml.Entity.get_Meta() in c:\FieldOne\TFS\Sky\Test\RescoMobile_v7.3.2\Mobile\MobileCrm.Data\FetchXml\FetchXml.cs:line 437
   at MobileCrm.Data.FetchXml.Entity.AddAttributes() in c:\FieldOne\TFS\Sky\Test\RescoMobile_v7.3.2\Mobile\MobileCrm.Data\FetchXml\FetchXml.cs:line 489
   at MobileCrm.Model.EntityCustomization.GetFieldOneSettings(Action`1 callback, IForm form) in c:\FieldOne\TFS\Sky\Test\RescoMobile_v7.3.2\Mobile\MobileCrm\Model\EntityCustomization.cs:line 240
   at MobileCrm.Model.f1_workorderproduct.SetUnitCost() in c:\FieldOne\TFS\Sky\Test\RescoMobile_v7.3.2\Mobile\MobileCrm\Model\WorkOrderProduct.cs:line 162
   at MobileCrm.Model.f1_workorderproduct.OnDynamicPropertyChanged(String propertyName) in c:\FieldOne\TFS\Sky\Test\RescoMobile_v7.3.2\Mobile\MobileCrm\Model\WorkOrderProduct.cs:line 471
   at MobileCrm.Data.DynamicEntity.SetPropertyValue(Int32 index, Object value) in c:\FieldOne\TFS\Sky\Test\RescoMobile_v7.3.2\Mobile\MobileCrm.Data\DynamicEntity.cs:line 1289
   at MobileCrm.Data.DynamicEntity.TrySetValue(String propertyName, Object value) in c:\FieldOne\TFS\Sky\Test\RescoMobile_v7.3.2\Mobile\MobileCrm.Data\DynamicEntity.cs:line 1415
   at MobileCrm.UI.Controllers.DetailViewController.OnItemChanged(IDetailItem item) in c:\FieldOne\TFS\Sky\Test\RescoMobile_v7.3.2\Mobile\MobileCrm.UI\Controllers\DetailViewController.cs:line 316
   at MobileCrm.UI.Controllers.DetailViewController.detailView_ItemChanged(Object sender, DetailViewItemArgs e) in c:\FieldOne\TFS\Sky\Test\RescoMobile_v7.3.2\Mobile\MobileCrm.UI\Controllers\DetailViewController.cs:line 322
   at Resco.UI.WindowsMobile.DetailViewEx.OnDetailItemChanged(IDetailItem item) in c:\FieldOne\TFS\Sky\Test\RescoMobile_v7.3.2\Mobile\Resco.UI.Windows\Controls\DetailViewEx.cs:line 828
   at Resco.UI.WindowsMobile.DetailViewEx.OnItemChanged(Object sender, ItemEventArgs e) in c:\FieldOne\TFS\Sky\Test\RescoMobile_v7.3.2\Mobile\Resco.UI.Windows\Controls\DetailViewEx.cs:line 846
   at Resco.UI.WindowsMobile.ItemHyperlink.set_Value(Object value) in c:\FieldOne\TFS\Sky\Test\RescoMobile_v7.3.2\Mobile\Resco.UI.Windows\Controls\ItemHyperlink.cs:line 61
   at MobileCrm.UI.ItemReferenceLink.OnValueSelected(IReference value) in c:\FieldOne\TFS\Sky\Test\RescoMobile_v7.3.2\Mobile\MobileCrm.UI\DetailViewBuilder.cs:line 554
   at MobileCrm.UI.LookupForm.SelectAction(IReference entity) in c:\FieldOne\TFS\Sky\Test\RescoMobile_v7.3.2\Mobile\MobileCrm.UI\LookupForm.cs:line 318
   at MobileCrm.UI.LookupController.OnEntitySelected(Int32 rowIndex) in c:\FieldOne\TFS\Sky\Test\RescoMobile_v7.3.2\Mobile\MobileCrm.UI\LookupForm.cs:line 88
   at MobileCrm.UI.LookupController.OnRowClick(Object sender, EventArgs e) in c:\FieldOne\TFS\Sky\Test\RescoMobile_v7.3.2\Mobile\MobileCrm.UI\LookupForm.cs:line 81
   at Resco.UI.WindowsMobile.ListView.OnRowClick(Object sender, EventArgs e) in c:\FieldOne\TFS\Sky\Test\RescoMobile_v7.3.2\Mobile\Resco.UI.Windows\Controls\UIListView.cs:line 215
   at Resco.UI.WindowsMobile.UIElements.UIAdvancedList.UIStackListView.OnRowClick(RowClickEventArgs e) in c:\FieldOne\TFS\Sky\Test\RescoMobile_v7.3.2\Mobile\Resco.UI.Windows\Controls\UIElements\UIStackedListView.cs:line 512
   at Resco.UI.WindowsMobile.UIElements.UIAdvancedList.UIStackListView.OnClick(UIMouseEventArgs e) in c:\FieldOne\TFS\Sky\Test\RescoMobile_v7.3.2\Mobile\Resco.UI.Windows\Controls\UIElements\UIStackedListView.cs:line 499
   at Resco.UIElements.Controls.UIElementControl.OnMouseUp(MouseEventArgs e)
   at Resco.UI.WindowsMobile.UIElements.UIAdvancedList.OnMouseUp(MouseEventArgs e) in c:\FieldOne\TFS\Sky\Test\RescoMobile_v7.3.2\Mobile\Resco.UI.Windows\Controls\UIElements\UIAdvancedList.cs:line 312
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at Resco.UIElements.Controls.UIElementControl.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Community Member Profile Picture
    on at

    Hi Abbas,

    The error "the given key was not present in the Dictionary", typically means that CRM/Field Service is looking for either a field, relationship, or view which is missing.

    From the log you provided it appears to fail on the Work Order Product | Set Unit Cost.

    c:\FieldOne\TFS\Sky\Test\RescoMobile_v7.3.2\Mobile\MobileCrm\Model\EntityCustomization.cs:line 240

    10.   at MobileCrm.Model.f1_workorderproduct.SetUnitCost

    I would suggest opening a case with the Microsoft Field Service team to troubleshoot further.  There is definitely some required elements that missing for the mobile application to render the Work Order Products correctly.

    Thanks!

    Here is the link to open the case:

    support.microsoft.com/.../getsupport;tenant=ClassicCommercial&oaspworkflow=start_1.0.0.0&locale=en-us&supportregion=en-us&pesid=15972&ccsid=635809694544936444

  • Suggested answer
    Abbas Khan Profile Picture
    255 on at

    Thanks Teresa. MS guys were not able to resolve the issue. Tried importing new/blank template but no luck.

    Finally fixed it by enabling FieldOne Settings and FieldOne Price List Item entities in woodford.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans