Create a Task and Invoice all from same Form.

Create a Task and Invoice all from same Form.

I am creating an invoice from within creator. This part works fine when I create a stand-alone form. I would actually like to incorporate the invoice form in with my task form so that I can complete all info at the same time. I am attaching the create invoice code at the very end of the create task code but only the invoice gets created and sent to Zoho Invoice. How do I code this to create a task and invoice all from within the same form. I have attached my code below. As stated, only the invoice part is being create and not the task within creator. Thanks.

urlStr = "";
if (input.Task  !=  null)
{
    if (input.Task  !=  "")
    {
        urlStr = urlStr + "&details=" + input.Task;
    }
}
success message "Task added successfully";
if (((input.Date_Time  !=  null)  &&  (input.When_s_it_due  !=  "-Select"))  &&  (input.When_s_it_due  !=  "Later"))
{
    if (input.googleCalUrl  &&  !thisapp.IsHidePostSchedule(input.Who_s_Responsible))
    {
        googleurl = (thisapp.google.getGoogleUrl(input.Date_Time)) + urlStr;
        openUrl(googleurl, "new window");
    }
}
if (input.backUrl  !=  "")
{
    openUrl(input.backUrl + "&" + (zoho.currenttime.toLong()), "same window");
}
itemsList = List:Map();
itemsList.add({ "ItemName" : "Supplies", "ItemRate" : "75", "Quantity" : input.Supplies_75 });
itemsList.add({ "ItemName" : "Paint", "ItemRate" : "200", "Quantity" : input.Paint_200 });
itemsList.add({ "ItemName" : "Accessories", "ItemRate" : "100", "Quantity" : input.Accessories_100 });
if (input.Make_Invoice_Open)
{
    input.Invoice_Detail_Status = zoho.invoice.createinvoice({ "CustomerName" : input.Customer_Name, "Items" : itemsList });
}
else
{
    input.Invoice_Detail_Status = zoho.invoice.createdraft({ "CustomerName" : input.Customer_Name, "Items" : itemsList });
}






































      • Sticky Posts

      • Zoho Invoice Will Soon Discontinue Support for Older Browser Versions

        Hello users, Starting from May 15, 2024, Zoho Invoice will no longer support the following browser versions: Browsers Version Restrictions Firefox Browser Versions older than 100 Google Chrome Versions older than 100 Microsoft Edge Versions older than
      • Bulk Printing now available in Zoho Invoice

        Hello, We are happy to announce the much requested and much awaited feature in Zoho Invoice - Bulk Printing of Estimates and Invoices. All you need to do is, select the invoices you wish to print and then click the 'Print' button. All the invoices will be downloaded as a single PDF file which can be printed as you wish. You can print upto 25 invoices at a single go. Go ahead and give it a shot and let us know how it worked for you. Regards, Reshma   
      • Introducing the iPhone App for Zoho Invoice

        Now you can invoice on the go from your iPhone through the Zoho Invoice iPhone app. Our iPhone app is available at the apps store for download. The app is special in more ways than one: An impeccable UI takes your invoicing experience to a whole new level That's a first native app we've come up with It's available for FREE!!!!! Yeah, absolutely Free. No brainer there, we just wanted to make our users to enjoy the app no strings attachedHere some snapshots of the app: For the real experience, head