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

Blogs
18 Jul, 2024

How to use Fiddler to debug your PCF while doing development.

Have you ever felt like you're spending too much time debugging your PCF (PowerApps Component Framework) during development, only to…

READ MORE
Blogs
16 Jul, 2024

How to use Solutions with Power Pages

What is Solution in power Pages? A solution is a container for components such as Website Configuration and Dataverse Components.…

READ MORE
Blogs
15 Jul, 2024

Create a Dataverse table with a SharePoint List

In today’s business world, Organization uses SharePoint lists for document management, and data storage. Let's assume a scenario where an organization…

READ MORE