Custom Fields Values not gettimg set by Create Task API

Custom Fields Values not gettimg set by Create Task API

Hi,
I am trying to set custom fields on task from external platform.
Task is getting created successfully but the custom fields not getting set in Task.
I tried various ways to add custom fields values In Request JSON while sending request along with other paramete.
Task created successfully but custom fields not getting set.


Tryout 1:
var postData={
"name":taskName,
"flag":"internal",
"person_responsible":assignTo,
"priority":priority,
"custom_fields" :{
"UDF_CHAR3":recIntId
}
}
var headersArr= {
"authorization": "Bearer "+accessToken,
"content-type": "application/x-www-form-urlencoded",
"cache-control": "no-cache"
};

Tryout 2:
var postData={
"name":taskName,
"flag":"internal",
"person_responsible":assignTo,
"priority":priority,
"custom_fields" :{
"UDF_CHAR3":recIntId,
                                        "UDF_CHAR1": taskName
}
}
Tryout 3:
var postData={
"name":taskName,
"flag":"internal",
"person_responsible":assignTo,
"priority":priority,
"custom_fields" :[
                                                {
                                                      "UDF_CHAR3":recIntId
                                                },
                                                {   
                                                      "UDF_CHAR1": taskName
                }
                                          ]
}
Tryout 4:
var postData={
"name":taskName,
"flag":"internal",
"person_responsible":assignTo,
"priority":priority,
"custom_fields" :[{
"UDF_CHAR3":recIntId,
                                        "UDF_CHAR1": taskName
}]
}
How should I set task custom fields (2 fields). Its urgent .. please suggest a way.

    Zoho Developer Community






                              Zoho Desk Resources

                              • Desk Community Learning Series


                              • Digest


                              • Functions


                              • Meetups


                              • Kbase


                              • Resources


                              • Glossary


                              • Desk Marketplace


                              • MVP Corner


                              • Word of the Day



                                  Zoho Marketing Automation


                                          Manage your brands on social media



                                                Zoho TeamInbox Resources

                                                  Zoho DataPrep Resources



                                                    Zoho CRM Plus Resources

                                                      Zoho Books Resources


                                                        Zoho Subscriptions Resources

                                                          Zoho Projects Resources


                                                            Zoho Sprints Resources


                                                              Qntrl 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

                                                                      





                                                                      




                                                                          Design. Discuss. Deliver.

                                                                          Create visually engaging stories with Zoho Show.

                                                                          Get Started Now