I need help creating a workflow related to notes

We are a company that develops fleet management software. We use SuiteCRM to track our clients and prospects. After each interaction with a client, I create a note in SuiteCRM.

My ultimate goal is to automate a report that lists all client accounts where no note has been created in the last three months.

I couldn’t find any option in the reports to create this automation. So, I created a new field in the accounts called “Date of Last Note” with the goal of sorting by the last note date and quickly identifying neglected accounts.

However, now that I’ve created this new field, I tried to set up a workflow to automatically update the “Date of Last Note” field, but it’s impossible.

Could someone help me?

Welcome :smiley:! so, the date of last note is today’s date?

Hello, The Date of Last Note should match the creation date of the most recent note.

What is your SuiteCRM version? You may need to use logic hook? Are you developer?

My SuiteCRM version is 7.14.4. I’m not a developer, but I work with developers. The SuiteCRM workflow doesn’t allow me to directly fulfill my request, right?

Can you please share your workflow screenshot? What module, conditions and actions have you set?

  • Remove the condition
  • Run only “on save”
  • Instead of writing a date stamp, save the note id in the parent account

The idea would be simply: when saving a note, “stamp” the parent account with the current note’s id.

Then a report can (for each account) fetch all the data from the correct note (including its date)

Thanks for your feedback, that indeed seems like a good idea. However, I’m not very comfortable with creating workflows.

Could you detail how to save the note ID in the account? (And update it with each new note.) Should I create a field for this that would store the note’s ID?

this is my new actual workflow :

Looks good, you’re almost there.

Yes, you can create a new custom field to store the note id. However I sometimes avoid this and just “re-use” any other existing text field that I am not interested in using. But anywhere you can store some text data is good.

I am going through the details here for my understanding and knowing more about the notes modules. Could you please help to understand if we really want more custom fields if we already have fields such as contact id, account_id, note name, and note modified_date fields. I guess these fields are enough for fetching the report of notes where no interactions for last three months. Thanks for sharing the questions and suggestions in this conversation.

Update: I tried to create a new report that I think provides the accounts for which I haven’t interacted for last three months. I am not sure if this what you are looking for.

Hello, and thank you for your help on this topic.

The problem with this report is that it lists all notes older than 3 months. However, I want to be alerted only if the last note dates back more than 3 months.

With this report, I end up with many duplicates, and it also displays notes older than 3 months even if newer notes have been added since then.

That’s why I believe the “Date of Last Note” field is necessary.

Okay, perfect, it’s done. I modified my “Date of Last Note” field to “ID of Last Note”.

Nom what actions should I include in the workflow to update this ID each time a note is created?