locked
IFRAME error - An error has occured, Try this action again RRS feed

  • Question

  • Hi, <o:p></o:p>

    I am using
    CRM 4.0 and i have various IFRAMES set up which link to other entities within
    CRM. e.g. I have a master case and within this i have other entities such as
    equipment, notes etc which are added through the aid of IFRAMES. <o:p></o:p>

    Previously
    the IFRAME's have been working without any issues however I have recently added
    some new case types to a drop down (e.g. status) This status field previously
    had 2 options<o:p></o:p>

    (Option 1 and
    Option 2) I have since updated this field and now there are 4 options ( so
    Option 1, 2, 3 and 4)<o:p></o:p>

    If the
    status is option 1 or 2 I am able to go into the IFRAME add an equipment record
    without any issues however if the status is either Option 3 or 4 when i try to save the equipment record I get the
    error message <o:p></o:p>

    “An Error
    has occurred, Try this action again. If the problem continues, check the
    Microsoft Dynamics CRM Community fir solutions or contact your organisations
    administrator. Finally you can contact Microsoft Support”<o:p></o:p>

    There are
    other IFRAMES linked to the master case and I am able to add records without any
    problems regardless of status type. The code used to set up all the IFRAME’s
    seems to be the same for all so not sure why some of them work and others don’t. <o:p></o:p>

    Any advice
    on how to resolve this will really be appreciated. <o:p></o:p>

    Thank you


    • Edited by Kully88 Monday, January 6, 2014 2:44 PM
    Monday, January 6, 2014 2:43 PM

Answers

  • Hi,

    I managed to fix the issue by re-mapping the field entities the issue has now resolved. As i did not delete the primary entity the records are still linked to the major entity and did not need to be re-entered

    Thanks

    Kully

    • Marked as answer by Kully88 Monday, February 17, 2014 11:14 AM
    Monday, February 17, 2014 11:14 AM

All replies

  • Hi,

    The error message you posted is not going to help at all. Please start a trace and review low level error messages and post back here so that we ca help you.


    Ronald

    Monday, January 6, 2014 3:38 PM
  • Hi Ronald, <o:p></o:p>

    Thank you
    for your reply. <o:p></o:p>

    This is
    going to sound really silly but I am not hugely familiar with CRM normally just
    get involved in the basics of it. In regards to putting a trace on how do I go
    about doing that?<o:p></o:p>

    Thank you<o:p></o:p>


    Monday, January 6, 2014 3:44 PM
  • Hi,

    This tool would be the easiest way. 


    Ronald

    Monday, January 6, 2014 3:51 PM
  • Hi Ronald,

    As i am using CRM 4.0 so i installed the CrmDiagTool. The error which i get is as below

    Error: The given key was not present in the dictionary.
    Error Message: The given key was not present in the dictionary.
    Source File: Not available
    Line Number: Not available
    Stack Trace Info: [KeyNotFoundException: The given key was not present in the dictionary.]
    at System.ThrowHelper.ThrowKeyNotFoundException()
    at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
    at Microsoft.Crm.Metadata.EnumOptionsByValueCollection`1.get_Item(Int32 optionValue)
    at Microsoft.Crm.Application.Platform.ServiceCommands.CreateCommand.GetStateFromStatusCode(Int32 statusCode)
    at Microsoft.Crm.Application.Platform.ServiceCommands.CreateCommand.CheckForStateChange(EntityProxy entity)
    at Microsoft.Crm.Application.Platform.ServiceCommands.CreateCommand.InitializeRequest(EntityProxy entity, Boolean performDuplicateCheck)
    at Microsoft.Crm.Application.Platform.DataSource.Create(Entity entity, Boolean performDuplicateCheck)
    at Microsoft.Crm.Application.Platform.EntityProxy.Create(Boolean performDuplicateCheck)
    at Microsoft.Crm.Application.Platform.EntityProxy.CreateAndRetrieve(String columnSet, Boolean performDuplicateCheck)
    at Microsoft.Crm.Application.Forms.AppForm.RaiseDataEvent(FormEventId eventId)

    My understanding of this is it has something with the key's however i dont understand why it works on some occasions and not others as the keys are always the same

    Any help with this will really be appreciated

    Thanks

    Tuesday, January 7, 2014 10:13 AM
  • Hi,

    Looks like code inside the iframe custom page is causing this issue. May be the two new option list item you added are missing something. USe Visual Studio to step through the code.


    Ronald

    Tuesday, January 7, 2014 3:20 PM
  • Hi,

    Thank you for your response again.

    I previously had two IFrames which were not working (unable to add records if it was option 3 or 4). After I got the error message above from the error log i decided to edit/recreate the mapping between the two entities. I did this for the entity which only had a few records. Once i created the mapping again the error message has now disappeared for that particular IFrame and i can add records regardless of the drop down option (case type 1,2,3 or 4)

    Even though the error message has gone however as i edited the mapping the records within the entity (care case) are no longer linked to the major case.

    Therefore we will need to go in and re-create these entities within the IFrame on the major case. As the care case only contains a few records at the moment we are ok to do this however the other IFrame (diary page notes) contains huge amounts of records and if i re-create the mapping between the entities the same thing will happen where the records will no longer link to the major case.

    Re-entering this will be impossible for us and I was wondering is there a way that i can re-create the mapping between the two entities and then link all the appropriate diary page notes to the major case without manually entering each one again. This will actually mean we will have 2 records exactly the same within the diary page notes one which is linked to the major case and the other which is no longer linked.

    I hope this makes sense.

    Thanks

     

    Tuesday, January 7, 2014 3:51 PM
  • Hi,

    I managed to fix the issue by re-mapping the field entities the issue has now resolved. As i did not delete the primary entity the records are still linked to the major entity and did not need to be re-entered

    Thanks

    Kully

    • Marked as answer by Kully88 Monday, February 17, 2014 11:14 AM
    Monday, February 17, 2014 11:14 AM