Hi,
I hope someone can help.
Firstly, I will explain what I have working, then describe what I can’t get to work.
Working functionality:
Find the last record entered by the logged in user, store the record ID, send a PDF version of all records in the view by email, and finally open the view with the single record in the same window. The steps I’m following are:
{
if (Mentoring_Session_Report[Mentor_Login_Details == zoho.loginuserid].count() > 0)
{
requiredRecord = Mentoring_Session_Report [Mentor_Login_Details == zoho.loginuserid] sort by Modified_Time desc range from 1 to 1;
thisID = requiredRecord.ID;
sendmail
(
To : "mark@gmail.com"
From : zoho.adminuserid
Subject : "test5"
Message : "Your message"
Attachments : view:Mentoring_Session_Report_Report as PDF
)
openUrl("#View:Mentoring_Session_Report_Report?ID=" + thisID, "same window");
}
}
The above steps and function all work as expected.
Additional functionality I cannot get to work:
Same as above, although this time the PDF should only contain the single row matching the record ID found. In other words I need the PDF and the final view to display the single found record. I have tried to modify the
‘Attachments : view:Mentoring_Session_Report_Report as PDF’
line of code to something similar to
openUrl("#View:Mentoring_Session_Report_Report?ID=" + thisID, "same window")
without any success. Can anyone help?
Thanks
Mark