見積書のサブフォーム「見積明細」に登録した独自項目が取得できません

見積書のサブフォーム「見積明細」に登録した独自項目が取得できません

見積書タブの「見積明細」に、独自の項目を設定しました。
設定した項目は「仕入単価(API名: shiiretanka)」です。

見積データの保存時に、
・各明細の(単価(販売単価)-仕入単価)×数量 で粗利益額を出します。
・各明細行の粗利益額を(ループ処理で)集計します。
・集計した金額(合計粗利益額)を、見積書タブに設定した独自項目の「利益額」へ入力します。
という自動処理を行いたいと思い、ワークフローを設定して独自関数をスクリプトで書きました。

CRM設定画面の「API」の項目名を確認し、見積明細サブフォームのAPI名は「Quoted_Items」とのことだったので、スクリプトで見積明細フォームのデータを取得しようと get("Quoted_Items")というふうに書いたのですが、これだと、何度やっても取得したデータが「null」になってしまいます。

一般のWebサイトの解説(ZOHO公式ではありません、別の方が書いている解説サイト:
https://www.crmsupportcenter.com/blog/zohocrm-deluge-quotes#midasih2-4 )で、「見積書のサブフォームは「Product_Details」で取得する、という解説があったので、
get("Product_Details")
と書いたところ、確かにこれだと明細行数分だけデータを取得できました。

ところが、このget("Product_Details") で取得できた内容を確認すると、これは見積明細に紐づけられた商品アイテムのデータを取得しているだけに過ぎず、見積明細内に作成した独自項目の内容が取得できません。

見積のサブフォーム「見積明細」の各レコードに記録された、独自項目の値は、どうやったら取得できるのでしょうか?
添付図のように、見積明細はAPI名が「Quoted_Items」なので、
・見積IDでレコードを特定して見積レコードを取得する
・取得した見積レコードに対して get("Quoted_Items")とやれば、明細フォームのレコードが取得できる
ということになると思うのですが、どこか考え方が間違っているんでしょうか?

    Access your files securely from anywhere







                            Zoho Developer Community




                                                  • Desk Community Learning Series


                                                  • Digest


                                                  • Functions


                                                  • Meetups


                                                  • Kbase


                                                  • Resources


                                                  • Glossary


                                                  • Desk Marketplace


                                                  • MVP Corner


                                                  • Word of the Day


                                                  • Ask the Experts





                                                            Manage your brands on social media



                                                                  Zoho TeamInbox Resources



                                                                      Zoho CRM Plus Resources

                                                                        Zoho Books Resources


                                                                          Zoho Subscriptions Resources

                                                                            Zoho Projects Resources


                                                                              Zoho Sprints Resources


                                                                                Qntrl Resources


                                                                                  Zoho Creator Resources



                                                                                      Zoho CRM Resources

                                                                                      • CRM Community Learning Series

                                                                                        CRM Community Learning Series


                                                                                      • Kaizen

                                                                                        Kaizen

                                                                                      • Functions

                                                                                        Functions

                                                                                      • Meetups

                                                                                        Meetups

                                                                                      • Kbase

                                                                                        Kbase

                                                                                      • Resources

                                                                                        Resources

                                                                                      • Digest

                                                                                        Digest

                                                                                      • CRM Marketplace

                                                                                        CRM Marketplace

                                                                                      • MVP Corner

                                                                                        MVP Corner









                                                                                          Design. Discuss. Deliver.

                                                                                          Create visually engaging stories with Zoho Show.

                                                                                          Get Started Now


                                                                                            Zoho Show Resources

                                                                                              Zoho Writer

                                                                                              Get Started. Write Away!

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

                                                                                                Zoho CRM コンテンツ



                                                                                                  Nederlandse Hulpbronnen


                                                                                                      ご検討中の方