Personalized Community is here!
Quickly customize your community to find the content you seek.
Have questions on moving to the cloud? Visit the Dynamics 365 Migration Community today! Microsoft’s extensive network of Dynamics AX and Dynamics CRM experts can help.
2023 Release Wave 1Check out the latest updates and new features of Dynamics 365 released from April 2023 through September 2023
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Community | FastTrack Program | Finance and Operations TechTalks | Customer Engagement TechTalks | Upcoming TechTalks | All TechTalks
I am doing something not standard, but I have to do.I am gonna update CRM365 database from previous backup; with a query.I had created two custom entity.
One named service.Another named service name.Service name is look up in service entity; so it has 1:N relationship with service entity.The relation was referential.Unfortunately a client had delete access and has deleted the two record of Service name entity.
Likewise Service name look up field of every records of Service that had those two deleted records are null now !Now when write update query between two databases and two tables it return me :
The UPDATE statement conflicted with the FOREIGN KEY constraint "reltion_name". The conflict occurred in database "x", table "service_nameBase", column 'service_namesId'.
How can I solve this problem?I changed relation between them from referential to configurable cascading and set all configuration to cascade all.But no success.I know that this job is not recommended, But as I said I have to.These two entities are both custom and non-system entity.Any help will appreciate.
Hope this finds you well. As you have said that running an update , being part of the community we all know that it is unsupported, but if you have to adopt a suggestion, there is one which cross my mind now. If we disable Foreign key constraint on the table and then update the records and then re-enable it, may work in this case. How to diable the foreign key from SQL Management studio object explorer, I found an article as below :-
In Object Explorer, expand the table with the constraint and then expand the Keys folder.
Right-click the constraint and select Modify.
In the grid under Table Designer, click Enforce Foreign Key Constraint and select No from the drop-down menu.
Kindly note this is unsupported change what we are doing and we are not sure what complications it can cause.
Hope this helps.
Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.
That worked for me in test environment!
But something horrible happened in real environment .
Check the next thread !
Can you please paste the thread link in this post and mark my post verified if it helped you
Business Applications communities