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

Loading

Recent Updates

Thumbnail_Microsoft365 Vs D365
Blogs
12 Nov, 2024

Microsoft 365 vs Dynamics 365

This blog will help you understand the key difference between Microsoft 365 and Dynamics 365, so you can make an…

READ MORE
Thumbnail_What is Microsoft Dynamics 365
Blogs
05 Nov, 2024

What is Microsoft Dynamics 365?

This blog explores Microsoft Dynamics 365, a cloud solution for handling different business activities smoothly. The rising trends of competition…

READ MORE
Blogs
30 Sep, 2024

SMS Integration with Twilio Number in D365 Customer Service- Part 1

Introduction Integrating SMS functionality into Dynamics 365 can significantly enhance customer communication by providing a direct and efficient channel for…

READ MORE