Thursday, 18 October 2018

Microsoft PowerApps: How to create environments in PowerApps

Environments in PowerApps

An environment is a space to store, manage, and share your organization’s business data, apps, and flows. 


In PowerApps admin center, you can create a new environment or manage all of the environments that you have created. To access the PowerApps admin center go to admin.powerapps.com, or go to PowerApps site, click Settings and select Admin Center.


Creating a new environment

1. Click New Environment.


2. Enter Test environment, select your Region, and Environment type of Trial. Click Create environment.



3. Click Create database. Select your Currency and Language. Mark Include sample apps and data and click Create database.






Once you have created the environment you can find in the list available in the PowerApps portal. 



Tuesday, 16 October 2018

Microsoft PowerApps: How to share a PowerApps

Prerequisites
Learn how to create PowerApps: How to create an App in PowerApps
Once you are done developing your PowerApp you can now share the App with all the users in the organization or just add specific users and grant permissions.




NOTE: You can't share apps with a distribution group in your organization or with any users or groups outside your organization.

Microsoft PowerApps: How to create an App in PowerApps (Part 2)

In this part of blog, we are now going to create our first app using Microsoft PowerApps service that will be consuming data from a Dynamics 365 for Operations for which we have already created our data connection in Part 1.

Go to Apps -> Create an app


You will see there are multiple options available to start creating your App. Here you can select the layout template and data source for your app or you can choose blank app template and build it all from scratch.




PowerApps generates three-screen app BrowseScreen1, DetailScreen1 and EditScreen1 based on the records.


You can now customize the screens by modifying or adding more controls or change the data source as well.

Change the Data source:


Modify the layout:


Modify the text field:


Sort the records:


Controls: You can use variety of Controls in your applications



Preview the App:

You can preview the app by clicking the run button.


When you are done developing your PowerApp, click File and then click Save


Go to App settings to add description or configure elements.


You can now see your newly created app in the App menu.


Learn how to share PowerApps in the next blog: How to share PowerApps

Microsoft PowerApps: How to create an App in PowerApps (Part 1)

In this blog we will learn how to create an app using Microsoft PowerApps. Before we get started let’s find out what are PowerApps?

Introduction to PowerApps

Microsoft PowerApps is a service that lets you build business apps that run in a browser or on a phone or tablet, and no coding experience is required.



Connectors

PowerApps supply a wide area of data sources to connect to.Connectors provide connectivity for many popular services and on-premises data sources including Microsoft SharePoint, Microsoft Office 365, Google Drive, OneDrive, SQL Server, Salesforce, Dynamics AX, Dynamics CRM and many more.


How PowerApps works?


Start creating a PowerApp

To create an App you first Sign in to PowerApps studio web.powerapps.com


First of all we need to add data source connection

Here we are going to create connection with Microsoft dynamics 365 for Finance and Operations.

Go to Data -> Connections -> New connections



From the list select Dynamics 365 for Operations. In the dialog box click Create and sign in with your account. You will see that the connection will be added in your connection list. In the same way you can connect with the different data sources.





We will learn how to create an App in the second part of this post : How to create an App in PowerApps (Part 2)


Friday, 12 October 2018

Passing values between pre and post event handlers in D365FO / AX 7

Here is the sample code to pass / store values between pre and post event handlers using args. You can set the value in pre-event handler using args.addArg and get the value in post handler args.getArg.


    /// <summary>
    /// enforcePayRateTolerance pre event handler
    /// </summary>
    /// <param name="args">Event args</param>
    [PreHandlerFor(tableStr(HRMCompFixedPlanTable), tableMethodStr(HRMCompFixedPlanTable, enforcePayRateTolerance))]
    public static void HRMCompFixedPlanTable_Pre_enforcePayRateTolerance(XppPrePostArgs args)
    {
        HRMCompFixedPlanTable HRMCompFixedPlanTable = args.getThis();

        args.addArg("Tolerance", HRMCompFixedPlanTable.Tolerance);

        HRMCompFixedPlanTable.Tolerance = HRMCompTolerance::None;
    }

    /// <summary>
    /// enforcePayRateTolerance post event handler
    /// </summary>
    /// <param name="args">Event args</param>
    [PostHandlerFor(tableStr(HRMCompFixedPlanTable), tableMethodStr(HRMCompFixedPlanTable, enforcePayRateTolerance))]
    public static void HRMCompFixedPlanTable_Post_enforcePayRateTolerance(XppPrePostArgs args)
    {
        HRMCompFixedPlanTable HRMCompFixedPlanTable = args.getThis();
        HRMCompTolerance tolerance;

        if (args.existsArg("Tolerance"))
        {
            tolerance = args.getArg("Tolerance");

            HRMCompFixedPlanTable.Tolerance = tolerance;
        }
    }

Difference Between Edit And Display Method in Ax

Display Method: The display method means that the method’s return value is being displayed on a form or a report.  This value is fixed and c...