Make a quick vote 🗳 ️How do you refer to SuiteCRM extensions: add-ons or plug-ins? Click here to have your say 👈

How to check that some values changed in a specific module database using Rest API?

How do I check that some value has been changed or added in a specific module database?
using Cron jobs I can do it but it’s not the right way to do it. does anyone can suggest how I can do this?

you could use a method like get_entry_list and filter for records accordingly to their date_created or date_modified attribute. If you want to look for changes within a specific field, you could add a date-field that holds the date when this field was changed (e.g. by a workflow) and then request records based on that attribute.

1 Like

@diligent thanks for your suggestion.
I want to store a specific module data on another server database in real time.
for example :- Product module : when user add new product to the module how do I know that the user added a new product or updated existing one.
I already done it using cron jobs but it’s not the right way because if user has large number of data then it’ll increase server load.

any other way of doing this?

I could imagine that logic hooks might be a better approach for you:

You can execute custom php code per module for specific events (e.g. “record updated”, “record created”, “new relationship added” and so on).
Based on these events, you can either call the API of your second application or you write a script that directly accesses the second database (even though the API is what I would use). This is basically a real-time synchronization from the CRM to another application.

@diligent thanks.
I am new to the suiteCRM. I’ll try your suggestion and update the post if my issue resolved.

Thanks for your support :slight_smile: