locked
CRM 2011: 'System.ArgumentException: Expected non-empty string. Parameter name: entityName' error message RRS feed

  • Question

  • Hello,

    After add custom filtered lookup field javascript code, I get this error message when loading a entity form. Don't know why.

    Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Expected non-empty string.Detail: 
    <OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">
      <ErrorCode>-2147220989</ErrorCode>
      <ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
      <Message>Expected non-empty string.</Message>
      <Timestamp>2013-07-29T22:33:04.7052818Z</Timestamp>
      <InnerFault>
        <ErrorCode>-2147220970</ErrorCode>
        <ErrorDetails xmlns:d3p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
        <Message>System.ArgumentException: Expected non-empty string.
    Parameter name: entityName</Message>
        <Timestamp>2013-07-29T22:33:04.7052818Z</Timestamp>
        <InnerFault i:nil="true" />
        <TraceText i:nil="true" />
      </InnerFault>
      <TraceText i:nil="true" />
    </OrganizationServiceFault>

    Tuesday, July 30, 2013 3:45 PM

Answers

  • I found the issue. for whatever reason, $.getJson doesn't work. replace it with other way. it works.
    • Marked as answer by howexg9 Friday, August 2, 2013 8:49 PM
    Friday, August 2, 2013 8:49 PM

All replies

  • This could be due to any number of lines in your webresource javascript code. You will need to run the debugger tools in Internet explorer or another browser if you have rollup 12 installed. Put a "debugger;" statement in your code right before the spot you think the error is happening. Then update the webresource in CRM and then publish. Go back to the page that has the offending lookup control and then press "F12" and then select the tab to "start debuggin". It will refresh the page and the javascript source will be loaded and stop at the breakpoint where you put your debugger. Step through the code using F10 for step over or F11 for step in. Do this until you see where it blows up. That will give you an idea where it is blowing up and it may give you an idea why as well. It could be that your trying to access a property or function that has not been instantiated for whatever reason.

    Thanks in Advance

    Tuesday, July 30, 2013 5:24 PM
  • Or post us your code and we'll see if we can spot the error :)

    If my response helped you find your answer please show your thanks by taking the time to "Mark As Answer" and "Vote As Helpful".

    Twitter LinkedIn Facebook Blog Magnetism

    Wednesday, July 31, 2013 6:46 AM
  • I found the issue. for whatever reason, $.getJson doesn't work. replace it with other way. it works.
    • Marked as answer by howexg9 Friday, August 2, 2013 8:49 PM
    Friday, August 2, 2013 8:49 PM