Power Apps Portals Archives - Microsoft Dynamics 365 Blog https://microsoftdynamics.in/category/power-apps-portals/ Microsoft Dynamics CRM . Microsoft Power Platform Tue, 09 May 2023 10:25:52 +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&ssl=1 Power Apps Portals Archives - Microsoft Dynamics 365 Blog https://microsoftdynamics.in/category/power-apps-portals/ 32 32 176351444 Automatically sending Power Apps cards to Microsoft Teams channels using Power Automate Flow https://microsoftdynamics.in/2023/05/09/automatically-sending-power-apps-cards-to-microsoft-teams-channels-using-power-automate-flow/ Tue, 09 May 2023 10:25:52 +0000 https://www.inogic.com/blog/?p=34653 Microsoft has added a new feature called Cards in the Wave 2 release.  Cards are simplified forms that are connected to Dataverse which can be sent to CRM users to capture the required details. In the previous blog, we explained how to create cards using Power Apps. In this blog, we have explained how to...

The post Automatically sending Power Apps cards to Microsoft Teams channels using Power Automate Flow appeared first on Microsoft Dynamics 365 Blog.

]]>
Microsoft has added a new feature called Cards in the Wave 2 release.  Cards are simplified forms that are connected to Dataverse which can be sent to CRM users to capture the required details. In the previous blog, we explained how to create cards using Power Apps.

In this blog, we have explained how to send these cards to the Microsoft Teams channel using Power Automate Flow. We have taken an example where we automate the process of sending an employee information Card when a custom entity employee record gets created.

Microsoft introduced new connector in the power automate flow named as Cards for Power Apps.

Power Automate Flow

This connector is used to create or get card instances with the input variables, and it will return the dynamic content of the card instance.

  • Create card instance (preview): This will help us to create a card instance of a specific card that we have created in our solution. We can also send input parameter values through this card instance. This card instance will return the dynamic content of the card.
  • Get the card description (preview): This will help us get information about the card like ID, name, description, author, etc.

Microsoft Power Platform

You can follow the below steps to create Power Automate Flow to send cards to the Microsoft Teams channel.

Step 1: Sign in to PowerAutomate using your credentials and select your environment.

Power Automate Flow

Step 2: Click on My Flows >> New Flow >> Automated Cloud Flow.

Power Automate Flow

Step 3: Give the name and choose the flow’s trigger.

Power Automate Flow

Step 4: Set the trigger. In the example screenshot below, the trigger is when a new custom employee record is created.

Power Automate Flow

Step 5: In new step, search for Cards for Power Apps, then click on Expand button.

Step 6: Select Cards for Power Apps.

Power Automate Flow

Step 7:  Select Create Card Instance (preview).

Power Automate Flow

Step 8: Select the card that you want to send. Set the body input variable. In this example, we set the Account Name value of the newly created account record.

Power Automate Flow

Step 9: In the next step, search for Microsoft Teams connector and select the action as Post Card as a chat or channel.

Power Automate Flow

 

Step 10: Set the Power Apps (Preview) in Post as field, and set Channel in Post in field. You can select your team and channel from the dropdown. After that, set the card instance that we created in the earlier step.

Power Automate Flow

After this power automation flow gets created, it will be triggered when the new employee record gets created, and the card will be sent to the Microsoft Teams channel as shown in the below screenshot.

Power Automate Flow

Conclusion

Thus, in the above blog, we learned how to send Cards to Microsoft Teams channel by using Power Automate Flow.

The post Automatically sending Power Apps cards to Microsoft Teams channels using Power Automate Flow first appeared on Microsoft Dynamics 365 CRM Tips and Tricks.

Go to Source and hit them a thumps up

The post Automatically sending Power Apps cards to Microsoft Teams channels using Power Automate Flow appeared first on Microsoft Dynamics 365 Blog.

]]>
4691
Transfer online files to a local device using ‘Download function’ in Power Apps https://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
Editable Grid feature properties of Power Apps Grid control https://microsoftdynamics.in/2022/12/23/editable-grid-feature-properties-of-power-apps-grid-control/ Fri, 23 Dec 2022 10:57:31 +0000 https://www.inogic.com/blog/?p=33446 With the Power Apps grid control, users can view, open and edit records from view and sub-grids, an evolution of Power Apps read-only control. In our previous blog, we saw how users can edit records within the grid and do infinite scrolling until they find the records they are interested in. Also, they can configure...

The post Editable Grid feature properties of Power Apps Grid control appeared first on Microsoft Dynamics 365 Blog.

]]>
With the Power Apps grid control, users can view, open and edit records from view and sub-grids, an evolution of Power Apps read-only control.

In our previous blog, we saw how users can edit records within the grid and do infinite scrolling until they find the records they are interested in. Also, they can configure editing, filtering, and navigation properties while adding control.

This blog will show some new properties of Power Apps Grid control while configuring it. Using these properties, it is possible to customize the visual appearance of columns based on specific requirements.

If a salesperson wants to sort data according to primary field initials and by visualizing the records wants to copy and paste it into other applications like excel, word, etc., using a customizer control, the developer (by using a script) can color code the columns’ values and visualize it on grid control.

Follow the same steps as mentioned in the previous blog to add Power Apps Grid Control.

1. Allow Range Selection: This property is by default set to yes. You can select a set of records or a subset of the grid to copy data to other applications using this property.

Power Apps Grid control

You can paste data to other applications like excel.

Power Apps Grid control

2. Enable jump bar: This property is by default set to No. An alphabetical list can be displayed at the bottom of the views or subgrid using this property.

Power Apps Grid control

Below is the screenshot of the jump bar enabled.

Power Apps Grid control

3. Enable Pagination: This property is by default set to No. Data can be browsed using modern scrolling (infinite scrolling) and paging buttons by setting this property. You have to set this property as Yes to disable infinite scrolling.

Power Apps Grid control

4. Enable Status column: This property is by default set to To hide the Status column( Record selection checkbox) you have to set this property as No.

Power Apps Grid control

4. Show data type icons: This property is by default set to No. By setting this property to Yes Data type icons will be displayed in the column header. On hover of the icon, the datatype name will be displayed.

Power Apps Grid control5. Customizer Control: In the customizer control property, several columns in a grid can have their visuals or interactions changed by linking to a single customizer PCF control.

6. Enable option set color: This property is by default set as No. When the Enable OptionSet color property is enabled, the background color of each value in the choice column will be shown with its corresponding value. If you are enabling this property for a table, be sure to check the color configuration for each choice column to ensure that the content is accessible and easy to read.

Power Apps Grid control

Below is the screenshot after the option set color is enabled.

Power Apps Grid control

Conclusion

Using this property users can customize its Power Apps Grid control, which will eventually replace all read-only and editable grids in model-driven apps.

User Adoption Monitor

Go to Source and hit them a thumps up

The post Editable Grid feature properties of Power Apps Grid control appeared first on Microsoft Dynamics 365 Blog.

]]>
4641
Use of async-await in virtual PCF control https://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
Image Classification model by Microsoft Lobe in Power Apps – Part 1 https://microsoftdynamics.in/2022/03/25/image-classification-model-by-microsoft-lobe-in-power-apps-part-1/ Fri, 25 Mar 2022 05:41:46 +0000 https://www.inogic.com/blog/?p=31179 Introduction: With the growth in technology we have seen an incline towards the technologies related to Machine Learning and Artificial Intelligence in our day-to-day life. In recent few years Microsoft has been pushing Low-Code/ No-Code ideology and have been incorporating ML and AI technologies in their PCF control, AI Builder Models, etc. Evidence of this...

The post Image Classification model by Microsoft Lobe in Power Apps – Part 1 appeared first on Microsoft Dynamics 365 Blog.

]]>
Introduction:

With the growth in technology we have seen an incline towards the technologies related to Machine Learning and Artificial Intelligence in our day-to-day life. In recent few years Microsoft has been pushing Low-Code/ No-Code ideology and have been incorporating ML and AI technologies in their PCF control, AI Builder Models, etc. Evidence of this can be seen in the recent PCF control like Business card Scanner, Document Automation models, etc.

In this blog series, we will be seeing the Image classification model by Lobe which is currently in preview.

Microsoft Lobe is a free desktop application provided by Microsoft which can be used to classify Images into labels. This model can also be used in different ways, for e.g., it can be added in Canvas Apps, Power Automate.

The overview of creating an Image Classification model is given below:

  • Creating a model
  • Providing sample data
  • Training the model
  • Evaluating and correcting the model detection
  • Testing the model
  • Using the model

To get started with creating an Image Classification model using Microsoft Lobe please follow the steps given below:

  • Download and Install the Microsoft Lobe Desktop application from here.
  • Once the download is finished, open the Microsoft Lobe Desktop application, and then click on Create Project
  • Give the project an appropriate name in the top-left corner and for the sample dataset you can choose between Saved Images, Camera, and Dataset.

Microsoft Lobe in PowerApps

  • In this example, we will create an attire detection model which will detect if an employee is wearing Casual or Formal attire. Here we will provide the model with some data and will label the Image based on which they would be classified.

Microsoft Lobe in PowerApps

  • Once done the Lobe will train the Model. And if there are any incorrect detection then you can correct them by changing the image label to an adequate label.

Microsoft Lobe in PowerApps

  • You can try out the model in real-time by clicking on the Use

Microsoft Lobe in PowerApps

Note: For high accuracy, the sample data should be high and diverse which will result in better training of the model.

Conclusion:

In this blog, we have seen how easy it is to create an Image detection model without writing a single line of code.

Clone Dynamics 365 CRM Records

Go to Source and hit them a thumps up

The post Image Classification model by Microsoft Lobe in Power Apps – Part 1 appeared first on Microsoft Dynamics 365 Blog.

]]>
4524
Multi-Entity/Table lookup in Dynamics 365 CRM https://microsoftdynamics.in/2021/08/23/multi-entity-table-lookup-in-dynamics-365-crm/ Mon, 23 Aug 2021 10:47:16 +0000 https://www.inogic.com/blog/?p=29105 Introduction: Recently, Microsoft introduced the multi-entity/table lookup field which was one of the most awaited features. Previously it was only available for the OOB customer lookup field; for example, the customer field has contact and account for selection in the customer lookup field. In this release of Dynamics 365 CRM, it is now possible to...

The post Multi-Entity/Table lookup in Dynamics 365 CRM appeared first on Microsoft Dynamics 365 Blog.

]]>
Introduction:

Recently, Microsoft introduced the multi-entity/table lookup field which was one of the most awaited features. Previously it was only available for the OOB customer lookup field; for example, the customer field has contact and account for selection in the customer lookup field. In this release of Dynamics 365 CRM, it is now possible to create a lookup field that has a multi-entity/table. For example, for Retailer custom entity, we want to assign a Distributor and Distributor is lookup up field. Here, we want to assign Distributor to either Account, Contact or Lead entity. Earlier, in such cases we would have created three lookup fields with these entities and show/hide lookup field based on other options set field. But with recent release, it is now possible to create lookup field with multiple entities. So here we have created only one lookup field with Account, Contact and Lead entity. However, currently it can be done only programmatically but in the future it will be added to Microsoft UI.

Now, to create multi-entity/table lookup field we have written the below C# code. Here, we have created a Distributor lookup field with Account/Contact/Lead entities.

OrganizationRequest multiLookupOrgReq = null;
OneToManyRelationshipMetadata accountMetedata = null;
OneToManyRelationshipMetadata contactMetedata = null;
OneToManyRelationshipMetadata leadMetedata = null;
OrganizationResponse organizationResponse = null;

try
{
//create request object
multiLookupOrgReq = new OrganizationRequest();

// give lookup attribute information
multiLookupOrgReq.Parameters[“Lookup”] = new LookupAttributeMetadata()
{
SchemaName = “ikl_Distributor”,
DisplayName = new Label(“Distributor”, 1033)
};

//request name
multiLookupOrgReq.RequestName = “CreatePolymorphicLookupAttribute”;

//Create relationship objects
accountMetedata = new OneToManyRelationshipMetadata();
accountMetedata.ReferencedEntity = “account”;
accountMetedata.ReferencingEntity = “ikl_retailer”;
accountMetedata.SchemaName = “ikl_retailer_account”;

contactMetedata = new OneToManyRelationshipMetadata();
contactMetedata.ReferencedEntity = “contact”;
contactMetedata.ReferencingEntity = “ikl_retailer”;
contactMetedata.SchemaName = “ikl_retailer_contact”;

leadMetedata = new OneToManyRelationshipMetadata();
leadMetedata.ReferencedEntity = “lead”;
leadMetedata.ReferencingEntity = “ikl_retailer”;
leadMetedata.SchemaName = “ikl_retailer_lead”;

multiLookupOrgReq.Parameters[“OneToManyRelationships”] = new OneToManyRelationshipMetadata[]
{
accountMetedata,contactMetedata,leadMetedata
};

//execute request
organizationResponse = _service.Execute(multiLookupOrgReq);
}
catch (Exception ex)
{
throw new Exception(ex.Message);
}

And now when we execute the above code it will create lookup field with four entities as shown in the below screenshot:

Multi-Entity/Table lookup in Dynamics 365 CRM

Conclusion:  As illustrated above, by using multi-entity/table feature you can easily set value in the lookup field instead of creating multiple lookup fields.

User Adoption Module

Please follow Source

The post Multi-Entity/Table lookup in Dynamics 365 CRM appeared first on Microsoft Dynamics 365 Blog.

]]>
4424
Perform changes in Power Apps Portal with newly introduced Microsoft Power Platform CLI https://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
How to create simple Lookup using PCF Control https://microsoftdynamics.in/2021/07/28/how-to-create-simple-lookup-using-pcf-control/ Wed, 28 Jul 2021 10:34:59 +0000 https://www.inogic.com/blog/?p=28783 Introduction: With the new updates of PowerApps Component Framework, now we can develop the PCF control for lookup field. Earlier, there was no supported way to develop the PCF Control for lookup field. However, with the new update, we can do this by using the lookup type property. In the below example, we have created...

The post How to create simple Lookup using PCF Control appeared first on Microsoft Dynamics 365 Blog.

]]>
Introduction:

With the new updates of PowerApps Component Framework, now we can develop the PCF control for lookup field. Earlier, there was no supported way to develop the PCF Control for lookup field. However, with the new update, we can do this by using the lookup type property. In the below example, we have created a PCF control for lookup field and added the same on ‘Primary Contact’ lookup field of Account entity.

How to create simple Lookup using PCF Control

Given below are the steps to achieve the same:

1.     First, we need to add lookup type property in ControlManifest.Input.xml file using the code given below:

<property name=”sampleProperty” display-name-key=”Property_Display_Key” description-key=”Property_Desc_Key” of-type=”Lookup.Simple” usage=”bound” required=”true” />

2.    Next, define the ‘IInput and IOutputs’ for lookup in d.ts file.

// Define IInputs and IOutputs Type. They should match with ControlManifest.

export interface IInputs {

sampleProperty: ComponentFramework.PropertyTypes.LookupProperty;

}

export interface IOutputs {

sampleProperty?: ComponentFramework.LookupValue[];

}

3.     Now, add the action that on click of ‘Find Lookup’ button, it opens the lookupObjects to select the value:

private performLookupObjects(entityType: string, viewId: string, setSelected: (value: ComponentFramework.LookupValue, update?: boolean) => void): void {

// Used cached values from lookup parameter to set options for lookupObjects API

const lookupOptions = {

defaultEntityType: entityType,

defaultViewId: viewId,

allowMultiSelect: false,

entityTypes: [entityType],

viewIds: [viewId]

};

this._context.utils.lookupObjects(lookupOptions).then((success) => {

if (success && success.length > 0) {

// Cache the necessary information for the newly selected entity lookup

const selectedReference = success[0];

const selectedLookupValue: ComponentFramework.LookupValue = {

`              id: selectedReference.id,

name: selectedReference.name,

entityType: selectedReference.entityType

};

// Update the primary or secondary lookup property

setSelected(selectedLookupValue);

// Trigger a control update

this._notifyOutputChanged();

} else {

setSelected({} as ComponentFramework.LookupValue);

}

}, (error) => {

console.log(error);

});

}

4.      Next, on load of Lookup PCF control, set the current value in lookup using UpdateView function.

public updateView(context: ComponentFramework.Context<IInputs>): void

{

// Add code to update control view

//Update the main text field of the control to contain the raw data of the entity selected via lookup

const lookupValue: ComponentFramework.LookupValue = context.parameters.sampleProperty.raw[0];

this._context = context;

let propertyValue:any = lookupValue.name;

this._input.value = propertyValue;

}

5.      Finally, set the changed value of lookup using getOutputs function.

public getOutputs(): IOutputs

{

// Send the updated selected lookup item back to the ComponentFramework, based on the currently selected item

return { sampleProperty: [this._selectedItem] } ;

}

Conclusion:

In this way, with the help of new lookup type property, we can easily create PCF control for the lookup field.

Sharepoint Security Sync

Go to Source and hit them a thumps up

The post How to create simple Lookup using PCF Control appeared first on Microsoft Dynamics 365 Blog.

]]>
4408
Azure Functions, Web API, PowerApps and other tricks for Dynamics 365 CRM – Most Clicked Blogs of the Year! https://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 https://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