locked
Enable notes on custom entity. RRS feed

Answers

  • Got it working: this is what I had to do:

    1. export the customizations for the entity
     
    2. edit the customizations setting the <HasRelatedNotes> attirbute to True and adding a <tab> section for Notes (as copied & amended from another entity having notes)
     
    3. insert the relationship directly into the following MetadataSchema tables in the CRM database:
    Relationship
    RelationshipIds
    EntityRelationship
    EntityRelationshipIds
    EntityRelationshipRelationships
    EntityRelationshipRole (1 record for each side of the relationship)
     
    4. regenerate the cascade functions in the CRM database, either by creating and dropping a dummy custom entity, or running CascadeGen.exe

    Tuesday, June 15, 2010 4:01 AM

All replies

  • Hi,

    As there is no way to enable notes after creating entity through supported way. only you can inject entity customization xml file and try to enable it. As a reference you can try to export another entity customization where notes is enabled and try to implement the same in the entity where notes is not enabled.

    But if number of columns are less then it's better to create entity again.

    Also if number of columns more then you can try to create entity again and inject newly created entity,columns from early created entity(without notes) customization, I think it will little bit easy.

     

    Hope it will help you !!


    Mahain
    Monday, June 14, 2010 5:44 AM
    Moderator
  • Hi,

    following error means that you have done Step 3 correctly as mentioend in http://social.microsoft.com/forums/en-us/crmdevelopment/thread/FE2F5C9C-4E7D-4C2E-B5DE-601244FD60E4

    "Failure: alp_arrivals_Annotations: The entity relationship role of the referencing entity is required when creating a new one-to-many entity relationship alp_arriavls_Annotations."

    This step is to create relationship between notes and your custom entity. can you please confirm this is been added correctly as mentioned in http://social.microsoft.com/forums/en-us/crmdevelopment/thread/FE2F5C9C-4E7D-4C2E-B5DE-601244FD60E4

    Monday, June 14, 2010 8:24 AM
  • Hi,

    I copied the relationship from another entity that has notes enabled & changed the entity name, but still get the error. I'm thinking that if I could insert the relationship directly into the metadata tables all would work, but unsure how.

    Thanks,

    Mike

     

    Monday, June 14, 2010 11:05 PM
  • Got it working: this is what I had to do:

    1. export the customizations for the entity
     
    2. edit the customizations setting the <HasRelatedNotes> attirbute to True and adding a <tab> section for Notes (as copied & amended from another entity having notes)
     
    3. insert the relationship directly into the following MetadataSchema tables in the CRM database:
    Relationship
    RelationshipIds
    EntityRelationship
    EntityRelationshipIds
    EntityRelationshipRelationships
    EntityRelationshipRole (1 record for each side of the relationship)
     
    4. regenerate the cascade functions in the CRM database, either by creating and dropping a dummy custom entity, or running CascadeGen.exe

    Tuesday, June 15, 2010 4:01 AM
  • Further questions regarding this:

    Some have said there is no "supportable" way of adding the notes relationship... what are the implications of using this possibly unsupported method (given that it works)?

    Or perhaps it is possible to create this in a supported way using the SDK?

    Thanks.

    Tuesday, June 15, 2010 11:33 PM
  •  

    method mentioned in http://social.microsoft.com/forums/en-us/crmdevelopment/thread/FE2F5C9C-4E7D-4C2E-B5DE-601244FD60E4 works.

    just delete the old entity before import to get rid of  "The entity relationship role of the referencing entity is required " error message.

     regards.

    Sunday, August 22, 2010 11:10 PM
  • Can you post the SQL query used to do this?

     

    3. insert the relationship directly into the following MetadataSchema tables in the CRM database:
    Relationship
    RelationshipIds
    EntityRelationship
    EntityRelationshipIds
    EntityRelationshipRelationships
    EntityRelationshipRole (1 record for each side of the relationship)
    Thursday, December 9, 2010 8:55 PM