Showing posts sorted by relevance for query model driven app. Sort by date Show all posts
Showing posts sorted by relevance for query model driven app. Sort by date Show all posts

Monday, September 6, 2021

Command Designer with PowerFx

 Introduction:

In this Blog we will see preview feature of PowerApps for Command Designer

Steps to Follow:

1. If you have Environment available go to https://make.powerapps.com else Create Trail and navigate to https://make.powerapps.com

2. Then Create a model driven app 

3. Once Model Driven app created change to URL to https://make.preview.powerapps.com

4. Navigate to Solutions and open the solution which you have created based on step 2






5. Open solution Opened Click on Apps then select the three Dots of your Model Driven apps then Click Edit and select Edit in Preview






6. Once Page Opened click on the Entities the Edit Command bar(Preview)

7. As it is a preview we cannot edit Out-of-the Box Buttons

8. To Create a new Button click on New Command





9. To change Icon







Select the Icon as Use Icon and select the Icon So that you can see the icon displayed at the Button Level

10. To trigger Action 










Select the Run Formula if you want to user PowerFX like Patch etc

Patch(Contacts,Self.Selected.Item,{'Enable Button':'Enable Button (Contacts)'.Yes})

If you want to update some data in the Record you can use above function         (here Enable Button is a two option Field)

11. To Run JavaScript

Change Action to Run JavaScript and provide the Library and function (add Parameter if needed)

12. To enable and Disable function










Set Visibility to Show on Condition from formula

In the Visible property i written function as if the field is No display else don't display
Self.Selected.Item.'Enable Button'='Enable Button (Contacts)'.No

13. Then you can SaveAndPublish
14. Run to see the changes

15. if you want to see these components


Click on Component Library and Click on the Library inside the Grid to see the components.



Github for more commands

Friday, April 1, 2022

Hide Command Bar using JavaScript in Model Driven App

Introduction:


In this Blog, we will see how to hide Navigation Bar in Model Driven App using JavaScript.


Implementation Steps:

 

When ever you tried to create a new Record, you will be redirected to a page like below

 

rampprakash_0-1648728054363.png

 

Red Color Highlighted Called Command Bar

 

If we want to hide that Command Bar follow below steps to achieve the same.

 

1. Navigate to https://make.powerapps.com

2. Click Solutions --> Create a new Solution

3. Click New --> Click More --> Select Web Resource and add a new Web Resource

 

rampprakash_1-1648728360258.png

4. Write below code in Web Resource

 

 

function onLoadHideCommandBar(executionContext) {
    var formContext = executionContext.getFormContext();
    formContext.ui.headerSection.setCommandBarVisible(booleanValue);
}

 

 

booleanValue : pass true or false as an option

 

true - visible Command bar

false - hide Command bar

 

Once Code Published:

 

Load or Open a new Record

 

rampprakash_0-1648836606039.png

 

Now you cannot see the Navigation Bar.

 

That's it :slightly_smiling_face:

 

Friday, September 17, 2021

Create and Connect - Multi-factor enabled D365 Dataverse Programmatically

 

Introduction:

In this Blog, we will see how to create Application User in Azure to Access Dynamics CRM/ Model-Driven Apps


Azure Steps to Follow for Application User Registration

1. Login to https://portal.azure.com

2. Search for App Registrations at the top


3. Click New App Registration
4. Enter the Name and Click on Register


5. Once Registration Done 

6. Copy Application ID and Store it in Notepad

7. Search for Certificates and Secrets



8. Select New Client Secret

9. Enter the Description and Click Save

10. You will be getting Client Secret once you save it.

11. Copy that in your Notepad where Application ID Copied



Create Application User in Model-Driven Apps / CRM

1. Login to D365 CDS environment

2. Go to Settings –> Security –>Users

3. Change the view to ‘Application Users’ and click New. Make sure the form is ‘Application User’ form

4. Click New and Change Form to Application User and Input Application ID in the Text Box and Save

5. Then Assign appropriate Security role to this Application User as per your organization’s security set up.

C# Connection String:

String connectionString = “AuthType=ClientSecret; url=<your organization URL>; ClientId=<your application id>; ClientSecret=<client secret key>”;

                CrmServiceClient crmServiceClient = new CrmServiceClient(connectionString ); //Connecting to the D-365 CDS instance

 

                if (crmServiceClient != null && crmServiceClient.IsReady)

                { //Do your operation}









Friday, January 20, 2023

How to get SubGird Record Count with Webresource in Dynamics CRM

Introduction:


In this Blog, we will see how to Get SubGrid Record Count in MSCRM or Model Driven App using WebResource.


Implementation Steps:

 

1. Navigate to https://make.powerapps.com

 

2. Create or Open any Existing Solution

 

3. Open the Table/Entity where you want to get count of SubGrid in my case am taking Account Table

 

rampprakash_0-1674210056707.png

 

4. As per the ScreenShot there is 4 Records available so i need to show as a popup with Count as 4

 

5. So First Step i will take the Sub Grid Name

 

6. Open the Form where your SubGrid Exists 

 

rampprakash_1-1674210171186.png

 

 

7. Based on the Above ScreenShot the Name of the SubGrid is Contacts

 

8. Now Lets Start Writing the JavaScript

 

9. Open Your Visual Studio or VS Code and Write the Below Function

 

function getsubgridcount(executionContext) {
    setTimeout(function () {
        var formContext = executionContext.getFormContext();
        if (formContext !== null && formContext != "undefined") {
            var accountgridname = "Contacts";
            var count = formContext.getControl(accountgridname).getGrid().getTotalRecordCount();
            alert(count);
        }
    }, 15000);
}

 

10. Now Create a JavaScript (Web Resource) in CRM 

 

rampprakash_2-1674210958690.png

 

11. Click Save and Publish

 

12. Now Open the Same Account Form and Add the JavaScript Library in the Form

 

rampprakash_3-1674211210777.png

 

13. Now Add Function in the OnLoad Operation

 

rampprakash_4-1674211290953.png

 

14. Once Done Click Save and Publish

 

15. Now Open the Account Table and Open a Record you will see the alert message over there :slightly_smiling_face:

 

rampprakash_5-1674211665753.png

 

 

That's it :slightly_smiling_face:

Wednesday, October 9, 2019

Display or Remove Custom Entity or OOB in Outlook Quick Create

Dear All,

Please find the steps below for Displaying/Remove Custom Entity or OOB in Outlook Quick Create

1). Open CRM System
2). Navigate to Settings --> Customization --> Customize the system
3). Click on the Custom Entity that you want to display Quick Create (Enable Allow Quick Create & Reading Pane in Dynamics 365 for Outlook)


4). After Enabling Navigate to Settings --> Customization --> Customize the System
5). Click on Model-driven Apps or Apps  then open Dynamics 365 App for Outlook then Add the Entity which you wanted.
6). Click Save.
7). Publish.

How to Run Microsoft Flow for Every one Month

Introduction: In this Blog we will see how to Run Microsoft Flow for Every one Month. Implementation Steps:   1. Navigate to  https://make.p...