Deploying solution from Dev to Production fails because column with same schema name data type was changed. Object dependencies won't get deleted - dynamics-crm

So the column in question was a lookup column, which i deleted in the unmanaged solution, and mistakenly created a new column with the same name. Dynamics by default will use the same auto-generated schema name based on the display name. So when I go to import the unmanaged solution in my dev environment into the production environment as managed, obviously it throws an error because of the mismatched of data types per column schema name.
Error returned by Azure Pipeline
So I did the sensible next thing, and went to delete this column in my dev environment. But oh no! There are object dependencies which prevent me from deleting it, okay I look at which objects depend on this column, it is a form, i remove the column from the form, go to delete and oh no again! There is still a dependency on the form I just deleted the column from.
So what do I do? I can't change the column schema name, I can't change the data type back to the data type that's currently in the managed solution. Is this when I open up a microsoft support ticket? Hopefully someone here has some insight. Thanks!

The attribute can be associated with a custom control. Try removing this custom control using the classic form designer. It should be visible on one of the field property tabs.
If the attribute cannot be found anywhere on the form using the classic or modern form designer, try this:
Create a solution with this form only. Export the solution as unmanaged. Extract the customization.xml from the zip. Edit the xml and remove all references to your attribute. Paste the customization.xml into the zip and import and publish the solution.

The only way to delete a managed component is to upgrade the solution. In your case, you can delete the field and dependency in solution and apply the upgrade to target environment. Please noticed that all data in this field would get deleted when you apply the upgrade. You may check this link for more detail

Related

Importing my Unmanaged Solution does not change the Account form

I have a customized Account "Main" Form in CRM.
I added a new tab, a new section, and new fields inside it.
I published all customizations before-hand, then export, then import into my test environment. I publish all in the test environment.
The Unmanaged Solution contains this form and its new fields; When I review the Form XML in the exported zip's customizations.xml file, it indeed has the new tab label, new section label, I can see the fields in the XML.
PROBLEM: But after importing and publishing into the test environment... the changes don't show up!
What I see in its place is the way that section looked BEFORE (not sure how long ago last time it was changed). It's simply not getting my latest changes.
How can an Unmanaged solution import have these issues? What else is there to check/consider? I don't think Solution Layers would cause this since it's Unmanaged, nothing stood out there anyway.
Please follow this check list, also note* with Dynamics it needs more env/info including your environment to trouble shoot, since it could be something in tandem with your env.
1. Usual Suspects in an UnManaged Solution
With yours being an UNMANAGED solution, I strongly suspect its a security permissions issue not setup/enabled in the Target environment, check your logs, you may see something like this
Try these Solution Importing steps
Import your main solution (note* without field security profiles).
Now, Publish all your customizations (note* you can enable/import the field security after this step)
Lastly, Import the second solution which would contain your field security profiles
2. Troubleshooting Checklist
To resolve/hunt down the issue, try these checklist steps
Check IIS: if you reset/restart IIS, (after define and publish your field)
Clear you client side cache: run it by
pressing Ctrl+F5
Clear you server side cache:
https://learn.microsoft.com/en-us/powerapps/maker/portals/admin/clear-server-side-cache
Are using the entity form:
Do you have the correct: entity permissions Notes & Sub Grid
https://learn.microsoft.com/en-us/powerapps/maker/portals/configure-notes
Did you add the metadata
Lastly are you using activities

gatsby-source-ghost is failing to create the Ghost schema in Gatsby

I currently have a Gatsby project based on the Gatsby-Ghost-Starter project. The Ghost schema is no longer being generated in Gatsby for some reason, and I can't seem to figure out why. As a result, I get the following error:
There was an error in your GraphQL query:
Cannot query field "icon" on type "GhostSettings".
If you don't expect "icon" to exist on the type "GhostSettings" it is
most likely a typo. However, if you expect "icon" to exist there are a
couple of solutions to common problems:
If you added a new data source and/or changed something inside gatsby-node.js/gatsby-config.js, please try a restart of your
development server
The field might be accessible in another subfield, please try your query in GraphiQL and use the GraphiQL explorer to see which fields
you can query and what shape they have
You want to optionally use your field "icon" and right now it is not used anywhere. Therefore Gatsby can't infer the type and add it to the
GraphQL schema. A quick fix is to add a least one entry with that
field ("dummy content")
It is recommended to explicitly type your GraphQL schema if you want
to use optional fields. This way you don't have to add the mentioned
"dummy content". Visit our docs to learn how you can define the schema
for "GhostSettings":
https://www.gatsbyjs.org/docs/schema-customization/#creating-type-definitions
This error message is basically repeated for every page and query field that uses anything related to the Ghost schema. I pulled up the GraphiQL explorer to see if I could access the fields there, and it indicated there is no schema available (as seen in the screenshot here). I tried rolling back to previous commits, deleting .cache and node_modules, updating all packages, and re-cloning the repo to no avail.
My latest commit was able to compile with no problem in the production environment, so I think it's some sort of misconfiguration on my machine...The environment variables are all identical, and I tried using the production Ghost server as my "ghost-source" on my local machine (since I know it works if the production build compiled successfully), but nothing changed. I've been stuck on this for days and have no idea how to even debug what's happening right now. Any advice/insights would be greatly appreciated.

Using Entity Framework with Oracle and Mapping Inheritance - Table-per-Type. Trigger updated Id is not being set in subclass table

I am using Oracle with Entity Framework. The database ids are generated using triggers and sequences.
I want to set up Table-per-Type inheritance, as described here. I've set the "CourseId" to be StoreGeneratedPattern of "Identity".
Everything seems to be fine, except when I insert a row. The table representing the base class (in the walkthrough linked above, the Course table) gets a generated ID as expected.
However the table representing the inherited class (in the walkthrough linked above, the OnlineCourse table) has a row inserted with the CourseId set to zero. This violates the foreign key constraint.
I assume it's something to do with the sequence of inserts. I imagine it should work like:
Insert the Course row
Retrieve the newly created CourseId value
Insert the OnlineCourse, using the new CourseId
However, this isn't working because it's just using the default value of the CourseId (zero) to insert into OnlineCourse.
Any ideas how to fix this?
Since #Campinho hasn't written up his suggestion as an answer, I will do it.
This article has some background on a bug in StoreGeneratedPattern in VS2010.
One of very important features in ORM tools is an ability to get data auto-generated by a database during the entity persistence back to your application. The Entity framework supports this feature by setting StoreGeneratedPattern in the configuration of persisted property. The StoreGeneratedPattern setting is available in both SSDL (Store schema definition language) and CSDL (Conceptual schema definition language) parts of the EDMX file. CSDL configuration allows you defining the reloading behavior in the Model-first approach but SSDL part is responsible for generating correct SQL commands which will persist the entity and reload auto-generated properties. Unfortunately for a long time this was the source of all problems.
The feature was very hard to use because of the annoying bug in the Entity designer. When we set the property in the designer, the value was saved only in CSDL part but not in SSDL part of the EDMX file and the feature didn't work until we opened the EDMX file as XML and manually modified SSDL part. This solved the problem but only until we updated our model from the database. The update always deleted whole SSDL part including our manual change so we had to do it again. Any incremental development of our models become a big pain. The workaround was using mapped stored procedures for inserting and updating entities and mapping result sets (returning auto-generated data) from these stored procedures back to the entity. Finally this bug is solved in Visual Studio 2010 SP1 and we can use StoreGeneratedPattern without any problems because the value is correctly set in both CSDL and SSDL parts and it is not overwritten during updating from the database.
If you have this problem install KB2561001.
I installed the hotfix and changed the StoreGeneratedPattern to "None" then back to "Identity" for the relevant Ids. I could clearly see the SSDL section had been updated to indicate the new setting.
Then everything just worked! I'm not sure what's going to be in the patch from Oracle that they think will fix the problem.
I filed a service request with Oracle and it turns out this is a bug in their provider.
BUG 13724992 - EF: ENTITY NOT UPDATED AFTER SAVECHANGES USING STOREGENERATEDPATTERN
A fix for this bug will be released in an upcoming patchset. However, which patchset in will be included in and when that patchset will be released is currently unknown. I will let you know as soon as this fix will be released.

TFS Bug template + Adding custom fields

I am trying to add custom field to a bug in TFS.
I opened the Bug Work Item Type but i have to enter the RefName as show in the image below.
Does any body know how can create Custom RefName
I tried to do as Ewald Hofman said, i got the below error
Just enter a name. It is used as the identifier for the column in the rest of the work item and in the warehouse.
A possible format is YourCompanyName.Category.FieldName

Core Data Migration error message "'Model does not contain configuration 'XYZ'.'"

I have a Managed Object Context to which I add two different SQLite stores. I use Configurations in the Mananged Object Model to assign certain entities to one store and other entities to the other. The Configurations are called "UserDB" and "MainDB".
Everything works okay until I try to use automatic migration. After creating a new Managed Object Model version, and adding a new attribute to one of the entities in the UserDB Configuration, I get an exception when adding the old version store (for the UserDB related store) to the store coordinator: 'Model does not contain configuration 'UserDB'.' I can find no hits for this error on Google. Anyone out there using multiple stores with Configurations? Anyone have an idea what I might be doing wrong?
The stack looks like this:
objc_exception_throw
-[NSManagedObjectModel isConfiguration:compatibleWithStoreMetadata:]
-[NSStoreMigrationPolicy sourceModelForStoreAtURL:metadata:error:]
-[NSStoreMigrationPolicy(InternalMethods) _gatherDataAndPerformMigration:]
-[NSPersistentStoreCoordinator addPersistentStoreWithType:configuration:URL:options:error:]
-[MyAppDelegate persistentStoreCoordinator]
This looks like a bug with migration+configurations. I was able to work around the problem by going through the same motions and passing nil for configuration when calling addPersistentStoreWithType. The migration happens, and then I can make a new persistent store coordinator and add the stores again with the proper Configuration string arguments.
This is the second configuration related bug I've run into. Not a well tested feature apparently.
I had the same problem. The fact pattern was identical and the error message the same. It turned out, however, to be the result of my own mistake.
Let's say the old model was Blah.xcdatamodel and the new Blah 2.xcdatamodel. I had started making changes to Blah before realising my mistake and creating Blah 2. I then used my version control system (Git) to revert to the old Blah and then recreated Blah 2. Everything looked right. But I must have done something wrong in the reversion process, because when I thought to double check that Blah.xcdatamodel in my current project folder was really the same as Blah.xcdatamodel in the project folder I used to build the previous version of the app (fortunately I always keep a zipped archive of the project folder for each released version as I don't fully trust version control systems), I found that they were in fact different, albeit that they looked identical in XCode. The file size was different, for instance.
I substituted the old Blah into my current project folder, and lo and behold it all went perfectly, without any need for the workaround described by Ken.
I am not saying that Ken had necessarily made a similar mistake, but if you do encounter this message it is at least worth confirming that the model you are migrating from is REALLY the model that was used to create the data in question.

Resources