カスタム関数:Zoho CRMの商談にサブフォーム(商品)を登録し見積書を作成する

カスタム関数:Zoho CRMの商談にサブフォーム(商品)を登録し見積書を作成する






// 商談の情報の取得
resp = zoho.crm.getRecordById("Deals",pID);
subinfo = ifnull(resp.get("field5"),"");
// 事前準備 項目名の確認
info resp;
pdList = list();
// サブフォームの商品情報を見積書用に転記
for each  rec in subinfo
{
mp = Map();
mp.put("product",{"name":rec.get("prname").get("name"),"id":rec.get("prname").get("id")});
mp.put("quantity",rec.get("prquantity"));
mp.put("list_price",rec.get("prprice"));
mp.put("net_total",rec.get("sum"));
pdList.add(mp);
}
// 見積書データの作成
qMap = Map();
qMap.put("Product_Details",pdList);
qMap.put("Subject","見積書");
qMap.put("Contact_Name",cID);
qMap.put("Deal_Name",pID);
createResp = zoho.crm.createRecord("Quotes",qMap);
info createResp;

    Zoho Campaigns Resources

      Zoho Desk Resources

      • Desk Community Learning Series


      • Digest


      • Functions


      • Meetups


      • Kbase


      • Resources


      • Glossary


      • Desk Marketplace


      • MVP Corner


      • Word of the Day


        Zoho CRM Plus Resources

          Zoho Books Resources


            Zoho Subscriptions Resources

              Zoho Projects Resources


                Zoho Sprints Resources


                  Zoho Orchestly Resources


                    Zoho Creator Resources


                      Zoho WorkDrive Resources



                        Zoho CRM Resources

                        • CRM Community Learning Series

                          CRM Community Learning Series


                        • Tips

                          Tips

                        • Functions

                          Functions

                        • Meetups

                          Meetups

                        • Kbase

                          Kbase

                        • Resources

                          Resources

                        • Digest

                          Digest

                        • CRM Marketplace

                          CRM Marketplace

                        • MVP Corner

                          MVP Corner




                          Zoho Writer Writer

                          Get Started. Write Away!

                          Writer is a powerful online word processor, designed for collaborative work.

                            Zoho CRM コンテンツ






                              ご検討中の方