2020: Automagically Associate Zoho Project Invoice with Deal through Zoho Books workflow

3 years ago
12

Do you use Zoho Projects to manage your project budgets and performance? If so, you likely invoice through your project in Zoho Projects. Have you noticed that even though the project is associated with the deal, it doesn't attach the invoice to the deal in the Zoho Finance related list in CRM?

Maybe you haven't.

This video shows you how to use a Zoho Books workflow and custom function to re-associate the Project invoice to the associated deal.

The included code:

//This is a sample function. Uncomment to execute or make changes to this function.

invoiceID = invoice.get("invoice_id"); i
nvoicedate = invoice.get("date").toDate();
organizationID = organization.get("organization_id"); t

heLineItems = invoice.get("line_items");

for each li in theLineItems
{
theProjectID = li.get("project_id");
}
info theProjectID; theProject = zoho.books.getRecordsByID("Projects",organizationID,theProjectID);
info theProject;
theProjectName = theProject.getJSON("project").getJSON("project_name");
info theProjectName;
theDealRecord = zoho.crm.searchRecords("Deals","Deal_Name:equals:" + theProjectName);
theCRMProjectID = theDealRecord.getJSON("id");

mp = Map();
mp.put("zcrm_potential_id",theCRMProjectID);

resp = zoho.books.updateRecord("Invoices",organizationID,invoiceID,mp);

Link to start your free trial of Zoho ONE: https://www.edkinsgroup.com/zoho-free-trial.html

The YouTube Zocademy channel is meant to provide educational information regarding business best practices with an emphasis on the Zoho Platform. Our objective is to empower people like yourself to learn how to get more done with less.

We also have a website where you can purchase mini-courses to learn more in depth. We also offer memberships. The memberships include access to all mini-courses each month.

Feel free to visit at: www.zocademy.com

Loading comments...