Monday 5 May 2014

CRM 2011/CRM 2013 Import Solution Error : The 'label' attribute is not declared.

When you export and import your solution, you might be having this problem :
image
Even, you cannot go process further.
Then you click to go to Technical Details.
image
You can see this error :
The 'label' attribute is not declared.
fp_/Scripts/Common.js" libraryUniqueId="{2bc9de70-3eba-6b5d-a312-7dce0cc2bd19}" /><Library name="tfp_/Scripts/QuoteProduct.js" libraryUniqueId="{ead514c4-523c-5a70-6c46-53d6bedcce82}" /></formLibraries></form><LocalizedNames><LocalizedName description="Information" languagecode="1033" /></LocalizedNames><Descriptions><Description description="A form for this entity." languagecode="1033" /></Descriptions></systemform></forms></FormXml><SavedQueries><savedqueries><savedquery><IsCustomizable>1</IsCustomizable><CanBeDeleted>1</CanBeDeleted><isquickfindquery>0</isquickfindquery><isprivate>0</isprivate><isdefault>0</isdefault><returnedtypecode>1085</returnedtypecode><savedqueryid>{b8dab044-44d1-e311-940e-001cc4eecdd6}</savedqueryid><layoutxml><grid name="quotedetails" object="1085" jump="" select="1" icon="1" preview="1"><row name="quotedetail" id="quotedetailid"><cell name="productname" disableMetaDataBinding="1" LabelId="query.product.cell.productname.label" width="150" disableSorting="1" label="Product Name" /><cell name="productid" ishidden="1" width="200" disableSorting="1" /><cell name="productdescription" ishidden="1" width="200" disableSorting="1" /><cell name="priceperunit" width="100" disableSorting="1" /><cell name="quantity" width="100" disableSorting="1" /><cell name="manualdiscountamount" LabelId="query.product.cell.productname.discount" width="100" disableSorting="1" label="Discount" /><cell name="extendedamount" width="125" disableSorting="1" /><cell name="tax" width="100" /><cell name="uomid" width="100" /><cell name="sequencenumber" ishidden="1" width="100" /></row></grid></layoutxml><querytype>0</querytype><fetchxml><fetch distinct="false" mapping="logical"><entity name="quotedetail"><attribute name="productid" /><attribute name="productdescription" /><attribute name="priceperunit" /><attribute name="quantity" /><attribute name="manualdiscountamount" /><attribute name="extendedamount" /><attribute name="sequencenumber" /><order attribute="sequencenumber
Then you go and find labels=”
image
Then you know that you are not supposed to have “label” attribute in this schema.
And you know that in your customization.xml actually you have two “label”
Then, here is the resolution :
1. You can remove that troublesome attribute from customization.xml by extracting your .zip solution file then find : “label=”
image

image
Then you remove those attributes to become that :
image
Then you do zipping again for all of the solution folder
image[72]
And actually it works.
image
Thanks to this link for giving me clue.
http://nishantrana.wordpress.com/2013/02/06/the-label-attribute-is-not-declared-error-while-importing-solution-in-crm-2011/comment-page-1/#comment-22984
2. If you are still in development and very often to export and import your solution between two organization, you feel tired to change that customization.xml, there is another way, that is by fixing the error from your source organization.
Here are the steps :
1. First, you go back to your troublesome customization.xml or the dialog message from technical details and find the ‘savedqueryid’
image
Then you go to SQL, query using that savedqueryid to get the View Name
image
Get your Saved Query Name and then you go to your source organization and then delete that field.
Then, you go to your View and delete that view.
Then, you export back your solution and import again and you know that it works.
Hope it helps!

No comments:

Post a Comment

Aileen Gusni

Aileen Gusni