Archive

Author Archive

Dataverse | Modernize business units (Public Preview)

November 12, 2021 Leave a comment

With this preview feature,

  • Users are no longer restricted to accessing/managing data in their own business unit.
  • Users can now access and own records across business units.
  • Security roles from different business units can be assigned to the users regardless of the business unit the users belong to.
  • This feature enables the Owning Business Unit column of the record so that it can be set/updated by the users.
  • The Owning Business Unit column determines the business unit that owns the record.
  • Business units’ data access can now support “Matrix data access” structure.

Modernize Business Unit – Feature Goals:

Modernize Business Unit – Design Elements:

New Organization Settings while Changing the User’s Business Units:

Refer following videos to learn more about this preview feature:

🙂

Categories: CRM

Dynamics CRM | Microsoft Power Apps | Legacy OData v2.0 Service removal date

November 12, 2021 Leave a comment

OData v2.0 endpoint:

  • The Organization Data Service (Also known as the OData endpoint or the REST endpoint when it was released, the Organization Data Service offers limited capabilities to only create, retrieve, update, or delete table data) is an OData v2.0 endpoint introduced with Dynamics CRM 2011.
  • The Organization Data Service was deprecated with Dynamics 365 Customer Engagement v8.0 in favor of the Web API, an OData v4.0 service.
  • Organization Data Service is planned to remove on November 11, 2022. Any code that uses the Organization Data Service should be migrated to use the Web API before that time.
  • Its recommended to Use the Microsoft Dataverse Web API.

Action Required:

  1. Use the Solution Checker to detect any JavaScript web resource code. The rule web-avoid-crm2011-service-odata should detect use in client-side code.
  2. Check any other code, including PowerShell scripts, that send requests to this endpoint: /xrmservices/2011/organizationdata.svc.
  3. Check any Power BI reports or Excel Data sources that may be using this endpoint.

Refer this link for more details.

🙂

Categories: CRM Tags: ,

Power Apps portals | Query data using portals Web API (Public preview)

November 12, 2021 Leave a comment

Portals Web API:

  • The Portals Web API enables building a richer user experience inside Power Apps portals pages.
  • We can use the Web API to perform create, update, and delete operations across all Dataverse tables from the portal pages.
  • For example, you can create a new account, update a contact, or change the table permissions for a product by using the portals Web API instead of the Portal Management app.

Query data using portals Web API:

Web API operations in portals so far were limited to creating, updating, deleting, associating and disassociating tables. With this public preview, Portals will have the capability to retrieve data using GET requests through portals Web API.

Preview capabilities:

The feature provides the following capabilities during this public preview:

  • Query records
  • Apply system query options
  • Request specific properties
  • Filter results
  • Order results
  • Aggregate and grouping results
  • Retrieve a count of rows
  • Column comparison
  • Retrieve related table records with a query

Refer the Docs link for documentation.

🙂

Categories: Portals Tags: ,

Power Apps | Canvas App | StartScreen property

November 8, 2021 Leave a comment

In the latest Canvas App updates, following key announcement has been made on App’s ‘OnStart’ property.

  • Using the Navigate function in the OnStart property has been retired. (Refer below screen as App throws warning if you have Navigate function on OnStart)
  • Existing apps will continue to work. For a limited time, you can still enable it in the app settings (available under Retired).
  • However, using Navigate in this manner can lead to app load delays.
  • Use the new StartScreen property instead, to calculate the first screen displayed.

StartScreen:

  • Following is an example, to Navigate to ‘Screen2’ based on a Condition.
    • If(User().Email=”RajeevPentyala@expnov21.onmicrosoft.com”,Screen2,Screen1)
    • If you notice, no ‘Navigate’ function is used in above example.
  • If StartScreen returns an error, the first screen in the Studio Tree view will be shown as if StartScreen hadn’t been set.
  • Global variables and collections, including those created in OnStart, are not available in StartScreen.

Refer Docs for more info.

🙂

Azure DevOps (ADO) | Pipelines | Publish and Access Build Artifacts from Staging Directory

September 23, 2021 Leave a comment

In this article, Lets see how to Publish and Access Build Artifacts using ADO Pipeline.

What are Build Artifacts:

  • Build artifacts are the files generated by your build.
  • In ADO Pipelines, We can use Build.ArtifactStagingDirectory Predefined Variable, on the agent where any artifacts are copied to.

Below are the steps to Publish and Download the Build Artefacts in a ADO Pipeline.

Steps to Publish the Build Artefacts:

  • Lets see how to Publish a file to Build Artifacts folder, using following ‘Power Platform Export Solution’ Task.
  • In the below Task, I am exporting a Solution from CRM Instance and publishing as $(Build.ArtifactStagingDirectory)\$(SolutionName)_managed.zip by using the ‘Solution Output File’ property.
  • In the above the ‘Solution Output File’ property, $(SolutionName) is my custom defined ‘Pipeline Variable’ contains Solution name.
    • ‘ALM_Base’ is my Dynamics Instance Solution name.
  • And $(Build.ArtifactStagingDirectory) is Predefined Variable.
  • Once the pipeline runs successfully, you can download the published artefacts (i.e., Solution folder) as follows.

Steps to Download the Build Artefacts:

  • Go to Pipeline Runs and select the last run.
  • Click on the below highlighted link.
  • Select the folder you want to download.
  • We also have an option to commit these files to Git using ‘Command Line Script’ task.

🙂

Categories: DevOps Tags: , ,

Cloud flow | Dataverse Connector | Useful formulas and Syntaxes

September 22, 2021 Leave a comment

In this article, I am going to collate useful Syntaxes and Formulas frequently used in Cloud Flows with Dataverse connector.

Format DateTime:

When working with date and time values in flow, they may look like:

  • 2019-12-06T22:47:23.0798367Z or 2009-06-15T13:45:30Z

You may format these values to look like:

  • 6/15/2009 1:45 PM or Monday, June 15, 2009

This is done by using Date and Time Format Strings passed to the formatDateTime() function.

Example: Following is the formula to convert the ‘CreatedOn’ to ‘MM/dd/yyyy’ format.

  • ‘createdon’ has been retrieved from Flow’s ‘triggerBody()’.

Get Optionset/Choice Label:

  • By default, ‘Optionset/Choice’ field gives the Value not Label.
    • As an example, ‘Gender’ field (i.e., ‘pis_gender’) gives the ‘100000001’ not ‘Male’.
  • To get the Label, read by _{field-schema-name}_label.

Set the Lookup value:

  • To set Lookup field, in the Dataverse’s ‘Add a new row’ and ‘Update a row’ Actions, use following syntax.
    • Entity/TableName(UniqueId)
  • In below example, ‘pis_customers’ is my table name and reading ‘Customer ID’ from TriggerOutputs body.
    • pis_customers(@{triggerOutputs()?[‘body/pis_customerid’]})

Read the Dataverse ‘Trigger Name’:

  • If you have a Dataverse trigger with ‘Change type’ set as ‘Added or Modified or Deleted’.
  • Following is the statement to read the ‘Message’ (i.e., Create or Update or Delete).
    • @{triggerBody()?[‘sdkmessage’]}

Get Length of the Rows:

  • To get the Count of the records, following is the syntax:
    • @{length(outputs(‘GetAssociatedCars’)?[‘body/value’])}

🙂

Categories: Power Automate Tags: ,

Azure DevOps (ADO) | Pipeline failure | You need the Git ‘GenericContribute’ permission

September 17, 2021 Leave a comment

While pushing the code to Repo using ‘Command Line Script’ task in ADO pipeline, got the following permission issue.

  • Following is the script used in ‘Command Line Script’ task to push the code to main branch.
echo commit all changes
git config user.email "rajeevpentyala@live.com"
git config user.name "Rajeev Pentyala"
git checkout main
git add --all
git commit -m "solution init"

echo push code to new repo
git  -c http.extraheader="AUTHORIZATION: bearer $(System.AccessToken)" push origin main

Reason for the issue:

  • Account under which the ADO pipeline running, does not have required permissions to Push the code.

Fix:

  • Go to Settings -> Repositories
  • Under ‘Security’ tab, select the ‘ALM Build Service(User_Name)‘ and grant highlighted privileges.

🙂

Dataverse | New Text Formats | json, richtext

September 16, 2021 Leave a comment

Text in Dataverse is a data type that can store a max of 4000 characters. Text has multiple formats that instruct the UI to treat it differently.

As an example, Email is a text format tells the client to treat the contents of the field as an email. It can display the data as a link that, when clicked, launches your default email client and inserts the address in the To: field.

There are 2 new formats, json and richtext have been introduced.

Json 

  • json format will store text strings in a json format.
  • This format will not perform any validations on the correctness of the json. It simply allows you to store, view, and retrieve the content with json markup.
  • This is currently limited for use on non-SQL tables (like Data Lake).

Richtext 

  • richtext format will allow the use of markup tags to format your text when viewed in a compatible control.
  • By setting this value you can enable richtext for any other text or multiline text column.
  • A control is coming soon in the Canvas and Model Driven space that will be used whenever a column indicates it is richtext.

Please refer this article for more details.

🙂

Categories: CRM

Azure DevOps (ADO) | Pipeline failure | Failed to connect to Dataverse

September 16, 2021 Leave a comment

One of my ADO pipelines ‘Power Platform Publish Customizations’ task failed with “Failed to connect to Dataverse” error.

Reason:

  • ‘Power Platform Publish Customizations’ task’s ‘Authentication type’ was selected as ‘Username/password’ which does not have MFA support.
  • MFA (Multi Factor Authentication) was enabled on the Environment, which I was trying to connect from the Pipeline.
  • Since the ‘Power Platform Publish Customizations’ task’s ‘Authentication type’ was selected as ‘Username/password’ which does not support MFA, pipeline could not connect to the Dataverse environment.

Fix:

  • Create an ‘Application User’ by completing App Registration in Azure Active Directory and grant a Security Role.
  • In the ADO pipeline’s ‘Power Platform Publish Customizations’ task, select ‘Authentication type’ as ‘Service Principal’.
  • Make sure the ‘Service Connection’ configured properly with Azure App Registration details (i.e., Tenant ID, Application ID and Client Secret).
    • My connection name is ‘SP_ExpAugust21’ and details are as follows.
  • Save and run the pipeline and it should work now.

🙂

Azure DevOps (ADO) | Pipeline failure | Could not get the latest source version

September 15, 2021 1 comment

I’ve created a new ADO project and configured a Pipeline to export Power Apps solution. While running the Pipeline it failed in immediately with following exception.

The pipeline is not valid. Could not get the latest source version for repository…

Reason:

  • Under the ‘Get sources’ step of the Pipeline, ‘Default branch for manual and scheduled builds’ was auto selected as master.
  • However my existing Branch Name was main.
What is the difference between master and main branches:
  • In ADO, default ‘Branch Name’ used to be master until October 2020. Post that default ‘Branch Name’ changed to main.
  • This Branch name change was not taken affect in Pipelines. New Pipeline defaults the Branch Name to master which is invalid. It has to be main.
  • Refer this ADF product blog for more details.

Fix:

  • In the ‘Get sources’ step of the pipeline, change the Default Branch from master to main.
  • Save and Rerun the pipeline.

🙂

Categories: Azure, CRM Tags: , , ,