Tuesday, October 5, 2021

How to Use Open Entity Form in Dataverse Environment


Introduction:


In this blog we will see how to Open Entity/Quick Create Form from Dataverse/Model Driven Apps


There are two type of Forms Available

1. Main Form

2. Quick View Form

 

1. Main Form:

 

Consider you have a Ribbon Button and on Click on Button you want to Open a Main Form. So for that you can write the below JavaScript command to achieve the same


var parameters = {

};

parameters["cr608_logicalName1"] = Value1ForLogicalName1;

parameters["cr608_logicalName2"] = Value2ForLogicalName2;


Xrm.Utility.openEntityForm("cr608_EntityLogicalName", null, parameters);

 

2. Quick View Form:

 

Consider I have an account Entity and I want to Create an Contact Against that Account for that

 

First Retrieve Account Value and store in a Temporary Variable.

 

var retrieveAccountValue = null;

var accountId = null;

var account = primaryControl.getAttribute("parentaccountid"); // you can use formContext from Form. From Ribbon you need to pass Primary Control as Parameter

if (account != null) {

  retrieveAccountValue  = account.getValue();

  if (retrieveAccountValue  != null) {

    accountId = accountValue[0].id;

  }

}

 

Then Create a Variable to set the Account Values

 

var parentAccountForContact = {

  entityType: "account",

  id: accountId

};

 

then you can Call the below code to open a Quick Create Form

 

// Create a Parameter

var parameters = {};

//Open Quick Create Form

Xrm.Utility.openQuickCreate("contact", parentAccount, parameters).then(function (ValueOutput) { successCallback(ValueOutput); }, function (error) { errorCallback(error);});

// Success Call

function successCallback(success) {

  alert("Success");

}

// Error Call

function errorCallback(e) {

  alert("Error: " + e.errorCode + " " + e.message);

}

 

That's it


Conclusion:


This is how we need to user Open Entity Form in DataVerse/Model-DrivenApps/CRM Environment.

Monday, October 4, 2021

Scan Multiple Barcode at Once using PowerApps


Introduction :


In this Blog, we will see step by step implementation of how to Scan Multiple Barcodes at once and patch it to SharePoint


Implementation Process:

 

SharePoint:

 

1. Navigate to office.com

 

2. Click SharePoint (if SharePoint List Already Available Copy the List Name else follow from Step #3)

 

3. Click Create Site then Team Site

 

rampprakash_0-1633345239378.png

 

4. Site then Input the Site Name and Owner and Privacy Setting as PUBLIC

rampprakash_1-1633345304964.png

 

4. Click Next for completion of Site Creation

 

rampprakash_2-1633345367446.png

 

5. Click New then Click List and Select Blank List then Click Next and Input the Name and Create.

 

6. Copy the SharePoint Browser URL.

 

PowerApps:

 

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

 

2. Then Click on Apps

 

3. Click New and Select Canvas App

 

4. Once Page Opened Click on App and write the below Code

 

              getMultipleBarCodes --> to Collect Values after Scanning

 

ClearCollect(getMultipleBarCodes,Blank())

rampprakash_0-1633345525871.png

 

5. Add a Gallery and Set the Item for that Gallery as getMultipleBarCodes

 

rampprakash_1-1633345627696.png

 

6. Add a Barcode Button Insert --> Media --> Barcode Scanner

 

rampprakash_2-1633345683083.png

 

7. Select the Scan Button and in On Scan Operation write the below code ( if the Scanned code already exists then Throw Error else Collect the information)

 

If(CountRows(Filter(getMultipleBarCodes,Value=BarcodeScanner1.Value))>0,Notify("Scanned Barcode already Exists"),Collect(getMultipleBarCodes,BarcodeScanner1.Value));

 

8. Click on Data source then Select SharePoint then Input the copied URL and select the List

 

9. Click OK.

 

10. Add a Button 

 

rampprakash_3-1633346028817.png

 

11. Rename as Submit and write the below code in On Select of that button

 

ForAll(getMultipleBarCodes,Patch('BarCode List',Defaults('BarCode List'),{Title:Value}))

 

12. Save and Publish the App.

 

That's it. This is how we need to use Multiple Barcode Scanning with PowerApps.

 

Video for your Reference : To Subscribe

Thursday, September 30, 2021

Change DataVerse/D365 rollup frequency

Introduction

Usually When we create a Rollup Field it automatically creates a System Jobs with Recurrence of 1 Day. In this Blog, we will see how to change Rollup Frequency in DataVerse Environment.


Steps to Follow:

 

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

 

2. Then Click on Advance Settings by clicking Gear Icon at the Top

 

rampprakash_0-1633011956786.png

 

3. Then Click System Jobs

 

rampprakash_1-1633012030684.png

 

4. Change View to All Rollup Field Calculation Jobs

 

rampprakash_2-1633012121540.png

 

5. Then Open the Required Job to Change the Occurrence

 

rampprakash_3-1633012188014.png

 

6. Click Actions then Select Modify Recurrence

 

rampprakash_4-1633012252914.png

 

7. Then change Occurrence based on Requirement

 

rampprakash_5-1633012281581.png

 

That's it :slightly_smiling_face:

Tuesday, September 28, 2021

How to Create and Distribute Solutions from Power Platform

 Implementation Process:

 

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

 

2. Click Solutions then Click New then Enter the mandatory details like (Display Name/ Name / Publisher / Version)

 

rampprakash_0-1632315865876.png

 

3. Once Entered the Mandatory details click on Create --> Then open the Solution (in my case it is Demo Solution for publisher)

 

rampprakash_0-1632330684259.png

 

 

 

4. Click New to add a new Components(Tables/JS etc)

 

5. Click Add Existing to add the Existing Components

 

6. Once Done click On Export --> Then Publish

 

rampprakash_1-1632330787675.png

 

7. Then you will be directed to another screen for Exporting solution as Managed or UnManaged

rampprakash_2-1632330844242.png

 

a. Unmanaged --> If you Import it as Unmanaged in the destination environment we able to edit the Components available in the solution. Possible to export from the destination environment too.

 

b. Managed --> If you Import it as Managed you cannot edit the component. Not Possible to Export from destination environment.

 

8. Select the appropriate type and Click Export

 

9. Once import done you can import the same to your destination environment

 

That's it. This is how we need to Create, Export/Import solution from Source to Destination environment.

Publisher in Power Platform

Introduction:

 

As per Out of Behavior, Power platform will provide default prefix for custom entities as new_ or cr608_. To create custom prefix we need to create a publisher so that we can use our custom prefix while creating custom entities or custom fields in custom tables or OOB tables.

 

Implementation Steps:

 

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

 

2. Click on Solutions

 

3. Then Click on New Solution then select New Publisher Button

 

rampprakash_0-1632323952857.png

 

4. It will Navigate to another screen to Create a Publisher. Enter the Mandatory Details as Display Name/Name/Prefix

In this Demo am selected my Prefix as demo

 

rampprakash_2-1632324307795.png

 

5. If you want to enter Contact details about the publisher click on Contact and enter the details (Not Mandatory)

 

rampprakash_4-1632324400064.png

 

6. Once Done Click On Save Button to Save the Publisher

 

rampprakash_0-1632325656279.png

 

That's it. This is how we need to create Publisher.

 

Please find the Video for your reference


Youtube link for your reference.

Tuesday, September 21, 2021

Add Custom Icons in Sub-Grid or View in Model Driven Apps or CRM


Introduction:

In this blog we will see how to Add an Image or Icon in SUBGRID / VIEWS in Model Driven Apps or Dynamics CRM


Steps to Follow:

In this example in Opportunity Entity i have created an Option Set field

1. Submitted

2. Sent for Approval

3. Approved

4. Rejected


I have downloaded Four images and store it in CRM as Web Resources(Settings --> Customization--> Customize the system --> WebResource--> New WebResource --> Type as PNG)



As the Above mentioned you need to Process it for storing the PNG


Once Above steps done create an WebResource for JavaScript(Settings --> Customization--> Customize the system --> WebResource--> New WebResource --> Type as JavaScript)

Then write the below code in the TEXT Editor Javascript


function populateImageValuesinGrid(rowDataFromGrid) {

    debugger;

    var getRows = JSON.parse(rowDataFromGrid);

    var currentRecordStatus = getRows.cr608_currentrecordstatus;

    var populateimageValues = "";

    var populateTooltip = "";


    switch (currentRecordStatus) {

        case "Submitted":

            populateimageValues = "SUBMITTED WEBRESOURCE NAME";//cr608_submited

            populateTooltip = "Submitted";

            break;

        case "Approved":

            populateimageValues ="Approved WEBRESOURCE NAME";//cr608_Approved

            populateTooltip = "Approved";

            break;

        case "Rejected":

            populateimageValues = "Rejected WEBRESOURCE NAME";//cr608_rejcted

            populateTooltip = "Rejected";

            break;

        case "Sent For Approval":

            populateimageValues = "SFA WEBRESOURCE NAME";//cr608_sent for approval

            populateTooltip = "Sent For Approval";

            break;

    }


    var returnArrayValues = [populateimageValues, populateTooltip];

    return returnArrayValues;

}


Once Pasted the above script--> Click Save then Publish

Once Publish Done

Open the Opportunity Entity from Solutions --> then click on View(here am going to populate in Opportunity association view)--> Open it then select open Classic View --> then Select the STATUS COLUMN(where you want to show images)

then Input the WebResource Name then Input the FUNCTION name --> Click Ok --> Save and Close --> PUBLISH


Thats it. Now you can see the image automatically gets populated based on the status




Conclusion:


This is how we need to add Images/Icons in Custom View or in Grid



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}









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...