Sunday, August 29, 2021

Preview Send-In App notifications

 Step 1:

    Create a trial Environment Link for Reference

Step 2 :

    Open the trial Environment (You cannot see App Notification Button)






Step 3:

    Go to https://make.powerapps.com

    Click Solutions 

    Create a New Solution

    Create a New Model Driven App by selecting New--> App --> Model-Driven App  --> Copy the UNIQUE Model Driven App name
    

Step 4:

    Open the Created Model Driven Apps --> Click F12 Button --> and Navigate to Console and Run the below code

fetch(window.origin + "/api/data/v9.1/SaveSettingValue()",{ method: "POST", headers: {'Content-Type': 'application/json'}, body: JSON.stringify({AppUniqueName: "Your app unique name", SettingName:"AllowNotificationsEarlyAccess", Value: "true"}) });

Note:

Change "Your app unique name" to your Model Driven App Name

Step 5:

    To make the notification triggering point --> Create a webresource like below and call the function from the ONload of any entity


function OnLoad(executionContext) {

    var formContext = executionContext.getFormContext();

    var systemuserid = formContext.context.getUserId().replace("{","").replace("}","");

    var notificationRecord =

    {

        "title": "Welcome",

        "body": "Welcome to the world of app notifications!",

        "ownerid@odata.bind": "/systemusers(" + systemuserid + ")",

        "icontype": 100000000, // info

        "toasttype": 200000000 // timed

    }

    // Create notification record

    Xrm.WebApi.createRecord("appnotification", notificationRecord).

        then(

            function success(result) {

                console.log("notification created with ID: " + result.id);

            },

            function (error) {

                console.log(error.message);

                // handle error conditions

            }

        );

}


Youtube Link for your reference
Microsoft Link for your reference

Wednesday, August 25, 2021

How to Generate Barcode in Canvas PowerApps

Created Sample Record

 



 

Login to Powerapps --> Create an Canvas App--> Connect with Dataverse(Based on your Backend)



Above shows the Gallery Record

Create a new Screen (Name: BarcodeScreen) --> Add a Button called Generate barcode

On-select of Generate Barcode --> Navigate(BarcodeScreen,ScreenTransition.Cover)



Open BarcodeScreen

Add a HTML Text by Selecting Text at the Top of the Ribbon



 

Navigate to the URL : https://barcode.tec-it.com/



You can see the Data and Refresh Button

Whatever data you are entering in the Data Will Automatically display as Barcode image

Scroll down and Copy <img> </img>(Line)



URL : "<img alt='Barcode Generator TEC-IT' src='https://barcode.tec-it.com/barcode.ashx?data=BARCODE&code=&multiplebarcodes=false&translate-esc=true&unit=Fit&dpi=96&imagetype=Gif&rotation=0&color=%23000000&bgcolor=%23ffffff&codepage=Default&qunit=Mm&quiet=0&hidehrt=False' width=400; height=300/>"

 

Now to Populate Values Dynamically from the Main Gallery(Step 1)

Replace URL (BARCODE) like below

"<img alt='Barcode Generator TEC-IT' src='https://barcode.tec-it.com/barcode.ashx?data="&mainGallery.Selected.'Barcode ID'&"&code=&multiplebarcodes=false&translate-esc=true&unit=Fit&dpi=96&imagetype=Gif&rotation=0&color=%23000000&bgcolor=%23ffffff&codepage=Default&qunit=Mm&quiet=0&hidehrt=False' width=400; height=300/>"

 

That’s it.

 



You can see the Barcode Generated

 

github link for your reference

Youtube link for your reference

Tuesday, August 24, 2021

How to Write Business Rules in Dataverse or CRM

 Hi All, 

Please find the below step by step for creating Business Rules

 

Open Dynamics CRM / Dataverse 

Click Gear Icon at TOP right



Click Advance Settings


 

Select Customization à Customize the system à Expand Entities à In this demo am using Opportunity as an Entity



Select Business Rules à Select New



Input Name by expanding the Arrow



You can choose Scope , if Entity(All the servicecalls or data import), if All Forms(In Client Side it will trigger for all the forms) Rather will run based on Form based



Above Actions we can perform in Business Rules.

To Start the Operation, Select Add à And Select the Respective Actions which you want to Perform, once selected click Properties at the Right side and Choose the option based on Field, Operator, Type etc and Click APPLY to proceed further.

                 







 

Once this condition doneà Click Activate

Refresh the form

 





 

Youtube Link for your reference

Subscribe

Monday, August 23, 2021

How to check IsDirty Fields in MSCRM/Dataverse

Hi All,

Please find the Below Code to check what are the fields are DIRTY in MSCRM/Dataverse.

Explanation:

What is mean by Dirty?

    OnLoad of Screen, sometimes we will get UNSAVED CHANGES, because we may Run some scripts in the OnLoad Operation so to find all the Changes happend in the Field we will use Dirty condition to achieve the same.


// Check Form is Dirty

function CheckFormIsDirty() {

    alert(Xrm.Page.data.entity.getDataXml());

}


// Get the Dirty Fields in Alert

function CheckFormIsDirty() {

    attributes = Xrm.Page.data.entity.attributes.get();

    if (attributes != null) {

        for (var i in attributes) {

            if (attributes[i].getIsDirty()) {

                // Display the name and value of the attribute that has changed

                alert(attributes[i].getName());

            }

        }

    }

}

Thursday, August 19, 2021

Delete Record using BPF

How to Create Powerapps Gallery with Pagination

Open Dynamics CRM /Powerapps 

Click Gear Icon at TOP right


 

Click Advance Settings



Click process

 

Open the Process where you want to call an Action 

In my case am using Lead to Opportunity Sales Process

Open the BPF 

Deactivate if activated 

Select the stage where you want to add Action



Select New and Add Action Step 

Select New in the Execute Process in right side of properties 


Create a Process like this On this done à Click Activate


Once done you can see the steps in Action steps (Execute Process)

Open Visual studio and create a plugin for deletion process

Once Done Open Plugin Registration tool

Register Assembly

Click Create a new step and enter Message as (new_DeleteRecords)



 

 

 

How to Create Powerapps Gallery With Pagination

How to Create Powerapps Gallery With Pagination

1.     Add a Gallery (Gallery Name : galHidden)



2.     Set Visible Property for galHidden = false



3.     Create a New Dropdown by selecting Inputà Drop Down



4.     Items for Dropdown [5,10,15,20] (Note: Make Sure its Number]

5.     Add Four Icon Based on below snapshot



6.     On select of (Start of Record)  (ICON With round)

a.     Onselect = Set(varPageNumber,1)

b.     Display Mode = If(varPageNumber=1, Disabled,DisplayMode.Edit)

7.     On select of (icon Previous)(ICON without round)

a.     Onselect = Set(varPageNumber,varPageNumber-1)

b.     Display Mode = If(varPageNumber=1, Disabled,DisplayMode.Edit)

8.     On Select of (icon Next)(ICON without round)

a.     Onselect = Set(varPageNumber,varPageNumber+1)

b.     Display Mode= If(drpPaginationSize.Selected.Value*varPageNumber<=CountRows(galHidden.AllItems),Edit,Disabled)

9.     On Select of (icon End of Record)(ICON With round)

a.     OnSelect = Set(varPageNumber, RoundUp( CountRows(galHidden.AllItems) / drpPaginationSize.SelectedText.Value ,0) )

b.     Display Mode= If(drpPaginationSize.Selected.Value*varPageNumber<=CountRows(galHidden.AllItems),Edit,Disabled)

10.  On Page Load OnVisible

a.     OnVisible = Set(varPageNumber,1)



11.  Add Label between two icons



a.     Text = "Page "&varPageNumber&" of "&If(Mod(CountRows(galHidden.AllItems),100)=0,RoundUp(CountRows(galHidden.AllItems)/drpPaginationSize.SelectedText.Value,0)&"+ pages",RoundUp(CountRows(galHidden.AllItems)/drpPaginationSize.SelectedText.Value,0)&" page(s)")

12.  Add a new Gallery (Name : galMain)

a.     Items : If(icoNext.DisplayMode=Disabled,

LastN(FirstN(galHidden.AllItems,drpPaginationSize.Selected.Value*varPageNumber),drpPaginationSize.Selected.Value-(drpPaginationSize.Selected.Value*varPageNumber-CountRows(galHidden.AllItems))),LastN(FirstN(galHidden.AllItems,drpPaginationSize.Selected.Value*varPageNumber),drpPaginationSize.Selected.Value))


please find github link for sample msapp file

Further reference

Tuesday, August 17, 2021

Add Remove Users for CRM/Dataverse in Office.com

        

                                                                    Adding Users:

Navigate to https://www.office.com/



Click Settings at the left side

Click Users --> Active Users --> Add a User

Automatically create password

If you want to create a password from your end (Untick the Box to create)

  

2.       Require this user to change their password when they first sign in

a.       If you want user to change password while their first login you can Enable checkbox

3.       Send password in email upon completion

a.       If you want to share password to user in their personal/office account

4.       


5.       Click Next to go to Assign product license(assign respective license to the users)


6.       Click Next for Optional Settings

7.       


8.       Review the data and click Finish Adding to Add a New User

Remove Users:

Navigate to Active Users à Click on three dots and Click on Delete user to Delete the User


 

Attached github link for your reference
Subscribe

Monday, August 16, 2021

How to Import Data from Excel to Multiple tables in PowerApps

Introduction:   I have created a view on how to import data from excel to multiple tables in Canvas PowerApps   Implemented Steps: ...