Re: CRM 1.2 Error Can't Find Custom Field by foursaints
foursaints
Mon Mar 27 09:11:01 CST 2006
No, I just restored the MSCRM database and that certainly turned out to be
the problem. Knowing that the MSCRM and METABASE databases were out of synch
and that I needed to restore both from the same date only solved part of my
problem, however. I had made quite a few customizations to the Account
schema and CRM forms and I needed to preserve those. I striving to do that I
inadvertently discovered a way to "alter" the length of a string type custom
field, which has no supported solution in 1.2. Here's what I did:
Before I start, here are prerequisites that made this possible:
1. CRM was in "development" mode and we did not care about minor data loss.
2. I had a backup file for both MSCRM and METABASE databases that was a)
consistent with each other and b) made prior to addition of the custom field
I wanted to modify - i.e. it didn't exist when the backup was made.
NOTE: If you have a way to "re-add" the data to the database with DTS or a
third party product like Scribe #1 may not be a problem.
Prior to doing any further restores, I took a look at the Attribute table in
the METABASE db, filtered for IsCustomField = 1 and ValidForUpdateAPI = 1
(the latter filters out the system-created "name" fields). Results showed
all the custom fields I had created in CRM to date and their attributes. I
decided the length of one of the string fields I created was too big. I
updated the size of that field in the Attributes table by altering the value
in the "length" column. I then exported all customizations to an XML file
using Deployment Manager. The XML file contained the corrected field length
for the modified custom field.
THEN I restored the MSCRM and METABASE databases from a backup made prior to
the addition of this (and several other) custom fields. Again, your system
must be able to tolerate any data loss that may occur from this restore for
this to be a viable solution.
I then reapplied customizations from the saved XML file, which not only
solved my original problem, but updated the size of the one custom filed to
the length I wanted. Be aware that you will get application errors in your
sys log for any custom fields that already exist and cannot be overwritten.
Seems this is normal.
Lessons learned:
1. Make a backup copy of MSCRM *and* METABASE databases at every benchmark
in any customization project.
2. Never restore one of the above databases and not the other.
--
''''''''**************************
''''''''My error trap just caught a monster!
''''''''**************************
"Matt Parks" wrote:
> Did you restore both the MSCRM & METABASE databases? Also, afterwards, did
> you re-publish your forms?
>
> --
>
> Matt Parks
> MVP - Microsoft CRM
>
>
> "Bob St. Aubyn" <foursaints@comcastNO*SPAM.net> wrote in message
> news:02A6384B-4302-4FAD-A3CC-8B23945BF1EB@microsoft.com...
> Here's the problem:
> Whenever I try to double-click on an account to open it, CRM throws an error
> saying check the application log. I check the app log and find an error
> saying CRM can't find one of my custom fields. The field mentioned is one
> of
> the last I put in.
>
> A few days ago I made a backup of a "clean" CRM database (no account or
> contact records) so I would have a starting point to restore from while
> testing a new migration process that would import records from a legacy
> system. Today after running a few tests I restored the db from that backup.
> Directly after running the restore I'm getting the above error.
>
> Now that I've had time to stew on this a bit, I realized that I must have
> added the custom field named in the error *after* I made the clean backup of
> the db. I took a look in CRM Deployment Manager and I *do see* that field
> listed in the Account schema.
>
> I think I'm looking for a way to re-apply the customizations shown in the
> Deployment Manager to overwrite and/or add what the database lacks. If this
> sounds like I'm on the right track please let me know how I can re-apply the
> changes. If not please suggest a different course.
>
> Thanks.
>
> --
> ''''''''**************************
> ''''''''My error trap just caught a monster!
> ''''''''**************************
>
>
>