knowledgecenter-breadcrum

Knowledge Center

04 Jul, 2022

Newly introduced client script methods for D365 CE

Posted on 04 Jul, 2022 by Admin, Posted in Dynamics 365 Dataverse Dynamics-365 Sales

Newly introduced client script methods for D365 CE Blogs

This blog will talk about the new client script methods that can enhance UI/UX experience.

addOption

This method adds an option to your choice/choices control.

formContext.getControl(arg).addOption(option, index);
Example

removeOption 
Removes an option from a choice/choices control.

formContext.getControl(arg).removeOption(value);
Example

clearOptions 
Clears all options from a choice/choices control.

formContext.getControl(arg).clearOptions();
Example

setFocus 

Sets the focus on the control.

formContext.getControl(arg).setFocus();
Example


setLabel
Sets the label of the control.

formContext.getControl(arg).setLabel(label);
Example

addOnLookupTagClick 
Adds an event handler to the OnLookupTagClick event.

OnLookupTagClick:- This event occurs when the user clicks the tag in a lookup control.

formContext.getControl(arg).addOnLookupTagClick(myFunction);
createPane 

Provides all the information to create side panes.

Xrm.App.sidePanes.createPane(paneOptions);
Click here to learn more about paneOptions

Example for addOnLookupTagClick & createPane 

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