zoho / zohocrm-csharp-sdk-6.0

Apache License 2.0
2 stars 2 forks source link

Unable to specify Module when creating new Note #22

Closed Kirkpajl closed 3 months ago

Kirkpajl commented 3 months ago

I am using v7.0.0 of this library, and have created a new Lead record successfully. Unfortunately, I have been unsuccessful when attempting to add a Note to the new Lead.

I attempted to follow the sample code on the Zoho website, but the Note class does not contain a SeModule property. Attempting to create a Note while only specifying the ParentId, NoteTitle and NoteContent properties results in a MANDATORY_NOT_FOUND error with the message "required field not found". The exception details contains two items: api_name=module and json_path=$.data[0].Parent_Id.module.

How do I specify that the ParentId record belongs to the Leads module?

raja-7453 commented 3 months ago

Thanks, @Kirkpajl for your contribution. Please refer to this sample code.

Kirkpajl commented 3 months ago

@raja-7453, thank you for the quick response and the new sample! Creating the new MinifiedModule instance and adding it to the parentRecord object's KeyValue collection allowed me to create the Note and link it to the appropriate Lead record--although it appears that the MinifiedModule doesn't actually require an Id value (as depicted in the sample) for the Note to be created.

In a future update, would it be possible to add an overload to the NotesOperations class's CreateNotes method to receive the record id and module name along with the BodyWrapper request? The implementation on the AttachmentsOperations class's UploadAttachments method is very streamlined by comparison, allowing me to upload a Note's attachment without requiring the initialization of a Record or MinifiedModule object.

raja-7453 commented 3 months ago

@Kirkpajl Please get in touch with support@zohocrm.com, for further updates. We will follow up on this request, over there. Thanks!