ASP.NET MVC

How To Create Tag Using Zoho CRM In ASP.NET MVC

Introduction

In this article, we will learn how to create a tag using Zoho CRM in ASP.NET MVC Web application.

Let’s begin

Please read this article first of all here.

C# Code Example

Open the HomeController.cs file and add the below code in it.

public void CreateNewTag()
{
        ZCRMModule moduleIns = ZCRMModule.GetInstance("Leads"); //module api name
        List<ZCRMTag> tags = new List<ZCRMTag>();
        ZCRMTag tag1 = ZCRMTag.GetInstance();
        tag1.Name = "Test";
        ZCRMTag tag2 = ZCRMTag.GetInstance();
        tag2.Name = "test";
        tags.Add(tag1);
        tags.Add(tag2);
        BulkAPIResponse<ZCRMTag> response = moduleIns.CreateTags(tags); //tags - list of ZCRMTag instances filled with required data for create.
        List<ZCRMTag> insertedTags = response.BulkData; //insertedTags - list of ZCRMTag instances
        List<EntityResponse> entityResponses = response.BulkEntitiesResponse; //entityResponses - list of EntityResponse instance
 }

 

Get All Tag Data

public void GetTagList()
 {
         ZCRMModule moduleIns = ZCRMModule.GetInstance("Leads"); //module api name
         BulkAPIResponse<ZCRMTag> response = moduleIns.GetTags();
         List<ZCRMTag> tags = response.BulkData; // tags - List of ZCRMTag instances
 }

 

Get Record Count For Specific Tag

public void RecordCountForSpecificTag()
 {
        /** Get Record count for a specific tag */         ZCRMModule moduleIns = ZCRMModule.GetInstance("Leads");
         APIResponse response = moduleIns.GetTagCount(Your Tag Id);
         ZCRMTag tags = (ZCRMTag)response.Data;
 }

 

if you have any questions or issues about this article, please let me know and more details here

 

Sagar Rana

Sagar Rana is a Web Developer in Vision Infotech. He has strong skills and knowledge of ASP.NET C#, ASP.NET MVC, .Net Core, Jquery, JavaScript, WEB API, React.js, ADO.Net, Entity Framework, SQL and different integration like Xero, Stripe, Zoho CRM, Square, PayTM, PayKUN, RazorPay, Quickbook Desktop etc.

Recent Posts

Testing hk

Testing

2 years ago

Create and Used PIPE in angular

In this article, we have to show Create and Used PIPE in angular

2 years ago

Operation

Testing

2 years ago

Create and Used PIPE in angular

In this article, we have to show Create and Used PIPE in angular

2 years ago

Create and Used PIPE in angular

In this article, we have to show Create and Used PIPE in angular

2 years ago

TETS NEW

test

3 years ago