We want to create a functionality such that when we have update on the few fields in the inventory module and it should send an email particular set of users on the weekly basis.
In the email, we want to send an table with details like name, dept, present_count, future_count, etc. for the multiple records. We have these info in the inventory module.
How can we achieve it?
Using v7.13 and we are thinking to use email template, workflow & scheduler.
Not easy. First problem is workflow will run on a date or relative day but not every 7 days. So you’ll have to create within the workflow some kind of “date last sent” and then logic that updates it to “today” when sent and then triggers when date last sent is equal to today - 7 days.
The variables are going to be tricky. Unless the variables come from the record you are sending to (I’m guessing not) you’re not going to be able to pull the “count” for example if that data comes from a product.
Your options are build your own email and scheduler via code, which is pretty straightforward, or I think maybe @pgr 's plugin might work to help you get the variables in the email template to allow you to use workflow and email templates.
I check last run field on the scheduled reports but I don’t have any datetime there. Also, I did not receive an email with this report.
I have few fields in this module holding name & numbers. So, in the suitecrm report I am making report like a table with this data. Now, I just want to email this same table to few users every week. I hope I am able to explain you what we are trying to do.
That should be the report generation schedule tasks page - you should see them all flowing like that.
I’ve had trouble with cron before with having to specify the cli version of php within the crontab file itself - using the installer crontab suggestion didn’t quite work for me, when i get home i’ll dig these examples out to share with you and i’ll have a look to see if i’ve done anything similar to what your trying to achieve and share that with you.
@pstevens, Little confused. Do we need to define Job URL too?
Under job: we are selecting Run Scheduled reports. So we if want to send two different scheduled reports at same time then we can just use one schedular?