How to create an invoice in CRM with multiple items ?
Hi,
I'd like to create an invoice in CRM with multiple items. Here's my code.
- void CreerFactureZohoCRM(string NoFacture)
{
f = Facture1 [Numero_de_facture == input.NoFacture];
c = Commande [Num_ro_de_commande == f.Numero_de_commande];
itemsList = List:Map();
for each i in Axis_Lignes_Commandes [No_Facture == input.NoFacture] sort by Produit1
{
itemsList.add({ "Product Name" : i.Produit1, "Quantity" : i.Quantite, "Unit Price" : i.Prix_selon_format, "List Price" : i.Prix_selon_format });
}
invoiceinfo = { ("Account Name") : c.Comte_Zoho_CRM, "Subject" : f.Numero_de_facture, "Invoice Date" : f.Date_de_la_facture, "Product Details" : itemsList , "Description": "test"};
crmResp = zoho.crm._create("Invoices", invoiceinfo);
}
The invoice is created but with no items. How to add multiple products in Product Details ?
Thanks in advance for your help.
Pascal Veilleux