locked
CRM 4.0 entity publish error RRS feed

  • Question

  • We tried to add some values to picklist attributes. Once we saved the attributes and entity, click publish, the following error showed up:

    An error has occurred.
    Try this action again. If the problem
    continues, check the Microsoft Dynamics CRM Community for solutions or
    contact your organization's Microsoft Dynamics CRM Administrator. Finally,
    you can contact Microsoft Support.


    We also tried to delete all values we added, added a new attribute,still cannot publish.

    The other entities we worked on are works fine.

    Anyone can help?

    Thank you very much!
    Thursday, September 18, 2008 3:10 PM

Answers

  • If you have a problem entity, importing customizations from another environment typically won't fix it--importing customizations doesn't delete anything, so any messed up attributes, etc, will still be there.   One thing to try is delete the custom attributes from the entity if it is a system entity, or delete the entity if it is a custom entity, then import will work. 

     

    Of course, that's not an option if data is there that you want to keep.

     

    If your goal is to make changes to A or B and then import into C, what I would do is back up your C database and import to B as a new organization.

     

    Actually, if you want to go through a proper dev/qa/prod scenario, import C in as a new organization  in A and B, then you can make changes in A, import customizations to B, then import from B to C. 

     

    Where this typically falls apart is if you manually make the same customization into multiple environments, then try to import from one to another.

    • Marked as answer by Jim Glass Jr Monday, March 30, 2009 7:40 PM
    Tuesday, December 30, 2008 8:47 PM
    Moderator

All replies

  • You can activate tracing. Search on google for "enabling CRM tracing" to get the walkthrough.

     

    Then you can set the following trace category in the registry (TraceCategories key in the MSCRM hive).

     

    Platform.ImportExportPublish:Error or Platform.ImportExportPublish:Warning

     

    Try republishing your customs and check the trace log file for a detailed error message.

     

    Hope it helps

    Thursday, September 18, 2008 7:58 PM
  • Hi, Moumst,

    Thank you for you reply.

    I followed the instruction on http://support.microsoft.com/kb/907490, also set the trace category as you suggest.

    I set the TraceDirectory as C:\Program Files\Microsoft Dynamics CRM\Trace

    Republishing customs, error again but no trace log files showing up

    Here are the registry I added:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM\TraceEnabled value==1
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM\
    TraceRefresh value==0
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM\TraceDirectory value==C:\Program Files\Microsoft Dynamics CRM\Trace
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM\TraceCategories value==Platform.ImportExportPublish:Error

    Is there anything wrong?


    Thanks





    Friday, September 19, 2008 6:56 PM
  • Hi.

    Please try an IISRESET and should that fail restart the server. Usually config changes are read into cache which is only re-read when initializing.

    Let me know if that worked.

    Karlo
    Friday, September 19, 2008 7:06 PM
  • IISRESET doesn't work.

    Thank you anyway.

    Anyone have better idea?
    Monday, September 22, 2008 8:13 PM
  • Yes,

    Download the crm diagnostic tool

    http://blogs.msdn.com/benlec/archive/2008/03/04/crmdiagtool4-for-microsoft-crm-4-0-has-been-released.aspx

    Turn on dev errors

    recreate the error

    this should now give you a more detailed error message.

    also, with this tool, I would recommend that you turn on crm platform trace, recreate the error, then turn off platform trace.  This will create a log file that should give you more detail.

    Do the same thing on the sql server for a sql trace.

    Problems with publishing entities can be caused by issues on crm as well as sql issues.

     

    Check your crm and sql server event logs--see if there are any relevant errors.

     

    Check your disk space on SQL--I have seen errors like this when a SQL server gets too low on disk space.

     

    Other things I have seen cause errors like this--

     

    If you are importing customizations from another environment, and you already have a custom entity or entity attribute with the same name as one of the entities that you are trying to import, this will cause an error.

     

     

    Tuesday, September 23, 2008 7:03 AM
    Moderator
  •  

    Well,

     

    Use the CRM diag tool or when I update tracing settings in the registry, I always update the

    TraceRefresh key twice to be sure CRM registry key watcher catch the changes.

     

     

    For exemple:

     

    Update TraceEnabled key or TraceCategories key then

    TraceRefresh==1

    TraceRefresh==0

     

    Then CRM should have taken the update into account.

     

    Hope it helps.

     

    Bye bye

    Tuesday, September 23, 2008 12:00 PM
  • Anyone figured out how to fix this?  I may have imported an item (opportunityproduct) that referenced a custom object that either was created after the import or prior to the import with a different name.  I've checked all the lookups and relationships and they all seem to be valid.  I've tried deleting the relationships and recreate, but I get an error that I can't when I try.

    I've run the trace, but the log is pretty big and doesn't seem to make sense to me.

    I've tried re-importing the entity as well as importing the backup/original entity and that doesn't seem to work. 

    What was your issue and how did you resolve it?

    Thanks...
    Tuesday, December 30, 2008 8:16 PM
  •  

    search the trace file for the word error--that will help you find the error, and potentially what caused it.

     

    Have you had any workflow rules on this entity that referenced attributes that you have subsequently deleted?  If so, query the workflowdependencybase table.  Does this attribute appear in either the relatedattributename column or the dependentattributename column? 

     

    There is a glitch where when you delete a workflow rule, it leaves artifacts behind that can cause problems when deleting or publishing an entity if the referenced attributes are no longer there.

     

    The other thing is, where are you importing from?  If you have two environments, Env. A and Environment B, and you customize an entity in Env. A and also customize it in Env B, it will throw up errors when you try to import from B to A, especially if you have created some of the same attributes manually in both.

     

    Recommendation is to set up your test environment and import an exact copy of your prod environment, then when you make changes to your new environment, you will be able to import those customizations into your prod environment.

    Tuesday, December 30, 2008 8:30 PM
    Moderator
  • ***...so I think that is what is going on.  I had environment A and B (and actually, C - Production). 
    A was all messed up...so we created B and imported a copy of C.  We made some changes to B and then imported some A and now it's just ugly.  I think the solution may be to do a complete re-import of C and redo (by hand) changes needed.

    I had tried reimporting just the problem entity, but that didn't work.  If I import all customizations, will I still have "extra" stuff? 

    Thanks for you help.  I think I may try the reimport of original stuff.
    Tuesday, December 30, 2008 8:39 PM
  • If you have a problem entity, importing customizations from another environment typically won't fix it--importing customizations doesn't delete anything, so any messed up attributes, etc, will still be there.   One thing to try is delete the custom attributes from the entity if it is a system entity, or delete the entity if it is a custom entity, then import will work. 

     

    Of course, that's not an option if data is there that you want to keep.

     

    If your goal is to make changes to A or B and then import into C, what I would do is back up your C database and import to B as a new organization.

     

    Actually, if you want to go through a proper dev/qa/prod scenario, import C in as a new organization  in A and B, then you can make changes in A, import customizations to B, then import from B to C. 

     

    Where this typically falls apart is if you manually make the same customization into multiple environments, then try to import from one to another.

    • Marked as answer by Jim Glass Jr Monday, March 30, 2009 7:40 PM
    Tuesday, December 30, 2008 8:47 PM
    Moderator
  • Thanks...I believe that is exactly what happend - mixing manual changes and customization imports.  I can't delete custom attributes from my opportunity product entity (for whatever reason). 

    I think I'll do the re-import of C as a new org - basically start over. 

    Hey, at least I'd been documenting my steps - since our original Dev (A) was so out of wack and we came up with this idea of a new B...Anyway, sounds like I'm at a stopping point till I get my Sys Admins with access to prod to re-do everything I begged them to do last week (again) Smile


    Tuesday, December 30, 2008 8:52 PM
  • Hi Sdavidow,

    I was wondering if you ever got this to work?

    I think I'm having the same issue..



    Thank you in advance!

    Regards,

    Anne
    Monday, March 30, 2009 6:38 PM
  • Hi, I am having the same problem as described above.  Did any body actually get a resolution to this?

    Thanks
    Friday, May 15, 2009 1:50 PM
  • Ditto.  Same problem.  Starting from scratch isn't an option.  Fortunately, the two little entities I have problems with are empty.  I'd love to just wipe them out and start fresh, but the system won't let me.

    Thanks!
    Susan
    Susan
    Monday, June 15, 2009 1:26 AM
  • Found two possible sources/solutions:
    1.  If the entity was imported, look for a missing relationship.  If there is an attribute prompt on the form with an empty space where a lookup would be, recreate the relationship exactly as it was structured originally.  In my case, this was the fix and everything worked immediately.
    2.  Another contributor reported that he had a picklist where he'd deleted the entries.  Apparently, CRM insists that picklists use item 1.  When he corrected that (In SQL, I believe), everything worked.

    Hope this helps!

    S
    Susan
    • Proposed as answer by SSECRM Monday, July 6, 2009 1:01 PM
    Monday, July 6, 2009 6:53 AM