Notification when an Internal Note is in a Person's record

Hi All.

I was wondering how to display a notification or an alert message that there is an internal note found within a person's record.
I'm currently using 7.2e and will be going to 7.3 shortly.

I have no real clue where to start with notifications. I assume there is SQL code required to display a message.

Let me know.

Thanks,

Stephane L

  • 0

    Has anyone tried using this? help.sagecrm.com/.../crm.html

    I'm not sure if I can use this to trigger what I want to do?

  • 0

    Stephan

    I am not sure what you mean by an "internal note". Is this an entry in a field on the person table? Or an entry in the Notes table? Do you mean an alert if any 'Note' is found or if the 'Note' contains a certain value? And who should be notified? Should anyone viewing the data be notified or should only the account manager of the person (or company) be told?

    Should the notification only display when the person record is viewed or should it be displayed everywhere in the system? Do you want the notification only displayed when a users is logged on into Sage CRM or should the alert be sent to them via email or an SMS message?

  • 0

    Hi Jeff.

    Thanks for your quick reply.

    Anyone viewing an internal note (from the people's tab) should see a message indicating that there is a note.The notification should only display when the person's record is viewed.

    Let me know.

    Thanks, Stephane

  • 0

    Stephan

    You could use a number of approaches. It would be very tempting to use the client side API to do this as it can issue Ajax calls into the database and then display a message on the screen. The small trouble with that is that it requires there to be underlying views to set up on the Notes table that are exposed to SData. SData is our RESTful API used by the Client Side API. There are articles that discuss that. But unfortunately there is one Notes view created by default in the system and that is not exposed to SData. That means we would have create a view, expose to SData and then write the client side code to do the lookup.

    So instead we could take a simple approach like only displaying the 'Notes' tab if there are notes for that person. E.g.

    You could do that by adding the following into the SQL Clause of the 'Notes' tab in the Person Tab group.

    exists (select * from vnotes where Note_ForeignTableId = 13 and note_foreignid = pers_personid)

    Or you could you use the dummy field approach.

    See: community.sagecrm.com/.../how-do-i-put-calculated-or-derived-info-in-a-screen-s-top-content.aspx

    The below code is the script you could add to the Create Script of the dummy field to announce whether you have Notes or not

    var intRecordId = CRM.GetContextInfo("person","pers_personid");

    var myRecord = CRM.FindRecord("notes","Note_ForeignTableId = 13 and note_foreignid="+intRecordId);

    if (!myRecord.eof)

    {

    Caption = "You have notes";

    }

    else

    {

    Caption = "No notes";

    }

  • 0

    Perfect.

    This is exactly what I was looking for.

    Thank you very much.

    Stephane