In This Post we are going to Explain
Mintech Services
Thursday, July 17, 2025
What Is A Form In Dynamics 365 CRM/CE?
In This Post we are going to Explain.
What is a Form in Dynamics 365 CRM/CE?
- A form in Dynamics 365 CRM/CE is a user interface that provides a structured layout to view, create, and edit entity records. It organizes and displays fields, sections, and controls, enabling users to interact with an entity's data efficiently. Forms are essential for ensuring a consistent user experience and are tailored to specific business needs.
Saturday, July 12, 2025
Read The Dynamics 365 CRM Form TAB Using Java Script
To use the Dynamics 365 CRM form tab, you have to use this ui.tabs.get("TabName") method.
Now hide and show the TAB
// To hide TAB: true=Hide
formContext.ui.tabs.get("TabName").setVisible(true);
// To hide TAB: false=show
formContext.ui.tabs.get("TabName").setVisible(false);
Read The Dynamics 365 CRM Form Section Using Java Script
To read the Dynamics 365 CRM Tab section name used the ui.tabs.get("TabName").sections.get("TabsSectionName") method.
Now perform the operation to hide this Tab Section.
// To hide tabs Sections: true=Hide
formContext.ui.tabs.get("TabName").sections.get("TabsSectionName").setVisible(true);
// To hide tabs Sections: false=show
formContext.ui.tabs.get("TabName").sections.get("TabsSectionName").setVisible(false);
Wednesday, July 9, 2025
Read/Get And Write/Update All Data Types Of Field Values Using Java Script Into Dynamics 365 CRM/CE
// Read And Write The Dynamics 365 CRM All Data Types Of Field Using Java Script
function AllDataTypeReadAndWrite(executionContext) {
debugger;
var formContext = executionContext.getFormContext();
// Read Single Line of Text Field
var empName = formContext.getAttribute("min_name")?.getValue();
// Read Multi Line of Text Field
var empAddress = formContext.getAttribute("min_address")?.getValue();
// Read Date and Time Field
var empDOB = formContext.getAttribute("min_dob")?.getValue();
// Read Two Option Field
var areYouINterested = formContext.getAttribute("min_areyouintersted")?.getValue();
// Read Optionset Field
var empCountry = formContext.getAttribute("min_country")?.getValue();
// Read Multiselect Optionset Field
var empCourses = formContext.getAttribute("min_courses")?.getValue();
// Read Whole Number Field
var empPostalCode = formContext.getAttribute("min_postalcode")?.getValue();
// Read Decimal Field
var empPercentage = formContext.getAttribute("min_percentage")?.getValue();
// Read Currency Field
var empSalary = formContext.getAttribute("min_salary")?.getValue();
// Read Lookup Field
var org = formContext.getAttribute("min_organization")?.getValue();
var orgid = org[0].id;
var orgname = org[0].name;
var orgentityname = org[0].entityType;
// Set/Update Single Line of Text field
if (empName !== null && empName !== undefined)
{
formContext.getAttribute("min_name1").setValue(empName);
}
// Set/Update Multi Line of Text field
if (empAddress !== null && empAddress !== undefined)
{
formContext.getAttribute("min_address1").setValue(empAddress);
}
// Set/Update Date and Time field
if (empDOB !== null && empDOB !== undefined)
{
formContext.getAttribute("min_dob1").setValue(empDOB);
}
// Set/Update Two Option field
if (areYouINterested == true)
{
formContext.getAttribute("min_areyouinterested1").setValue(true);
}
else {
formContext.getAttribute("min_areyouinterested1").setValue(false);
}
// Set/Update OptionSet field
if (empCountry !== null && empCountry !== undefined)
{
formContext.getAttribute("min_country1").setValue(empCountry);
}
// Set/Update Multi Select OptionSet field
if (empCourses !== null && empCourses !== undefined)
{
formContext.getAttribute("min_courses1").setValue(empCourses);
}
// Set/Update Whole Number field
if (empPostalCode !== null && empPostalCode !== undefined)
{
formContext.getAttribute("min_postalcode1").setValue(empPostalCode);
}
// Set/Update Decimal field
if (empPercentage !== null && empPercentage !== undefined)
{
formContext.getAttribute("min_percentage1").setValue(empPercentage);
}
// Set/Update Currency field
if (empSalary !== null && empSalary !== undefined)
{
formContext.getAttribute("min_salary1").setValue(empSalary);
}
// Set/Update Lookup field
if (org !== null && org !== undefined)
{
formContext.getAttribute("min_organization1").setValue([{ id: orgid, name: orgname, entityType: orgentityname }]);
}
}
Hide And Show Dynamics 365 CRM Fields On Form Using Java Script
To hide and show fields on Form you have to use the setVisible() method.
// To Show/Visible fields on Form
formContext.getControl("fieldSchemaName").setVisible(true);
// To Hide/Un-Visible fields on Form
formContext.getControl("fieldSchemaName").setVisible(false);
Make Dynamics 365 CRM Fields Mandatory, Recommended and Not Mandatory Using Java Script.
To Make Dynamics 365 CRM Fields Mandatory, Recommended and Not Mandatory Using Java Script. you have to use the setRequiredLevel() method.
// To make field Mandatory
formContext.getAttribute("fieldSchemaName").setRequiredLevel("required");
// To make field Recommended
formContext.getAttribute("fieldSchemaName").setRequiredLevel("recommended");
// To make field Not Mandatory
formContext.getAttribute("fieldSchemaName").setRequiredLevel("none");
-
See the below screenshot as per XrmToolBox is having definition. 1 . To download XrmToolBox open the below link. https://www.xrmtoolbox...
-
A Model-Driven App is a type of app in Microsoft Power Platform that focuses on D ata-first design and leverages Data verse for its back...
-
Follow below code to read and write the Single Line Of Text field of Dynamics 365 CRM. 1. To Read the value: Below code are read the Name f...