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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Email: LOOKUP CONTROL ERROR: Cannot add item of typename = to the lookup control

(0) ShareShare
ReportReport
Posted on by

Hello,

I have an issue with email form after Update 1 was installed to our Dynamics CRM Online 2016 instance.

When I change something on the email form and hit save button, there is an alert error:

"LOOKUP CONTROL ERROR: Cannot add item of typename = to the lookup control."

Also, I noticed that "From" field is locked and I can't change its current value. If I enable it via JavaScript and click on the "Look Up More Records" button, I will see another alert: "You do not have sufficient privileges to open this Lookup dialog box." and also error message near save button: "LOOKUP CONTROL ERROR: Cannot add item of typename = to the lookup control".

My current user is System Administrator.

Please see screenshots.

Thank you

Email_5F00_Issue_5F00_1.png

Email_5F00_Issue_5F00_2.png

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Dmitry,

    It looks like a bug so I would suggest to get in touch with Microsoft Support and open a ticket.

  • Verified answer
    Community Member Profile Picture
    on at

    Hello Andrii,

    Thanks for your advise. But I resolved this issue. I found a solution by this link: https://atriosystems.wordpress.com/2016/04/18/fix-lookup-control-error-after-upgrade-to-crm-13/

    I compared two Email Entity.xml files: one from CRM 2016 Update 1 Solution without customization and other from our solution with this issue. 

    And I noticed that there are no <LookupType> attributes for "From" field in our solution. I added it to Entity.xml, then built and imported the solution and this issue was resolved.

    Please see screenshot.

    Email_5F00_Issue_5F00_3.png

  • Community Member Profile Picture
    on at

    Hi we have just done update 1 today. and we are geeting this error on save emails. I have exported email entity and all assets and look through LookupType and thats not there .

    Dmitry , when i export solution i get customizations.xml not Entity.xml ... am I doing some thing wrong

  • Community Member Profile Picture
    on at

    Hello Madu,

    I used SolutionPackager from CRM SDK\Bin folder to unpack solution zip file and get Entity.xml file in Entities\Email folder.
     To unpack solution zip archive, you can run this command: solutionpackager /action:Extract /zipfile:Solution_Name.zip /folder:Solution_Name_Folder

    To build it back to archive: solutionpackager /action:Pack /zipfile:Solution_Name.zip /folder:Solution_Name_Folder

  • Haruka Celeste Profile Picture
    on at

    I have same problem so I tried to configure Entity.xml but it seems there is no default attributes in it. I tried customizations.xml but still can't find them. Where can I find default attributes?

  • Oswin Profile Picture
    on at

    @Dmitry T Thanks for the solution, editing the xml worked for me!

    @Haruka Celeste Easiest way is to create a temporarily unmanaged solution and only add the email entity (if you're on CRM2016+ you can use the bare email entity and only add the from attribute).

  • Vidyuth Profile Picture
    55 on at

    We are on CRM Online 2016 Update 1 - From and Owner fields have lookuptype tag as mentioned in this blog. But I still receive this error. Unfortunately - I dont have a different environment to compare things. Can anyone assist what else to look for?

  • Suggested answer
    MBogan Profile Picture
    on at

    We notice same behavior after changing forms in an OnPrem environment from Legacy to turbo. While in Turbo form mode the Resolve email is no longer red and is throwing Lookup Control error. Switching back to Legacy fixes issue for now.

    I haven't tested the XML work around, but it must be stated that this is an unsupported fix and could break in future.

  • Shwaa77 Profile Picture
    175 on at

    I got the same error when adding Javascript to Update the price list automatically when the currency changes on an opportunity, It was a simple error on my side, the entyityType was set as "pricelevels" and it should have been "pricelevel".

    Assigning an Incorrect entitytype to a lookup.

    var object = new Array();
    object[0] = new Object();
    object[0].id = pricelevelid;
    object[0].name = name;
    object[0].entityType = "pricelevels";
    Xrm.Page.getAttribute("pricelevelid").setValue(object);

  • Suggested answer
    Oztrea Profile Picture
    45 on at

    It's indeed a bug in CRM, we had the same issue even the format of the id is :

    String: The string representation of the GUID value for the record displayed in the lookup. The value should match the following format: {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}.

    (see in sdk: msdn.microsoft.com/.../gg334409.aspx)

    For Party lists (from, to,...) when we remove the braces XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX =>no more error :)

    Example if you want to set the current user id in the to when it's not set on load :

    var toAttr = Xrm.Page.getAttribute("to");
            if (toAttr && !toAttr.getValue())
                toAttr.setValue([
                {
                    id: Xrm.Page.context.getUserId().replace("{", "").replace("}", ""),
                    name: Xrm.Page.context.getUserName(),
                    entityType: "systemuser"
                }]);

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Varsha deshpande Profile Picture

Varsha deshpande 5

#2
NeerajPawar Profile Picture

NeerajPawar 2

#2
jlattimer Profile Picture

jlattimer 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans