Quick Tips - Can’t Open forms after an instance copy

October 2, 2018

 

 

Quick Tips - a succinct post which handles a specific tip or topic; not requiring too much explanation or guidance.

 

Continuing my trend of copying Dynamics 365 instances, I had another usual occurrence but this time a lot more serious. I copied a D365 8.2 instance from Live to Sandbox as a Full Copy and I couldn’t open any of the following records:

 

  • Accounts

  • Contacts

  • Leads

  • Opportunities

  • Quotes

 

I could open activities so I know the copy didn’t fail, it just had some unexpected side effects. Every time I tried to open a record or create a new record I’d get an error which wasn’t helpful: “nullreferenceexception”. Great.

 

I tried a couple of things at this point, I published all customisations a few times, I reset the instance and did the Full Copy again which made no difference. I tried a minimal copy and still couldn’t create a new record. I did the full copy once more and tried to understand the issue.

 

I went into the form designer for Accounts and it loaded up fine, that’s a good start. I wondered if it was some sort of caching issue so I previewed both the create and edit forms from the form designer and to my surprise they both loaded fine.

 

I tried a couple of Ctrl+F5’s in my browser but I still couldn’t open a record or create a new one. I turned to Google and there really wasn’t any information about this issue, the best I could find was an article which mentioned being unable to open forms when a managed solution was imported and a field was added.

 

Their fix was to open the form editor in the target instance and remove, one by one, all fields, publish and test, until the cause of the issue is found. I have better things to do with my time than this but it did lead me onto a new train of thought which was something with the form itself.

 

I opened the Account form editor and clicked “Save As” and named it Account 1 (snappy name) and published the changes. I then went into the form selector in the solution editor and clicked on the form order button, moving my new form up to the top.

 

 

 

Once this was done, I decided to enable the form for fallback while removing the current form from being enabled for fallback. To do this, click on the form in the form selector and click “Enable Security Roles”

 

 

Once done, I published all customisations in the solution and I could now load the account form. Even stranger, I could now load all the other forms which I previously couldn’t, without going through the same steps for each.

 

This could have a time related bug which fixed itself and my later steps might not even have helped, but these are how I fixed this issue so I thought i’d share.

 

Ciao for now!

 

Please reload

Recent Posts

Please reload

Archive

Please reload

Tags

D365 Blog by Matt. ©2018