RSS

Failed to create the Common Data Service database in this environment with status code CRMLicenseRequired


I encountered another parity problem between GCCHigh and commercial M365 today.  This time it's in PowerAutomate when using Approvals.

My workflow contains a simple Approval as seen below.


PowerAutomate allows me to save the flow just fine.  So far so good.  Now we attempt to test the flow and the following error is generated:


When we drill down into the flow status, we see the following:



To be clear, there isn't much more in here than the 409 status code.
In order to validate the problem, we did the following:
  1. Provisioned a commercial tenant with NO database in the Common Database Service (CDS).
  2. Created a PowerAutomate flow with an Approval like in GCCHigh.
  3. Triggered the flow to test it.
It took a little while, but the approval request came through.  The delay was due to a database being spun up in CDS, even though the tenant did NOT have a license for CDS.

Conclusion: There is a parity mismatch between commercial and GCCHigh when attempting to use Approvals in PowerAutomate.  In GCCHigh, a CDS license is required.

Enjoy
C


How do I - Open support cases for GCCHigh?


 The first thing newcomers to GCCHigh want to know is how to open support cases.  There are a couple of things to note as laid out in the Microsoft Docs on the subject.

  • You must be an administrator for the area for which you intend to open a support case.  That means if your case is about SharePoint Online, you must be configured in your tenant as a SharePoint Administrator.  The Microsoft Docs provide more detail on managing admins etc.
  • What the docs do not (presently) provide is actual links and directions to a starting point.  I have submitted a pull request to update the docs which will address this shortfall.  In the mean time I'll provide the guidance here:
    • Navigate your browser to https://portal.office365.us/adminportal.
    • Using the New Admin Center, navigate to Show all > Support > New Service Request.
    • Use the Subject to provide a brief description of the problem.
Hope that helps.
C

It's a whole new world!


 If you've been following my blog for a while, you know that I live in the SharePoint world and blog mostly about SharePoint related topics.  I haven't had time to blog lately in part because I've been involved in a major migration effort to GCCHigh which is Microsoft's new ultra secure 365 world for DoD clients.

As we all know, security and ease of collaboration are polar opposites of the same sliding scale.  The more secure a system is, the harder collaboration in that system is going to be.  That means that there isn't parity between commercial 365 features and GCCHigh 365 features.  This can make for some frustrating times especially because ALL documentation from docs.microsoft.com is usually related to commercial 365.

Going forward, I will attempt to provide some tips, tricks and tutorials for working in the GCCHigh environment on a variety of topics like:

  • SharePoint Online in GCCHigh.
  • PowerApps in GCCHigh.
  • PowerAutomate in GCCHigh.
  • Teams in GCCHigh.
  • Azure Information Protection in GCCHigh.
  • and many more...
So stay tuned as we pivot this blog from traditional commercial SharePoint content to more specialized cloud content.

Later
C

Operator '&&' cannot be applied to operands of type 'bool' and 'bool?'


How do I fix the compiler error "Operator '&&' cannot be applied to operands of type 'bool' and 'bool?'"
I got this question from a mentee the other day.  They were trying to do the following:

foreach (var user in dbContext.Users.Where(
         u => roles.Contains(targetRole) && 
         u.Valid ?? false == true))
{
   <code...>
}

Unfortunately, they kept getting the compiler error above.  The Valid field in the database is configured as a bit value that is nullable and they want it to return false if it's null.
The fix is straight forward by simply using parentheses thus:

foreach (var user in dbContext.Users.Where(
         u => roles.Contains(targetRole) && 
         (u.Valid ?? false)))
{
   <code...>
}

The double question mark (??) tells C# to return the following value if the preceding is null.  If it isn't null, it will simply process the value as either true or false.

Later
C

0 comments

Posted in ,

How do I - Convert a SharePoint List Private View to a Public View?


Have you ever started creating a list view in SharePoint and because you're experimenting, you chose to make it a "Private" view?  Then before long the view evolves to be extremely useful in your work, but you cannot make it public for others to see and use?
Well fear no more.  This guide will walk you through Step-by-Step on how to convert your existing private list views into new public views that everyone can use.

1.  Begin by navigating to the target list.  In my example, I have a list called "Demo Convert Views" in which I created a personal view called "Cs Private View" which has several customizations for demo purposes.













2.  Now double click the ellipses (...) and from the dropdown menu, click the "Create View" option.











3.  The View Type page will allow you to define your view in different formats, but we're more interested in the "Start from an existing view" option at the bottom.  Here all current views accessible to you, INCLUDING your Personal Views, are listed.  You can thus clone a view from any of those.  In our case, we're going to click on the "Cs Private View" to use it as the foundation for the new view.

























4.  The problem quickly becomes apparent when we see that our "View Audience" selection is locked into "Create a Personal View" because the view we used as a base was a personal view.  Herein lies the problem.  Time to put on your white hat and get hacking.











5.  We begin by activating the Developer Mode (in IE) or the Element Inspector (in Chrome).
6.  To activate IE Developer Mode, press the F12 key.  You should now have a panel open up below displaying the underlying HTML for the page.  Ensure that you're on the "DOM Explorer" tab.


























7.  Now it is time to expand the DOM in search of that "Create a Public View" radio button.
8.  Expand the "<form" section.
9.  Scroll to the bottom of the "<form>" tag and locate the "<div class="ms-core-overlay"" tag and expand it.







10.  Inside that tag, locate the "<div id="contentRow">" tag and expand it.
11.  Inside that tag, locate the "<div id="contentBox"" tag and expand it.
12.  Inside that tag, locate the "<div id="DeltaPlaceHolderMain">" tag and expand it.
13.  Inside that tag, locate the "<table width="100%" class="ms-v4propertysheetspacing"" tag and expand it.
14.  Inside that tag, locate the "<tbody>" tag and expand it.
15.  Inside that tag, locate the "<tr>" tag and expand it.
16.  Inside that tag, locate the "<td>" tag and expand it.





















17.  Scroll down past the series of "<input>" tags to the "<table" tag below them and expand that.
18.  Inside that tag, locate the "<tbody>" tag and expand it.
19.  There will be several "<tr>" tags.  Scroll down and locate the "<!--Audience-->" marker and expand the 4th "<tr>" tag below it.
20.  Inside that tag, locate the "<td class="ms-authoringcontrols" id="onetidViewAudience">" tag and expand it.
21.  Inside that tag, locate the "<table>" tag and expand it.
22.  Inside that tag, locate the "<tbody>" tag and expand it.



























23.  Inside that tag, locate the 3rd "<tr>" tag and expand it.
24.  Inside that tag, locate the 2nd "<td>" tag and expand it.
25.  You should now see an "<input>" tag.
















26.  You will notice the tag has a property called "disabled=""".  We want to delete this property, but that's not as straight forward as it sounds.
27.  Double click on the word "disabled".
28.  The browser would now give you the ability to change the name of the tag.



29.  Delete the tag by pressing the "Delete" key on your keyboard while it's selected.
30.  Now press "Enter".
31.  You will notice the "<input>" tag now looks a little weird, but that's OK.




32.  Next you want to right click on the "<input>" tag line.
33.  From the dropdown, click "Delete element".
34.  The entire line should now disappear.





35.  Now press "Ctrl+Z" on your keyboard to bring the element line back.
36.  You will notice that the weird ="" text is no longer there.







37.  You can now close the developer panel.
38.  You will notice that you can now change the radio button for the "View Audience" from "Create a Personal View" to "Create a Public View".
39.  Name your view and click the "OK" button to save the new view.





















40.  Your Personal view has now been cloned into an exact replica Public view!  😎













Happy coding.
C

How do I - Retrieve the LoaderExceptions property?


If you've spent any time in the SharePoint world lately, you've undoubtedly been exposed to the PnP project and it's super powerful extensions for SharePoint.  While PnP is not officially supported by Microsoft, it is Community Supported by the SharePoint Product Team.  PnP can be very fussy at times with strict dependencies on very specific DLL versions.  The most frustrating thing is when you are presented with this error:

Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

I never understood why the exception code that is throwing the error doesn't just provide the LoaderExceptions info in the error message, but such is life.  When we get this error, we can deal with it in the following manner:

Happy coding
C

How do I - Format a numerical value in a calculated SharePoint field?


If we remember our SharePoint Power Tip on calculated fields, then we'd know we can use Excel formulas to make this work the way we want.  In my case, I was trying to display the age of a ticket in days, on it's InfoPath customized form.  Sounds easy enough right?

NOW() - Created

That should do it, right?
Unfortunately, that displayed a value with fractions.  Not quite what we want.  OK, so let's just round the thing then, and while we're at it, round it to 0 decimals thus:

ROUND(NOW() - Created, 0)

Alas, that did not do it either.  Hopping into Excel, I used text formatting to achieve the goal.  The final calculation was:

=TEXT(ROUND(NOW() - Created, 0), "0")

Happy coding.
C

SharePoint Power Tip - Calculated field formulas


When we are dealing with Calculated fields in SharePoint lists, it's good to remember that lists are basically Excel sheets.  To whit, we can use almost all the same formulas in a calculated field as we do in Excel.  I often go into Excel to work out my formula (since the interactive error messages are better) and then just copy the formula from Excel to my field definition in SharePoint.
If it works in Excel, it probably works in SharePoint! 😉

Happy coding.
C

Which NuGet package contains System.Web.Http?


NuGet is a wonderful thing, but when the package name does NOT reflect the DLL name you're looking for, it can become quite a harrowing experience!  Such has been the case with the System.Web.Http.  Note that I said System.Web.Http and NOT System.Net.Http! 😉
This little gem finds itself embedded deep inside the Microsoft.AspNet.WebApi.Core package.  I can't believe we weren't able to infer the package name from the DLL.  😇

Happy coding.
C

How do I - Fix the "You must add a reference to assembly netstandard" error?


When using NuGet, we can easily run into assembly reference issues.  A notorious error message is:

CS0012: The type ‘System.Object’ is defined in an assembly that is not referenced. You must add a reference to assembly ‘netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51’.

This can be very confusing especially if your app is NOT using the .NET Standard library at all.  Luckily the fix is easy enough.  Simply crack open your app.config or web.config file and added the following:

Happy coding.
C