Posts

Showing posts from January, 2022

PL 400 : Edit the command bar by using the Ribbon Workbench (Create a command button function)

Image
This command bar presents all the navigational options for a specific entity. Navigation elements can provide some functionality to the entire group of records displayed.  Creating or modifying command buttons in Dynamics CRM is always a challenge, with the developer usually using the Ribbon workbench(created by  Scott Durow ) for such activities. Modern Command Designer is a great initiative by Microsoft to reduce the complexity of this process and introduced the No/Low Code Designer where developers can define button behavior with Power Fx and JavaScript. The Ribbon Workbench is a tool which is used for customizing the ribbon easier and quicker. It provides the user interface for the customize the ribbon button. The ribbon also attempts to scale to the available window width, making some less important commands smaller or even move them to drop down menus when the space is limited.  Ribbon Workbench for CRM was written to provide a 'drag and drop' developer experience t...

PL 400 : design command button rules and actions (Create a command button function)

Image
Creating or modifying command buttons in Dynamics CRM is always a challenge, with the developer usually using the Ribbon workbench(much respect to the creator) for such activities. Modern Command Designer is a great initiative by Microsoft to reduce the complexity of this process and introduced the No/Low Code Designer where developers can define button behavior with Power Fx and JavaScript. When the Entity view with multiple records is displayed, this command bar presents all the navigational options for a specific entity. Navigation elements can provide some functionality to the entire group of records displayed. There are three entity-specific command bars: Main grid command bar Entity form command bar Entity sub-grid command bar A ribbon command defines three things: Enable Rules: Specifies when a specific ribbon control is enabled. Display Rules: Specifies when a specific ribbon element is visible. Actions : Specifies what code executes when a ribbon control is used. Enable Rule...

PL 400 : Create commands (Create a command button function)

Image
Commands are the unique feature of software application which helps to implement logic and guides the user to take action. It refers to a graphical button that appears in a computer user interface, allowing the user to trigger an event with a keyboard button or mouse. Microsoft introduced the Command and Command Bar to a lesser extent in CRM 2013. It appears at the top of the screen that is defined by the data for the tables and contains the definition of tabs and groups with scaling but only the visible portions of these containers for controls are displayed in the classic user interface. Microsoft Dataverse displays commands with respect to tables and clients in a variety of ways. This graphical interface is organized in relation to other commands and linked to command bar locations. A command bar is made up of a set of commands associated with a specific location. Command bars are at the top of each model-powered app and appear in several different places. The command bar provides b...

PL 400 : Test and Debug PCF components by using the local test harness(Create a Power Apps Component Framework (PCF) component)

Image
Testing and debugging are the most important processes in app development and both the processes play an important role in the code component. Whereas testing reduces the difference between expectation and actual functionality and debugging  helps in code improvement. Both processes provide information about the health status ,data structure of the app and allow easy interpretation. After the code component is implemented, npm start or npm start watch helps to build the code component and open the code harness in a new browser. In a test harness, changes are quickly reflected in the code component. When any of the following component property changes, it is automatically reflected in the test harness without restarting it. index.ts files imported modules in index.ts (excluding node modules) All of the resources tested in the controlManifest.Input.xml file Power Apps Component Testing Harness is a utility created by Microsoft to help you quickly deploy Power Apps components in a loc...

PL 400 :Configure and use PCF Device, Utility, and Web API features (Create a Power Apps Component Framework (PCF) component)

Image
Component based development always emphasizes on separation of concern and reuse based approach to define, implement and compose loosely coupled independent components in the system. Power Apps Component Framework (PCF) The component framework enables professional developers to code components when out-of-the-box components do not meet the needs of app makers. The Power Apps component framework enables professional developers and app makers to code components for model-driven and canvas apps. Code components are a type of solution components, which means they can be included in a solution file and imported into a variety of environments. There are several sample code components which are ready to use and share in the below links: Sample Components For the use of above sample components, developer needs to below steps: Download the sample components  Install Microsoft Power Platform CLI.  PCF Device : It provides methods to use native device capabilities. Availability : Both Mo...

PL 400 :package, deploy, and consume the component (Create a Power Apps Component Framework (PCF) component)

Image
Package is the generic term in software industries, it makes code easy to reuse and share. Packages are a form of program compilation that are grouped together to be publicly used or provided for deployment. It cannot be modified or changed even if required. The essential definition says that, once several software packages are grouped together during a bundle and provide a solution to the people. To use a code component in Power Apps, it must be deployed in a built-in Microsoft Dataverse environment. To deploy a component, first task is to package your code component into a solution file that can then be distributed for import. After implementing the code components using the Microsoft Power Platform CLI, the next step is to bundle all the code component elements into a solution file and import the solution file into the Dataverse so that we can view the code components at runtime. To create a new solution project: pac solution init --publisher-name newCodeComponent --publisher-prefix...

PL 400 : Configure a PCF component manifest (Create a Power Apps Component Framework (PCF) component)

Image
The Microsoft Power Apps Components Framework enables us to create reusable code components that can be used with our Power Apps applications. This framework empowers professional developers to build code components when out-of-the-box components do not fit the needs of app makers. These components are metadata driven, performant and can be configured and used on both canvas and model-driven applications. Code components consist of three elements: Manifest Component implementation Resources Power Apps components are meta driven. Power App component framework enables professional developers from within and outside Microsoft to develop custom code components as reusable visual extension. These components are configured by manifest. Manifest is xml document that describe: Component Name. The type of data that can be configured, either a field or a dataset. Any properties that can be configured in the application when the component is added. A list of resource files that the component requ...

PL 400 : initialize a new PCF component (Create a Power Apps Component Framework (PCF) component)

Image
Although Power Apps provides many functionality, it also provides a piece of UI that is not included, we can wrap the Power Apps component framework around an existing component. Each component instance has a life cycle that starts with initialization where the component renders the class and the component view along with its child views. The lifecycle ends when the component instance is destroyed and its rendered template is removed from the DOM. Azure PowerShell is a module that you add to Windows PowerShell or PowerShell Core that enables you to connect to your Azure subscription and manage resources. Initialize component project by using the Power Apps CLI via the following command: pac pcf init -- namespace SampleNamespace -- name testPCF -- template field

PL 400 : Describe the PCF component lifecycle (Create a Power Apps Component Framework (PCF) component)

Image
The Microsoft Power Apps component framework enables us to create reusable code components that can be used with our Power Apps applications. This framework  empowers professional developers to build code components when out-of-the-box components do not fit the needs of app makers. These code components can be used to enhance the user experience for users working with data on forms, views, dashboards and canvas app screens. PCF stands Power Apps Component Framework These code components are presented as part of the same context and loaded in the same way as any other components and can be used across the full breadth of Power Apps capabilities, and these components can be reused. Is. Developers can bundle all HTML, CSS and TypeScript files into a single solution package file and transfer across environments and also make it available through AppSource. The following types of components we can add: Field : A custom control for a field on a form. Dataset : A custom control to display...

PL 400 : Create client-side scripts that target the Dataverse Web API (Apply business logic using client scripting)

Image
Dataverse empowers organizations to work with any type of data and any type of app, and use the data within it to gain insights and drive business action. As part of Microsoft Power Platform, Dataverse requires no or little code to be written, so it can easily be used by everyone from knowledge workers to professional developers. Knowing that it's built on Azure, organizations choosing Dataverse can be confident that it's globally available, compliant, scalable, and secure. Microsoft Dataverse “Common data service” is a cloud-based storage space that organizations can use to store business application data. Dataverse Web API is one of two web services that we can use to work with data, and table and column definitions in Dataverse. It provides a development experience that can be used across a wide variety of programming languages, platforms, and devices. Because Dataverse Web API is designed to be an open standard. We can write HTTP requests for specific operations or use thir...

PL 400: Register an event handler (Apply business logic using client scripting)

Image
In Power App model driven apps, JavaScript is used to perform actions in the form of scripts, ribbon commands, and web resources. Declarative business rules come with limits, so we can use JavaScript to implement custom business logic. In model driven app forms, client scripting provides an object model with methods for interacting with the form component. To use scripting features, form scripts must be uploaded as script web resources. For the execution of script methods, we need to use event handlers. An event handler is a callback method that operates asynchronously and handles input received in an event. Event : An event is an action that occurs as a result of a user or other sources. Event Handler : An event handler is a method that deals with events. Script web resources can be used to maintain libraries of client script functions that are written in either JavaScript or TypeScript and can be accessed within a model driven app form or from a command bar ribbon definition. Client ...

PL 400: create JavaScript or TypeScript code that targets the Client API object model (Apply business logic using client scripting)

Image
JavaScript is the major client script language which makes it user friendly and responsive to any static html/web pages. It is also abbreviated as JS. It is a lightweight and interpreted programming language designed for network centric applications. It is one of the major technologies of the World Wide Web, along with HTML and CSS. JavaScript is immortal. TypeScript is a strongly typed programming language that builds on JavaScript, in other words, it is a strict syntactic superset of JavaScript and is designed to transcompile the language applications to JavaScript. Typically, in Dynamics 365 CE/Model driven apps, JavaScript is used to perform actions such as forms, ribbon commands, and web resources. Client scripting allows us to use JavaScript in a Power App Model Driven App to implement custom business logic. It should be used as an alternative when declarative business rules do not meet the requirement. Following are the most common events for which we can register as  event ...

PL 400: troubleshoot processes (Implement processes)

Image
Troubleshooting is the systematic and structured approach to problem solving that is often used to find and fix issues. It exists at a higher level than debugging and applies the business process flow to the source of the problem and a logical, systematic search to solve it. There are several common issues in the business process flow : License Issue: The business process flow features are associated with the license. For use of this feature, the developer or app maker must be assigned by the appropriate license. Without these licenses, this feature will not be visible. Those licenses are below: Dynamics 365 Sales Premium Dynamics 365 Sales Enterprise Dynamics 365 Sales Professional Access Denied: Each business process flow definition that is represented as a custom entity comes with its own set of privileges that can be edited in the same security role as any other system or custom entity. We can specify privileges for the security role in the Business Process Flow tab. Use browse...

PL 400: create, manage, and interact with business process flows by using server-side and client side code(Implement processes)

Image
The business process flow provides a visual guide to the end user through a defined process to accomplish multi-step tasks. Generally, organizations have complex and lengthy processes to complete tasks which leads to mistakes and time consumes the time of the user. But the business flow process aligns those tasks and creates a visual sequence of tasks to make it easier for the end users. As such, Microsoft recommends using the Visual Business Process Flow Designer to define business process flows, they provide limited capabilities for updating business process flows with constraints. By default, a business process flow record is created in the draft state and its definition is stored in the workflow entity and the stage information for the business process flow is stored in the processstage entity. The custom business process flow entity has Organization scope. For the create, retrieve, update and delete, user needs the privileges and these permissions provide according to role based. ...

PL 400: create and configure business rules(Implement processes)

Image
Business rules play an important role in automation. It provides facility to non-developer to make minor changes at form or unit level. For these changes, the app maker does not need programming skills. The ability to create business rules that ensure consistent business logic regardless of the app accessing the data set is imperative to a successful business operation. Business rules are server-side logic that is used with canvas or model-driven apps to set or clear values in one or many columns in a table. Business rules encapsulate logic in a predefined set of steps that will run each time data is entered or modified and the data meets certain criteria to trigger business rules. Business rules give non-developers the ability to add logic to the field without adding JavaScript code. Business rules are evaluated and any actions performed are in the following situations: After the form is loaded  After changing any value in the reference field within a condition in the rule Busines...