Power Apps Portals Archives - Microsoft Dynamics 365 Blog http://microsoftdynamics.in/tag/power-apps-portals/ Microsoft Dynamics CRM . Microsoft Power Platform Thu, 23 Feb 2023 18:47:46 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.5 https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/04/cropped-Microsoftdynamics365-blogs.png?fit=32%2C32 Power Apps Portals Archives - Microsoft Dynamics 365 Blog http://microsoftdynamics.in/tag/power-apps-portals/ 32 32 176351444 Transfer online files to a local device using ‘Download function’ in Power Apps http://microsoftdynamics.in/2023/02/23/transfer-online-files-to-a-local-device-using-download-function-in-power-apps/ Thu, 23 Feb 2023 18:47:46 +0000 https://www.inogic.com/blog/?p=34069 Recently Microsoft announced a powerful feature -“Download function in Power Apps”. This feature allows us to easily download online files from the web to the local device. Let’s see how to use this feature in everyday life. Suppose our organization wants to create an App (Canvas or Model Driven App) in Dynamics CRM. We have...

The post Transfer online files to a local device using ‘Download function’ in Power Apps appeared first on Microsoft Dynamics 365 Blog.

]]>
Recently Microsoft announced a powerful feature -“Download function in Power Apps”. This feature allows us to easily download online files from the web to the local device.

Let’s see how to use this feature in everyday life.

Suppose our organization wants to create an App (Canvas or Model Driven App) in Dynamics CRM. We have a file on the web that we want to enable our users to download regularly through our App. This would get them updated data by simply clicking on Download File.

This can be achieve using the below steps:

Step 1:

Create an App in CRM (Canvas or Model Driven App).

Step 2:

Insert Label Control into App.

Power Apps

Step 3:

In Power Apps, select the label and in Power Fx, onSelect of label, add Formula with Address as a Parameter “Download (Address)”.

Address– The URL address of a document or file to download

Power Apps

Step 4:

Once you publish the app, you can click on Download File to download it.

Power Apps

Conclusion

With the help of download function in Power Apps, we can easily download online files to local devices.

Microsoft Power Platform (3)

The post Transfer online files to a local device using ‘Download function’ in Power Apps first appeared on Microsoft Dynamics 365 CRM Tips and Tricks.

Please visit the Source and support them

The post Transfer online files to a local device using ‘Download function’ in Power Apps appeared first on Microsoft Dynamics 365 Blog.

]]>
4673
Use of async-await in virtual PCF control http://microsoftdynamics.in/2022/12/10/use-of-async-await-in-virtual-pcf-control/ Fri, 09 Dec 2022 20:04:55 +0000 https://www.inogic.com/blog/?p=33310 Recently while working on the virtual PCF control we noticed that the updateView() in the virtual PCF works in a different manner as compared to standard PCF control with async functions. In standard PCF control, the return type of the updateView() is void while in the virtual PCF the return type is react-element. So when...

The post Use of async-await in virtual PCF control appeared first on Microsoft Dynamics 365 Blog.

]]>
Recently while working on the virtual PCF control we noticed that the updateView() in the virtual PCF works in a different manner as compared to standard PCF control with async functions. In standard PCF control, the return type of the updateView() is void while in the virtual PCF the return type is react-element. So when we return the promise to the updateView() by calling the callback function in a virtual PCF control, we do not get the desired result.

Let’s take an example where we will create a virtual drop-down PCF control. We will be showing the entity attributes as options in our drop-down control. In the example below, we have created an async function   GetEntityAttribute which will be responsible for getting the entity attributes to list out in our PCF drop-down control.

If we call our async function GetEntityAttribute in the updateView() as follows, we will not get the options with dropdown as shown in the below image.

UpdateView() Then:

public updateView(context: ComponentFramework.Context<IInputs>): React.ReactElement {

//Local variables let isDisable: boolean = false; let isMultiple: boolean = false; let dropDownProps: any; //Calling function to get the attributes this.GetEntityAttribute(context);   //Calling function to get the selected values this.selectedItem = this.getSelecetdItems(context) dropDownProps = { entityMetadata: this.entityAttributes, defaultSelectedOptions: this.selectedItem, isMultiple: isMultiple, isDisable: isDisable, notifyChange: this.notifyChange.bind(this), context: context }; return React.createElement( DynamicDropdown, dropDownProps ); }

Field Interface then:

virtual PCF control

It happens because when an async function is called and executed the program control directly jumps to the next line of the updateView() and executes it first and renders a dropdown control with no options. It then goes again to the async function to execute the code after await where we had our array of all attributes. Since the control was rendered already, we will not get a drop-down with options.

To solve this issue we will use the useEffect() function of the react and call async functions inside it rather than calling the async function in the updateView(). Thus, the updateView() will now look as follows.

UpdateView() Now:

public updateView(context: ComponentFramework.Context<IInputs>): React.ReactElement { //Local variables let isDisable: boolean = false; let isMultiple: boolean = false; let dropDownProps: IDynamicDropdownProps = {}; let entityName: string | null = ""; entityName = context.parameters.entityName.raw ?            context.parameters.entityName.raw : context.parameters.fieldName.raw; //Reading the parameters dropDownProps = { isDisable: isDisable, isMultiple: isMultiple, entityName: entityName, context: context, notifyChange: this.notifyOnSelect.bind(this) } return React.createElement( DynamicDropdown, dropDownProps ); }

We will create a Helper.ts file containing the functions and then create the object of the class containing all the functions in App.tsx file which consists of a functional component. We have also passed a dependency to ensure that the useEffect() gets called every time there’s a change in the entity name.

Helper.ts

public GetEntityAttribute = async (entityName: any) => { //Local variables let functionName: string = "GetEntityAttribute()=>"; let res: any; let attributesLogicalname: any = []; let result: any; let entityAttributes: any = []; try { if (!this.isValid(entityName)) { return { options: entityAttributes } } //Making request for entity metadata to get logical names of the attributes res = await this._context.utils.getEntityMetadata(entityName); //Getting all logical name of the attributes and storing it in the array attributesLogicalname = res._entityDescriptor.AttributeNames; //Making request to get logical name as well as display name of the attributes result = await this._context.utils.getEntityMetadata(entityName,                      attributesLogicalname); //Converting the object keys to an array for iteration let response = Object.keys(result.Attributes._collection); //Pushing the attributes into the array for (let j = 0; j < response.length; j++) { if (result.Attributes._collection[response[j]].DisplayName != null) { entityAttributes.push({ key: result.Attributes._collection[response[j]].LogicalName, text: result.Attributes._collection[response[j]].DisplayName }) } } entityAttributes.sort(function (a: any, b: any) { if (a.text < b.text) { return -1 } if (a.text > b.text) { return 1 } return 0; }); } catch (error: any) { //Handling error this._context.navigation.openErrorDialog({ message: functionName + ": Kindly check the entity name and it must be in lowercase" }) } return { options: entityAttributes } }   App.tsx:   useEffect(() => { _CrmHelper.GetEntityAttribute(props.entityName).then((success) => { //Setting the dropdown options setDropDownOptions(success.options) }); }, [props.entityName])

Field Interface Now:

virtual PCF control

Conclusion

Thus, we saw how to use Async-await on a load of virtual PCF control.

 

Please visit the Source and support them

The post Use of async-await in virtual PCF control appeared first on Microsoft Dynamics 365 Blog.

]]>
4633
Perform changes in Power Apps Portal with newly introduced Microsoft Power Platform CLI http://microsoftdynamics.in/2021/08/10/perform-changes-in-power-apps-portal-with-newly-introduced-microsoft-power-platform-cli/ Mon, 09 Aug 2021 19:28:42 +0000 https://www.inogic.com/blog/?p=28909 Introduction: Microsoft recently introduced Microsoft Power Platform Command Line Interface to perform various operations on Microsoft Dataverse environments, Power Apps Portal, PCF, Plugin, Solution, Admin, and Canvas by using Visual Studio Code. In this blog, we will be focusing on Power Apps Portal and will see how we can connect Portal using Microsoft Power Platform...

The post Perform changes in Power Apps Portal with newly introduced Microsoft Power Platform CLI appeared first on Microsoft Dynamics 365 Blog.

]]>
Introduction:

Microsoft recently introduced Microsoft Power Platform Command Line Interface to perform various operations on Microsoft Dataverse environments, Power Apps Portal, PCF, Plugin, Solution, Admin, and Canvas by using Visual Studio Code.

In this blog, we will be focusing on Power Apps Portal and will see how we can connect Portal using Microsoft Power Platform CLI and perform various operation on the same.

To be precise, we will create a new web page using CLI and check it on the portal.

However, there are some prerequisites that we need to configure before start working on Power Apps Portal.

First, we need to configure the Power Apps Portal for our CRM.

Login to https://make.powerapps.com/ and click Portal from Blank.

Perform changes in Power Apps Portal with newly introduced Microsoft Power Platform CLI

After clicking the button, a popup will appear where we need to provide a suitable name for the portal and address.

Perform changes in Power Apps Portal with newly introduced Microsoft Power Platform CLI

Then click on the Create button and wait for the portal to become ready to use.

While the portal is being configured, we need to install the Power Platform VS Code Extension in our Visual Studio Code.

Open the Visual Studio, click the extension button and search for the Power Platform VS Code Extension. Once it is visible, click the install button.

Perform changes in Power Apps Portal with newly introduced Microsoft Power Platform CLI

Here we are done with prerequisites and ready to connect the Power Apps Portal.

Now create new folder and open that into Visual Studio Code. The Power Apps Portal data will be downloaded in this newly created folder.

Perform changes in Power Apps Portal with newly introduced Microsoft Power Platform CLI

Open the Terminal in VS Code.

Perform changes in Power Apps Portal with newly introduced Microsoft Power Platform CLI

Now we need to authenticate it in order to connect Power Apps Portal. To authenticate we will use below command:

Command: pac auth create –url <Dynamics CRM Url> –un <User ID> -p <Password>

For example: pac auth create –url https://orgname.crm.dynamics.com –un admin@orgname.onmicrosoft.com -p pass@123

Perform changes in Power Apps Portal with newly introduced Microsoft Power Platform CLI

You can check if you have successfully connected to your environment by running the command.

Command: pac org who

This will show you the organization details.

Once successfully authenticated now we need to download the portal data into our system so that we can work offline into our portal and then upload it back to cloud.

To download the Power Apps portal data we need to run the below commands.

Command: pac paportal list

This will show you the listing of portal websites and website ids into your connected environment. The WebsiteId will be used in the command to download the Portal data.

Perform changes in Power Apps Portal with newly introduced Microsoft Power Platform CLI

Command: pac paportal download –path “<Directory Path>” –webSiteId <Portal WebsiteId>

For Example:

pac paportal download –path “E:\Sam\PowerAppsCLI” –webSiteId d78574f9-20c3-4dcc-8d8d-85cf5b7ac141

Perform changes in Power Apps Portal with newly introduced Microsoft Power Platform CLI

Once it is downloaded, all portal data can be seen in the folder and since we have already opened the folder in our VS Code we just need to refresh it.

Now to create new custom webpage we need to know things we required to update.

  • YML extension files: – yml is serialized human readable text document file, which is actually not a Markup Language. Using this we will be setting our web page properties.
    • How we can set property? It will be like key value pair and the key will be logical name of the property and the value for the key needs to specify after the colon (:).

Our custom page should be having the below properties and its values.

  • Parent Page(adx_parentpageid) : Home Page
  • Page Template(adx_pagetemplateid): Full Page without Child Links
  • Publishing State(adx_publishingstateid) : Published

As can be seen above, we will be using the “Home Page” as the value of the adx_parentpageid, “Full Page without Child Links” as the adx_pagetemplateid and “Published” as the adx_publishingstateid.

Moreover, to set the above properties we first need to get unique ids for each of these properties. As each of them are attributes of type lookup in Dynamics 365 CRM and to map respective records in the lookup fields we require their respective Ids.

To get the unique id of the Home Page, expand the Web Pages folder and find home. Then expand it and open the Home.webpage.yml. After that copy the value of adx_webpageid. This is the value we shall use for the adx_parentpageid attribute of our custom page.

Perform changes in Power Apps Portal with newly introduced Microsoft Power Platform CLI

To get the unique id of Page Template, expand the page-templates folder from main folder, look for the Full-Page-without-Child-Links.pagetemplate.yml page template file and copy the value of adx_webtemplateid. This is the value we shall use for the adx_pagetemplateid attribute of our custom page.

Perform changes in Power Apps Portal with newly introduced Microsoft Power Platform CLI

Similarly, we need to find the id of Publishing State. In the main folder search publishingstate.yml file and copy the value of adx_publishingstateid. This is the value we shall use for the adx_publishingstateid attribute of our custom page.

Perform changes in Power Apps Portal with newly introduced Microsoft Power Platform CLI

Now we have all values for our required properties.

To create new custom web page, we will expand the Web Pages folder and within it copy & paste any Web Page. For instance, we copied category page as shown below:

Perform changes in Power Apps Portal with newly introduced Microsoft Power Platform CLI

After pasting all required things now we will update folder and files as per our requirement.

We changed the web page name to custom-page and also renamed all files inside the folder. After updating the name, we need to set/update the properties inside the “Custom-Page.webpage.yml” file.

You can check the changes we did in below screenshot:

Perform changes in Power Apps Portal with newly introduced Microsoft Power Platform CLI

Now in the “Custom-Page.en-US.webpage.yml” we will be adding the same values as we have set in the above step except for the adx_rootwebpageid. In the adx_rootwebpageid we will set the value of adx_webpageid from the “Custom-Page.webpage.yml” file.

Perform changes in Power Apps Portal with newly introduced Microsoft Power Platform CLI

After updating the yml files, we can now update the html files and that will be shown in our portal.

Perform changes in Power Apps Portal with newly introduced Microsoft Power Platform CLI

Once changes are done, save the changes. And now we are ready to upload our portal data into cloud.

For uploading the changes, we will use below command:

Command: pac paportal upload –path “<Directory Path>

For Example: pac paportal upload –path “ E:\Sam\PowerAppsCLI

Perform changes in Power Apps Portal with newly introduced Microsoft Power Platform CLI

Result:

We completed our changes and uploaded those changes on cloud. Now we will check if the changes are reflected in our Portal or not.

Open the portal home page and since parent page of our custom page is home then after the portal url we will add “/<partial name of the page>/” to access our page.

For example: <portal url>/custom-page/

Perform changes in Power Apps Portal with newly introduced Microsoft Power Platform CLI

Conclusion:

Using Microsoft Power Platform CLI, we are able to work on the portal in offline mode and after doing the changes, we are able to upload them in one go. In addition, it will help developers to migrate portal data from one environment to other environment with very less effort.

Sharepoint Security Sync

Please visit the Source and support them

The post Perform changes in Power Apps Portal with newly introduced Microsoft Power Platform CLI appeared first on Microsoft Dynamics 365 Blog.

]]>
4416
Azure Functions, Web API, PowerApps and other tricks for Dynamics 365 CRM – Most Clicked Blogs of the Year! http://microsoftdynamics.in/2021/06/20/azure-functions-web-api-powerapps-and-other-tricks-for-dynamics-365-crm-most-clicked-blogs-of-the-year/ Sun, 20 Jun 2021 16:27:17 +0000 https://www.inogic.com/blog/?p=15269 Powered by passion – Inogic is a leading Microsoft ISV for Dynamics 365 CRM for over more than a decade. We brew innovative products and fuel Dynamics 365 with our range of solutions. Inogic also offers bespoke high-quality low-cost offshore development services for Microsoft products such as Power BI, Flow, PowerApps, Portals and others. Given...

The post Azure Functions, Web API, PowerApps and other tricks for Dynamics 365 CRM – Most Clicked Blogs of the Year! appeared first on Microsoft Dynamics 365 Blog.

]]>
PowerApps

Powered by passion – Inogic is a leading Microsoft ISV for Dynamics 365 CRM for over more than a decade. We brew innovative products and fuel Dynamics 365 with our range of solutions. Inogic also offers bespoke high-quality low-cost offshore development services for Microsoft products such as Power BI, Flow, PowerApps, Portals and others.

Given our super modern slick technology, we believe in sharing tips and tricks with our community from time to time. Therefore, we come up with informative blogs and are quite active on community forums. In this blog we are going to compile the top five blogs of 2018 which have been most clicked. Compiling them again for our friends who missed these posts. Thank you so much for sharing our posts and encouraging us to explore Dynamics 365 and Power Platform.

Dynamics 365 v9.0: Xrm.WebApi – CRUD Operations Part – 1

This blog talks about how Xrm.WebApi acts as a boon for developers. In the versions prior to v9.0 one had to create their own libraries or use third party libraries or create XmlHttpRequest and AJAX request. With Xrm.WebApi enhancement in Dynamics 365 CRM v9.0 developers’ life is made easy. In a continuation to this blog Dynamics 365 v9.0: Xrm.WebApi – Operations Part – 2 we have discussed how to Retrieve Multiple records and Execute Actions.

Integrating Dynamics 365 with Azure Functions – Part 1, Part 2, and Part 3

Azure function is a server-less architecture where you can host your code on cloud without any infrastructure. In this blog we have taken example of creating Azure function and called same through workflows. We have also depicted how a function can be executed as an HTTP request. This series of blogs talks about invoking Azure functions from Dynamics 365.

Working on Lookup Field of Dynamics 365 in PowerApps

PowerApps allows building business Apps that run cross platform. Citizen developers with minimal development capabilities can build Apps and deploy them for usability. These apps are modular in nature and these can be dragged and dropped to build an App in short span of time. It allows anyone in an organization unlock new business agility.

Given a business requirement we needed to set lookup fields using PowerApps in Dynamics CRM. This is not inherently supported in PowerApps so after a little research we found out the solution to this. This blog explains the steps to read and set Lookup fields of Dynamics 365 in Power Apps.

Show Lookup Dialog in Dynamics 365 v9.0

This blog discusses about how using the new feature introduced in Microsoft Dynamics 365 v9.0 users can show lookup dialog using Xrm.Utility.lookupObjects method. The parameters required for Xrm.Utility.lookupObjects are list of the entities to be displayed, default entity to be shown in lookup window, Guid of default view, specification whether to allow user to select multiple records and list of views that need to be available for lookup dialog. Using these parameters a lookup dialog can be seen.

JavaScript: “Execution Context” provides Form Values on Web as well as UCI in Dynamics 365 v9.0

After the introduction of UCI there is a generic interface for the end users, this is about UI but behind the scene for developers Microsoft provided “Execution Context” object which is a collection of array. This blog talks about how we can pass the Execution Context using “Primary Control” CRM Parameter to Script function which we can call on Click of Custom Button.

If you want to explore more informative blogs visit this space.

We provide services for PowerApps, Microsoft Flow, Microsoft Portal, Power BI and others. Contact us for any query, suggestion or feedback at crm@inogic.com

Keep Exploring!

Please visit the Source and support them

The post Azure Functions, Web API, PowerApps and other tricks for Dynamics 365 CRM – Most Clicked Blogs of the Year! appeared first on Microsoft Dynamics 365 Blog.

]]>
4349
Behavior Properties in Canvas Power App http://microsoftdynamics.in/2021/06/18/behavior-properties-in-canvas-power-app/ Fri, 18 Jun 2021 17:18:02 +0000 https://www.inogic.com/blog/?p=28209 Canvas App is no code/low code business app with which you can design the app by dragging and dropping elements onto a canvas. Canvas app is used to build mobile apps with various functionalities. Recently, we had a client requirement and to fulfill this requirement we needed to create multiple screens where some of the...

The post Behavior Properties in Canvas Power App appeared first on Microsoft Dynamics 365 Blog.

]]>
Canvas App is no code/low code business app with which you can design the app by dragging and dropping elements onto a canvas. Canvas app is used to build mobile apps with various functionalities. Recently, we had a client requirement and to fulfill this requirement we needed to create multiple screens where some of the screen had common control. So, we have decided to create a component of the Power App. On one of the screens, we had the functionality to schedule an appointment with the customer. Though we used component but now we have a requirement to show a message when the sales rep selects the appointment date. To achieve this task, we wanted to add some code when component control changes. Previously, there was no way to do something when control value changes but with the recent release, it is available in Power App as behavior properties. But it is still in the experimental section. To use the behavior properties feature we need to enable it first.

To enable please follow the steps given below:

  • First, click on File in Canvas App.
  • Then go to Settings >Upcoming features.
  • Then go to Enhanced component properties and enable it.

Behavior properties in Canvas Power App

Once you enable the “Enhanced component properties”, we will be able to see the Behavior property when we add new custom property from the customer properties section as shown below:

Behavior Properties in Canvas Power App

As to achieve our requirement to show message to sale rep when they select appointment date to reconfirm appointment date; we have added a custom property with name changeDate of type as Behavior.

To send the selected appointment date, we added parameter to behavior custom property.

Behavior properties in Canvas app

After clicking on New parameter, the below window opened where we mentioned name and data type.

Behavior properties in Canvas app

Next, select the date control from a component that we created and pass custom behavior property with parameter in onChange event to appointment date control.

Behavior properties in Canvas app

Finally when we select the component, we will see the “changeDate” along with “OnReset” event. To show the message then select “changeDate” and define notify function as shown below:

Behavior properties in Canvas app

When the sales rep opens the Canvas App and tries to book an appointment and select the appointment date then the message will be shown that you have selected an appointment date. For example “06/21/2021”.

Behavior properties in Canvas app

Conclusion:

With help of Behavior property, we can create custom properties to achieve more functionalities.

Reference Source – https://powerapps.microsoft.com/es-es/blog/enhanced-component-properties/

Please visit the Source and support them

The post Behavior Properties in Canvas Power App appeared first on Microsoft Dynamics 365 Blog.

]]>
4284