Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

The object type code 1026 does not map to a specific label type code

(1) ShareShare
ReportReport
Posted on by Microsoft Employee

I've upgraded our On-Premise Dynamics CRM 2016 to SP1 (8.1.0.359). The base system language is ENGLISH. We have also installed SPANISH MUI.

When we try to add a product item to a QUOTE or an ORDER, CRM fails with the following error. It happen ONLY if the user is using SPANISH language. It works OK in English.

We have replicated the issue in CRM Online. Same happened. If the user change the base language to any other, it fails.

Any clue?

Regards,

Diego.

 

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: The object type code 1026 does not map to a specific label type codeDetail: 

<OrganizationServiceFault xmlns:i="www.w3.org/.../XMLSchema-instance" xmlns="schemas.microsoft.com/.../Contracts">
<ErrorCode>-2147220989</ErrorCode>
<ErrorDetails xmlns:d2p1="schemas.datacontract.org/.../System.Collections.Generic" />
<Message>The object type code 1026 does not map to a specific label type code</Message>
<Timestamp>2016-09-07T12:29:21.9387758Z</Timestamp>
<InnerFault i:nil="true" />
<TraceText i:nil="true" />
</OrganizationServiceFault>

*This post is locked for comments

  • Suggested answer
    H J Shakib Profile Picture
    H J Shakib 85 on at
    RE: The object type code 1026 does not map to a specific label type code

    After lots of digging i came to this solution:

    1. Open the organization database.
    2. Find "SavedQuery" view and alter it.
    3. Find this: "[T1].[ReturnedTypeCode]" and replace it with this: 
      CASE WHEN (T1.SavedQueryId = N'A2CC2D8E-9768-DD11-B1B0-00155D869F00') THEN 1039 ELSE [T1].[ReturnedTypeCode] END ReturnedTypeCode
    4. Execute and then recycle the CRM application pool in IIS.

    But Why and How!?

    Base on the error:

    Inner Exception: Microsoft.Crm.CrmArgumentException: The object type code 1026 does not map to a specific label type code
    at Microsoft.Crm.Metadata.LabelTypeCodeHelper.GetLabelTypeCodeFromObjectTypeCode(Int32 objectTypeCode)
    
    ...

    I decompiled the CRM assembly and found the method which the error occurs: 

    LabelTypeCodeHelper.png

    So base on this method if "objecttypecode" 1026 come through then definitely the exception will be thrown, but why this typecode come to this method which they didn't expect?!, don't know and i think its a bug.

    So after this, i ran Sql profile and found that this "objecttypecode" comes from Selecting the "SavedQuery" view and only happens on "Quick Find Product Price Levels" view with id "A2CC2D8E-9768-DD11-B1B0-00155D869F00" of "ProductPriceLevel" entity:

    exec sp_executesql N'select 
    "savedquery0".FetchXml as "fetchxml"
    , "savedquery0".StateCode as "statecode"
    , "savedquery0".CreatedBy as "createdby"
    , "savedquery0".ColumnSetXml as "columnsetxml"
    , coalesce("LL0".Label,"LL1".Label, "savedquery0".Name ) as "name"
    , "savedquery0".QueryType as "querytype"
    , "savedquery0".AdvancedGroupBy as "advancedgroupby"
    , "savedquery0".ModifiedBy as "modifiedby"
    , "savedquery0".ReturnedTypeCode as "returnedtypecode"
    , "savedquery0".CreatedOn as "createdon"
    , "savedquery0".LayoutXml as "layoutxml"
    , coalesce("LL2".Label,"LL3".Label, "savedquery0".Description ) as "description"
    , "savedquery0".ModifiedOnBehalfBy as "modifiedonbehalfby"
    , "savedquery0".ConditionalFormatting as "conditionalformatting"
    , "savedquery0".StatusCode as "statuscode"
    , "savedquery0".CreatedOnBehalfBy as "createdonbehalfby"
    , "savedquery0".ModifiedOn as "modifiedon"
    , convert(bigint, "savedquery0".VersionNumber) as "versionnumber"
    , "savedquery0".QueryAPI as "queryapi"
    , "savedquery0".ComponentState as "componentstate"
    , "savedquery0".SolutionId as "solutionid"
    , "savedquery0".SavedQueryId as "savedqueryid"
    , "savedquery0".OrganizationId as "organizationid"
    , "savedquery0".CreatedByName as "createdbyname"
    , "savedquery0".CreatedByYomiName as "createdbyyominame"
    , "savedquery0".ModifiedByName as "modifiedbyname"
    , "savedquery0".ModifiedByYomiName as "modifiedbyyominame"
    , "savedquery0".ModifiedOnBehalfByYomiName as "modifiedonbehalfbyyominame"
    , "savedquery0".ModifiedOnBehalfByName as "modifiedonbehalfbyname"
    , "savedquery0".CreatedOnBehalfByYomiName as "createdonbehalfbyyominame"
    , "savedquery0".CreatedOnBehalfByName as "createdonbehalfbyname" 
    from
     SavedQuery as "savedquery0"
     left outer join LocalizedLabelView as "LL0" on ("LL0".ObjectId = "savedquery0".SavedQueryId and "LL0".LanguageId = @LanguageId0 and "LL0".ObjectColumnName = @ObjectColumnName0 )
     left outer join LocalizedLabelView as "LL1" on ("LL1".ObjectId = "savedquery0".SavedQueryId and "LL1".LanguageId = @LanguageId1 and "LL1".ObjectColumnName = @ObjectColumnName1 )
     left outer join LocalizedLabelView as "LL2" on ("LL2".ObjectId = "savedquery0".SavedQueryId and "LL2".LanguageId = @LanguageId2 and "LL2".ObjectColumnName = @ObjectColumnName2 )
     left outer join LocalizedLabelView as "LL3" on ("LL3".ObjectId = "savedquery0".SavedQueryId and "LL3".LanguageId = @LanguageId3 and "LL3".ObjectColumnName = @ObjectColumnName3 ) 
    where
     ("savedquery0".SavedQueryId = @SavedQueryId0)',N'@LanguageId0 int,@ObjectColumnName0 nvarchar(4),@LanguageId1 int,@ObjectColumnName1 nvarchar(4),@LanguageId2 int,@ObjectColumnName2 nvarchar(11),@LanguageId3 int,@ObjectColumnName3 nvarchar(11),@SavedQueryId0 uniqueidentifier',@LanguageId0=1036,@ObjectColumnName0=N'Name',@LanguageId1=1033,@ObjectColumnName1=N'Name',@LanguageId2=1036,@ObjectColumnName2=N'Description',@LanguageId3=1033,@ObjectColumnName3=N'Description',@SavedQueryId0='A2CC2D8E-9768-DD11-B1B0-00155D869F00'
    go


    So if we do what i told in the beginning of the post and return some objecttypecode that the method expect the error will not going to happens. 

    But what is the side effects or consequences?

    Because we changed the typecode for that specific view only, then all of the consequences should be on that view which is: You can not search the "Price list items" anymore but still you can sort or use the filters. Personally i think most of users not using that search very often, or maybe i'm wrong don't know.

  • Suggested answer
    Andreas Cieslik Profile Picture
    Andreas Cieslik 9,267 on at
    RE: The object type code 1026 does not map to a specific label type code

    Hello,

    I could verify that the current on premise update 2.1 fixed this issue with one of our customers:

    www.microsoft.com/.../details.aspx

    Cheers,

    Andreas

  • Luca Sgaravato Profile Picture
    Luca Sgaravato 50 on at
    RE: The object type code 1026 does not map to a specific label type code

    For On-Premises deployments issue seems to be resolved by Update 2.1 (8.2.1, KB4013759).

    https://support.microsoft.com/en-gb/help/4013759/microsoft-dynamics-365-online-and-on-premises-update-2-1

  • C.Schulte Profile Picture
    C.Schulte 70 on at
    RE: The object type code 1026 does not map to a specific label type code

    Hi all,


    This Bug was fixed by MS in an Online environment of one of our customers.

    We opened a case for that and I think MS has done some magic in the background of the db to fix this issue.

    I can't tell you what they did, they haven't told us.

    That's a quote of a ms-mail:

    "... 

    RESOLUTION :  I informed you that this is a known issue and that we are going to have a fix for this issue in mid-December.
    As discussed on the call, I am also going to set up an appointment (...), so that I can give you an update in regard to this issue. And, in case, you are still facing an issue, feel free to drop me an email at any time, so that we can continue to work on this case.

    mail:

    ... "

    I just checked the issue in the customer's online CRM and I got no errors when add products to a quote.

    DB 8.1.0.578, CRM 8.1.0.578, english Baselanguage, german MUI

    Greetings,

     Christian

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: The object type code 1026 does not map to a specific label type code

    Of course you can do changes directly in db (well, using the service context or XRM - don't do that directly via SQL), that's the way all workarounds work. My solution above is creating the HTML elements to choose a product, a script putting the chosen product into a hidden lookup field and calling Save. Then my plugin catches the product in this field, creates the position and empties the hidden lookup (not to add the position again in the next save). CRM automatically refreshes the form's content (positions list) after the save is finished. However my solution requires a programmer who can write CRM plugins (scripts and editing forms is easy). I can give my codes (I'm thinking about creating a blog related to programming for CRM, ClickDimensions and such).

    Anyway, I don't know whether it was forgotten in this long thread - you can still workaround it yourself by adding a product in the suggestion list (click the magnifier icon, e.g. the first product) and then edit the position (in the position's form the lookup field works).

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: The object type code 1026 does not map to a specific label type code

    Hi, did you find a method to solve this issue? Maybe adding/editing something directly in the DB? This issue is REALLY annoying!

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: The object type code 1026 does not map to a specific label type code

    That's a bug in CRM 2016 (wasn't in previous CRMs), happens only for non-primary languages (people usually install CRM with English as the primary language so it works in English, but not in the additionally installed languages). In our company, I programmed own combobox to enter a product (position) in a order/quote/invoice (my solution gives additional features, so I would do that anyway):

    Bez-n_E100_zvu.png

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: The object type code 1026 does not map to a specific label type code

    I can also confirm that update given does not resolve problem. Still same error

  • RE: The object type code 1026 does not map to a specific label type code

    Hi Erez,

    I have updated my CRM Lab to v8.2.0.749 and during the update our solution was upgraded.

    After the upgrade I disabled the lanugages (we have Chinese and Japanese language packs installed) and enabled them again to get them updated to v8.2.0.749.

    And - I still get the : "The object type code 10048 does not map to a specific label type codeDetail: "

    Br,

    Henrik

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: The object type code 1026 does not map to a specific label type code

    Hey,

    Does someone installed the update, and can confirm that the problem has been resolved?

    BR,

    Erez

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,321 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans