Email alert on Maintenance Schedule Detail

66 views
Skip to first unread message

Rasika Dhingra

unread,
Sep 17, 2014, 1:28:18 AM9/17/14
to erpnext-u...@googlegroups.com
Hi

I am setting up email alert for the doc maintenance schedule detail (based on the schedule date). I need to use some details like customer details from the doc Maintenance Schedule. How do i do that?

Thanks
Rasika

Rushabh Mehta

unread,
Sep 17, 2014, 2:10:52 AM9/17/14
to erpnext-u...@googlegroups.com
On 17-Sep-2014, at 10:58 am, Rasika Dhingra <rasik...@gmail.com> wrote:

Hi

I am setting up email alert for the doc maintenance schedule detail (based on the schedule date). I need to use some details like customer details from the doc Maintenance Schedule. How do i do that?

You can customize using Jinja Templating 

What do you want specifically?


Thanks
Rasika

--
You received this message because you are subscribed to the Google Groups "ERPNext User's Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-fo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/0e33a05d-5b1e-4323-b408-3da97dd311ea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rasika Dhingra

unread,
Sep 17, 2014, 2:21:41 AM9/17/14
to erpnext-u...@googlegroups.com
Using the email alert feature, I am creating an email alert on the Document Type "Maintenance Schedule Detail" for maintenance visit due.

This is what I have written in the message for the email alert

***
{{ doc.item_name }} is scheduled on {{ doc.scheduled_date }}

The details are as below:

Customer - {{ doc.customer }}
Contact Person - {{ doc.contact_person }}

Please take relevant action.

***
However, the fields Customer and Contact Person are a part of the Form "Maintenance Schedule" and not "Maintenance Schedule Detail".

So my query is, whether I can use the customer details from the "Maintenance Schedule" form while creating alert on the "Maintenance Schedule Detail" 

Hope I have been able to clarify it.

Thanks
Rasika

Rushabh Mehta

unread,
Sep 17, 2014, 2:51:18 AM9/17/14
to erpnext-u...@googlegroups.com
you will have to do this:

```
{% set maintenance_schedule = frappe.get_doc("Maintenance Schedule", doc.parent %}

{{ maintenance_schedule.customer }}
```

try if this works!


--
You received this message because you are subscribed to the Google Groups "ERPNext User's Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-fo...@googlegroups.com.

Rasika Dhingra

unread,
Sep 28, 2014, 9:35:21 AM9/28/14
to erpnext-u...@googlegroups.com
I tried this..it is not working.

There seems to be some syntax error, one parenthesis is missing in the first line.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+unsub...@googlegroups.com.

Rushabh Mehta

unread,
Sep 29, 2014, 1:27:36 AM9/29/14
to erpnext-u...@googlegroups.com
```
{% set maintenance_schedule = frappe.get_doc("Maintenance Schedule", doc.parent) %}

{{ maintenance_schedule.customer }}
```



@rushabh_mehta

-- 
1. Please be kind and don't send large attachments
2. For issues, features requests use https://github.com/frappe/erpnext/issues
--- 

You received this message because you are subscribed to the Google Groups "ERPNext User's Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email toerpnext-user-fo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/33c86fb6-4b13-4da9-a607-cf3590d2b9e1%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages