locked
Notes RRS feed

  • Question

  • I have a custom entity FmProcessing, which has the notes option enabled.

    I have created a SSRS report for this entity, but due to the complexed nature of the report, I have had to use SQL to query CRM. I would like to report the notes on any record form that table. In SQL where would I find the notes   and how would they be linked to the entity


    Dont ask me .. i dont know

    Wednesday, September 18, 2013 8:39 PM

Answers

  • Hi Pete,

    The notes would be in the FilteredAnnotation view linked to your entity by the objectid column. You could use SQL similar to the following to retrieve notes:

    SELECT FilteredAnnotation.notetext
    FROM FilteredAnnotation
    INNER JOIN FilteredNew_FmProcessing ON FilteredAnnotation.objectid = FilteredNew_FmProcessing .New_FmProcessingId


    Michael Palmer
    xRMPalmer     @MJFPalmer     Rockstar365


    • Edited by MJFPalmer Wednesday, September 18, 2013 9:04 PM Bug in supplied code
    • Proposed as answer by JLattimerMVP, Moderator Wednesday, September 18, 2013 9:04 PM
    • Marked as answer by Pete Newman Wednesday, September 18, 2013 9:05 PM
    Wednesday, September 18, 2013 9:02 PM
  • Check the AnnotationBase table - ObjectId & ObjectTypeCode link to the related record and type.

    Jason Lattimer
    My Blog -  Follow me on Twitter -  LinkedIn

    Wednesday, September 18, 2013 9:04 PM
    Moderator

All replies

  • Hi Pete,

    The notes would be in the FilteredAnnotation view linked to your entity by the objectid column. You could use SQL similar to the following to retrieve notes:

    SELECT FilteredAnnotation.notetext
    FROM FilteredAnnotation
    INNER JOIN FilteredNew_FmProcessing ON FilteredAnnotation.objectid = FilteredNew_FmProcessing .New_FmProcessingId


    Michael Palmer
    xRMPalmer     @MJFPalmer     Rockstar365


    • Edited by MJFPalmer Wednesday, September 18, 2013 9:04 PM Bug in supplied code
    • Proposed as answer by JLattimerMVP, Moderator Wednesday, September 18, 2013 9:04 PM
    • Marked as answer by Pete Newman Wednesday, September 18, 2013 9:05 PM
    Wednesday, September 18, 2013 9:02 PM
  • Check the AnnotationBase table - ObjectId & ObjectTypeCode link to the related record and type.

    Jason Lattimer
    My Blog -  Follow me on Twitter -  LinkedIn

    Wednesday, September 18, 2013 9:04 PM
    Moderator