cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate II
Advocate II

Weird behavior after Importing solution to prod - "Query builder Error" and "entity doesn't contain attribute with name = and NameMapping = 'Platform'"

Hello,

 

I will try to keep this as concise as possible as I have been wracking my brain the entire day trying to figure this out.

 

Problem

 

I have 3 environments, Dev, QA and Prod. I have a solution which contains a collection of entities, a couple of flows and some option sets. I have exported and imported this solution from Dev to QA and Prod a couple of times with no issues. However, today I decided to change a field in Entity A to look up on from Entity B in the same solution instead of the System Users Entity. After doing this, I tested to make sure I could create/edit records in Dev and it worked. Exported/imported into QA and everything worked. Importing into Prod is where the trouble happened. I received this error intermittently:

Reigningfear_0-1599802681235.png


A flow I had connected to this entity also had an error stating this:

Reigningfear_1-1599802796022.png

The flow error remained constant however the Query Builder error seemed to be intermittent for multiple users. It was really odd that I could create an entry sometimes and other times I could not. Eventually, the error became more and more common until it was consistent.

What I've tried

  • I ensured I removed any remnant of the old field that a replaced with the new lookup field. If it matters, I did name it the same. Note - I have another look up field that I essentially remade during troubleshooting and I named that something different but it is having a similar issue.
  • Used a few XRMtoolbox plugins to see if I could find any reference of the attribute. Nothing showed up having to do with the old fields.
  • I tried updating data using the "edit data in excel" function but that yielded the same result as the flow.
  • I tried removing the fields from the forms and import/exporting into prod. I noticed that after doing this, one of the option set fields would throw the error shown above so if I left it blank, I could create items. This was also intermittent.
    • After noticing this, I tried removing the problematic option set from the solution and reimporting to prod. This seemed to be the most consistent way of creating/editing records in Prod. 
  • I tried creating the relationships manually instead of letting CDS do it when you create a field.
  • I've deleted all data in prod just in case previous data from the old fields messed things up.

 

The most bizarre thing to me is everything works perfectly UNTIL I use my prod environment. I also can't understand how it would create records sometimes then the very next record, using the same data, throw an error. I am out of ideas as to how that environment has issues when everything I use is within the same solution.

Apologies for the wall of text here. My head is swimming and I felt like all of that detail may help someone smarter than myself help me. Please let me know if I can provide any further details that may assist.


Update - After coming back to this with a fresh mind, I actually found out what was going on. It turns out the only difference between QA and Prod for me was a duplicate detection rule. I created that rule using the old fields and forgot about updating it. It's unfortunate that all of the errors seemed to indicate something was wrong with the entity or solution when it was actually something in the environment itself.

I still don't understand this error seemed to pop up only if I edited records. I would think creating records would trigger the dup detection rule.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Weird behavior after Importing solution to prod - "Query builder Error" and "entity doesn't contain attribute with name = and NameMapping = 'Platform'"

Hi @Reigningfear ,

Since I could only totally create an exactly same solution, so I could not find where's the problem in details.

I could only give you some advice about this kind of error:

This error shows up when there is a reference in SolutionComponents for an attribute that didn't exist in the system anymore or if it exists, the ComponentType will be "2".

In your case, the attribute is the AttributeId mentioned in the error message. You can look for that specific AttributeId via Odata query

https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/webapi/query-metadata-web-a... or via CRM REST builder https://github.com/jlattimer/CRMRESTBuilder and confirm if you are able to locate it and its ComponentType. 

Once you get the details of the component, try removing it from the solution first and confirm if that resolves this error and then you can take necessary action on that component within system.

 

 

If the problem still exists, I suggest you open a ticket here:
https://powerapps.microsoft.com/en-us/support/pro/ticket/

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Highlighted
Community Support
Community Support

Re: Weird behavior after Importing solution to prod - "Query builder Error" and "entity doesn't contain attribute with name = and NameMapping = 'Platform'"

Hi @Reigningfear ,

Since I could only totally create an exactly same solution, so I could not find where's the problem in details.

I could only give you some advice about this kind of error:

This error shows up when there is a reference in SolutionComponents for an attribute that didn't exist in the system anymore or if it exists, the ComponentType will be "2".

In your case, the attribute is the AttributeId mentioned in the error message. You can look for that specific AttributeId via Odata query

https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/webapi/query-metadata-web-a... or via CRM REST builder https://github.com/jlattimer/CRMRESTBuilder and confirm if you are able to locate it and its ComponentType. 

Once you get the details of the component, try removing it from the solution first and confirm if that resolves this error and then you can take necessary action on that component within system.

 

 

If the problem still exists, I suggest you open a ticket here:
https://powerapps.microsoft.com/en-us/support/pro/ticket/

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Users online (6,833)