knowledgecenter-breadcrum

Knowledge Center

31 May, 2022

How to create columns of different data types using Plugin

Posted on 31 May, 2022 by Admin, Posted in Dynamics 365 Dataverse Power Platform

How to create columns of different data types using Plugin Blogs

How to create columns of different data types using Plugin?

Introduction

In this blog, we will learn how to create text and integer type of fields using plugin.

We all know how we can create fields using entity customizations but not many of us know to do that using code.

Example

We will create a text field named Employee ID and integer field named Age on Employee entity  using Plugin.

  1. Create a Plugin with Execute method as below:

2. Add function named “CreateFieldsonEmployee” and add below code:

  • For creating Employee ID (text) field creation:

  • For Age (integer) field creation:

3. Build and register the plugin on Pre-Validation stage on create of Employee entity.

Result

  • Before fields creation:

 

 

  • After the fields creation:

 

Comment

This is a Required Field

Loading

Recent Updates

Case Study
06 Sep, 2024

Implementation of Business Central for a Trading Organization

Customer Overview A prominent trading organization sought to enhance its operational efficiency and streamline its business processes by implementing Dynamics…

READ MORE
Blogs
03 Sep, 2024

Optimizing Code Check-ins: Ignoring Unnecessary Files for a Cleaner Azure DevOps Repo.

Introduction In this blog, we will learn about the code check-in process in DevOps. After development, unnecessary files are sometimes…

READ MORE
Blogs
20 Aug, 2024

Configure Macros in Omnichannel to improve Agent Productivity

What are Macros? Macros are a set of sequential actions that a user performs. They enable users to perform daily…

READ MORE