Источник:
https://www.powerobjects.com/2017/12...a-known-issue/
==============

There was a time before solutions existed within Dynamics 365, a simpler time, no woes relating to exporting and importing customizations. You just took the whole lot or nothing at all; those were your only options. Since it was introduced in CRM 2011, solution management has evolved enormously and now provides a rich tool set for managing packages between environments. Anyone who has worked with solutions, however, will have undoubtedly ran into a few warning messages, or even errors when importing a solution.
In this blog, we’re going to tackle a specific issue with exporting a solution – let’s dig into it in detail.
The Error
You may have carefully crafted a Dynamics 365 solution, verified all of the dependencies, and you’re ready to export the solution. Unfortunately, upon export you are eagerly awaiting a zip file to be downloaded, only to be prompted with the following error.
“Query Builder Error – The specified field does not exist in Microsoft Dynamics 365” and no log file available for further information. Oh no!
The Cause
This is a known issue with the current release of Dynamics 365 and occurs under the following circumstances:
- Create a solution
- Add Existing entity -> Select an entity, Next and finish
- Create a rollup field
- Save the field but don’t publish
- Remove the field and publish
- Try to export the solution and you will get the above error.
We’ve also seen this occur in a number of different variations of the above sequence as well.
The Resolution
The key to resolving this issue, is finding out the identifier of the problematic roll-up field. If you know the culprit field, this isn’t too difficult – if you don’t, it can get a bit tricky as the error message shown above gives you no indication to either the name or the identifier of the field.
Thankfully, for on-premises installations, you can turn on logging, review the log files and if both the name of the attribute and ID of the attribute is logged. For online customers, a support ticket will yield the offending attribute.
With this information, a simple console application will do the trick to remove the attribute, something along the following lines.
IOrganizationService service = // create a connection to your Dynamics 365 instance
RemoveSolutionComponentRequest removeRequest = new
RemoveSolutionComponentRequest()
{
// this is the Guid you have found within your Dynamics 365 trace files
ComponentId = new
Guid(“cd08e6c2-e8cc-4a62-b339-4cbcff98992e”),
ComponentType = 2,
// This is the unique name, not the display name of the solution you are trying to export
SolutionUniqueName = “UniqueName”
};
service.Execute(removeRequest);
Once executed, try exporting the solution again, and voila! You should feel the joy of receiving your carefully crafted solution export zip file.
For troubleshooting tips – check out our
blog!
Happy Dynamics 365’ing!
Источник:
https://www.powerobjects.com/2017/12...a-known-issue/