Problem with default value by using Bulk Write API

Problem with default value by using Bulk Write API

Hi guys,

I have a problem with the bulk writing API.

I have 2 modules. First module ("dataimport") is storing csv file uploads of users. The secound module ("Erzeugungsdaten") should store the data from those csv files.
My goal is that each entry in "Erzeugungsdaten" is linked to the file upload in "dataimport" module so I setup a lookup field.

So I created a workflow which runs after a csv file is uploade to the module "dataimport". This workflow triggers a function using the bulk write api and it works good when I not try to set a default value for the lookup field. 

When I add the part where I like to link the imported rows to the lookup field I get the error that I need to define the "index" parameter which does't make sense in my case because it should be set as default value.

  • {"status":"error","code":"MISSING_REQUIRED_KEY","message":"required key index for field LinkedDataimport is not found in request body.","details":{}}
Here my code where I define the default value:
  1. dataImportMap = Map();
  2. dataImportMap.put("api_name","LinkedDataimport");
  3. //dataImportMap.put("index",0);
  4. dataImportMap.put("find_by","id");
  5. dataImportMap.put("defaultValue",{"value":dataImportID});
  6. fieldMappingList.add(dataImportMap);

Hope someone of you has an idea how to fix it.

Best
Markus

PS: find attached the whole function
    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 Campaigns 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 コンテンツ




                              ご検討中の方