Menu Close

Tag: #uk365guy

XRMTOOLBOX SQL 4 CDS to get logged in users, Users with security roles in Dynamics 365

Hello Everyone,

Today i am going to show the XRMTOOLBOX tool SQL 4 CDS which allows you to use standard SQL syntax to query and manipulate your data and metadata in Dataverse and Dynamics 365.

Let’s gets started.

Here is the link for sql 4 cds

SQL 4 CDS tool Capabilities:

First of all many thanks to creator of this tool Mark Carrington.

As per the release notes:

Add support for XML data type and FOR XML clause.

Add support for Elastic tables

Add support for Stuff function

Add option to bypass plugins for SELECT statements

Improved error reporting for duplicated table/alias names

Improved error reporting for plugin errors

Improved efficiency of joins that can’t be translated to FetchXML

Improved error handling during bulk DML Operations

Fixed querying audit table

Fixed Collation label for metadata and virtual columns

Fixed hash joins on different collations

Fixed filtering on outer-joined solution table

Fixed multi threading error with partitioned aggregations

Fixed copying results with headers but no data rows.

I have used this tool for find out the users with role, below is the script:

SELECT identityid,
systemuser.internalemailaddress,
systemuser.fullname,
systemuser.title,
systemuser.systemuserid,
systemuser.isdisabled,
systemuser.islicensed,
account.name,
businessunit.name,
role.roleid,
businessunit.name,
role.name
FROM systemuserroles
INNER JOIN
systemuser AS systemuser
ON systemuser.systemuserid = systemuserroles.systemuserid
AND (systemuser.isdisabled = 0
AND systemuser.accessmode = 0)
LEFT OUTER JOIN
account AS account
ON account.accountid = systemuser.gmr_opcoid
INNER JOIN
businessunit AS businessunit
ON businessunit.businessunitid = systemuser.businessunitid
INNER JOIN
role AS role
ON role.roleid = systemuserroles.roleid
AND (role.name = ‘ Admin All’
OR role.name = ‘ Admin Owned’
OR role.name = ‘ Admin Project’
OR role.name = ‘ Analytics’
OR role.name = ‘ Basic ‘
OR role.name = ‘ Basic Client’
OR role.name = ‘ BI Integration’
OR role.name = ‘ Embedded Power BI Report’
OR role.name = ‘ Embedded Reports OC’
OR role.name = ‘ Financial Controller’
OR role.name = ‘ Import/Export’
OR role.name = ‘Integration’
OR role.name = ‘ Admin’
OR role.name = ‘ Manager’
OR role.name = ‘ Integration’
OR role.name = ‘ Service Account’);

Also for last logged in users:

SELECT a.actionname,
a.objectid AS systemuserid,
s.fullname,
s.domainname,
(SELECT TOP 1 c.createdon
FROM audit AS c
INNER JOIN
systemuser AS systemuser
ON systemuser.systemuserid = c.objectid
AND c.action = 64
AND c.createdon >= dateadd(month, -6, GETDATE())
WHERE c.objectid = a.objectid
ORDER BY c.createdon DESC) AS lastloginutc
FROM audit AS a
JOIN
systemuser AS s
ON a.objectid = s.systemuserid
AND a.action = 64
AND a.createdon >= dateadd(month, -6, GETDATE())
RIGHT OUTER JOIN
systemuserroles AS systemuserroles
ON systemuserroles.systemuserid = s.systemuserid
RIGHT OUTER JOIN
role AS role
ON role.roleid = systemuserroles.roleid
AND role.name LIKE ‘GMR SEC%’
GROUP BY a.actionname, a.objectid, s.fullname, s.domainname, s.internalemailaddress
ORDER BY lastloginutc DESC;

That’s it for today

I hope this helps.
Malla Reddy(@UK365GUY)
#365BlogPostsin365Days

Share this:

Browser level settings for auto save on Canvas App Power Apps

Hello Everyone,

Today i am going to show how to enable browser level settings for Auto Save of the changes made on Canvas App.

Let’s get’s started.

Suppose you want to save the changes you have made on your Canvas App automatically, you can do that from canvas app settings.

How do you do that ?

Open Canvas App and edit.

Once the Canvas App is opened then open settings.

Auto Save: Save changes every 2 minutes. This is a browser level settings = ON.

That’s it for today.

I hope this helps.
Malla Reddy(@UK365GUY)
#365BlogPostsin365Days

Share this:

{Resolved} Datetime is less than minumum value supported by CrmDateTime

Hello Everyone,

Today I am going to show how to resolve error message Datetime is less than minumum value supported by CrmDateTime.

Let’s gets started.

Suppose you are working on the Opportunity and trying to save the record, then the following error message will be displayed.

ErrorDetails (30) (1)

DateTime is less than minumum value supported by CrmDateTime. Actual value: 01/01/0001 00:00:00, Minimum value supported: 01/01/1753 00:00:00

The error message is complaining about the date field which is having the decimal values in it.

Solution:

Replace the value with the date and save the record.

Then the error message will go away.

That’s it for today.

I hope this helps
Malla Reddy(@UK365GUY)
#365BlogPostsin365Days

Share this:

{How to} enable access to microsoft dataverse actions on Power Apps Maker Studio

Hello Everyone,

Today i am going to show to enable Microsoft Dataverse actions in Power Apps Studio. This is related to upcoming features on Power Apps.

Let’s get’s started.

If you are trying to turning on upcoming features on power apps studio ‘Smart email validation’ then the following error will be displayed.

Then all you need to do is to enable access to Microsoft Dataverse Actions on Power Apps Studio.

Go to the Preview tab as this feature in in PREVIEW at the moment and turn on the Microsoft Dataverse Actions.

What is the purpose of this feature is to use Power Fx expressions to access to Microsoft Dataverse Actions.

Thats it for today.

I hope this helps
Malla Reddy(@UK365GUY)
#365BlogPostsin365Days

Share this:

{Did you know} you can have a job in 3 months with Power Up Program

Hello Everyone,

This blog posts for career switchers and freshers starting job now, can join the Power Up Program run by Microsoft.

Lets gets started.

Are you looking for career change or fresher searching for job now then continue reading this blog post.

Microsoft runs Power Up Program to train you to become a Microsoft Power Platform Consultant in all aspects starting from what to learn and assignments and interview preparations.

So why dont you take a look at Microsoft Power Up Program and join and empower yourself and community around you.

Here is the link to Microsoft Power Up Program

You will get trained on Power Apps, Power Automate, Power BI, Power Virtual Agent, and then you can learn how to analyze data,build solutions, automate processes and create intelligent chatbots.

I hope this blog post can help someone out there in the world and if this blog post is useful and you can also help someone in whatever way you can..

That’s it for today.

I hope this helps
Malla Reddy(@UK365GUY)
#365BlogPostsin365Days

Share this: