Advertisements

StyleCop warnings failing the build in Visual Studio

Recently we got a VS project from a third party and when we try to build the project, we were getting StyleCop warnings as errors and breaking the build.

In below screen if you notice, even if all were ‘StyleCop’ warnings (i.e., Starts with SA….) build got failed with errors.

StyleCop violations as Build Errors

Reason:

  • By default, StyleCop violations only appear as warnings however StyleCop violations can be configured to fail the build by adding below tag in your project file (i.e., .csproj)

<StyleCopTreatErrorsAsWarnings>false</StyleCopTreatErrorsAsWarnings>

  • Coming to our reason of build failure was above line added in my Project file.

Fix:

  • Open the project file (i.e., .csproj) in notepad and remove the <StyleCopTreatErrorsAsWarnings>false</StyleCopTreatErrorsAsWarnings> tag.
  • Save the file
  • Open the Project in Visual studio and Clean & Rebuild.

🙂

 

Advertisements

The specified organization already has an active Website Binding for this site – Dynamics 365 Portals

We have 2 Portal solutions (i.e., Partner Portal and Custom Portal) enabled in our CRM organization and when I tried to configure ‘Custom Portal’ in a Web App, I could not, as the “Adxstudio Portals Website” drop down was disabled and defaulted to ‘Partner Portal’.

Active Website Binding

Reason:

  • ‘Partner Portal’ solution configured first, and it created a record in ‘Website Bindings’.
  • As design, portals defaults to ‘Partner Portal’ solution, if there was an active Website Binding.

Fix:

  • Go to the ‘Website Bindings’ in CRM, by navigating to “Advance Find -> Website Bindings”.

Website Bindings

  • Delete the website binding record

🙂

(Step By Step) Surface Power BI Reports in Dynamics CRM Dashboard

In this article, I am going to provide ‘Step-by-Step’ details on how to:

  • Add ‘Power BI’ subscription to your existing Office 365
  • Connect to your ‘Dynamics CRM Organization’ from BI
  • Render Power BI reports in CRM Dashboard.

What’s Power BI and How is it different from SSRS?

  • Power BI offers basic data wrangling capabilities like Excel’s Power Query.
  • It also lets you create interactive visualizations, reports and dashboards with a few clicks and handle files that are too large for Excel.
  • On the other hand, SSRS is meant for “static” reports. Something that will be shown always as defined and printable.

Steps to add ‘Power BI’ subscription:

  • As a pre-requisite, create your 30 days Dynamics 365 free trail.
  • Login to ‘Portal.office.com’ and open ‘Admin’ dashboard
  • Go to ‘Billing -> Purchase services -> Power BI (free) -> Buy now
    • Note: This requires you to provide credit card details and INR 2 will be charged after successful purchase.

D365 - Power BI

  • After successful purchase, open ‘PowerBI.com’ on another tab of the browser and click ‘Sign In’

D365 - Power BI - Start

  • Click ‘Start’

Connect to Dynamics CRM organization from Power BI:

  • To connect to CRM Organization from ‘Power BI’, you need to install one of the ‘Content Packs’

D365 - Power BI - Content Packs

  • Click on ‘Get’ button from ‘My organization’ section
  • From the available list, choose any of the Dynamics CRM related Apps (I chosen ‘MS Dynamics Online Sales Manager’ for this demo, from the ‘Apps’ tab)

D365 - Power BI - CRM Sales Manager Pack

 

  • Click on ‘Get it now’ and you will be asked to provide CRM credentials.
    • Provide ‘CRM Organization URL’ details and ‘Last Month Of the Fiscal’

D365 - Power BI - Connect To CRM

    • Choose ‘Authentication Method’ as ‘OAuth2’

D365 - Power BI - Connect To CRM - OAuth

  • Post successful login, you would see ‘Importing Data’ message

D365 - Power BI - Connected To CRM - Importing Data

  • Give it few seconds and you would see beautifully rendered reports

D365 - Power BI - Connected To CRM - Dashboards.PNG

Display ‘Power BI’ reports in CRM Dashboard:

In previous versions of CRM, only option to bring ‘Power BI’ reports are by placing an IFrame in Dashboard and set the PowerBI URL. Its easily configurable now.

  • Connect to your Dynamics CRM Organization
  • Go to ‘Settings -> Administration -> System Settings -> Reporting -> ‘Allow Power BI….’=Yes

D365 - Enable embed Power BI

  • Create a new Dashboard
  • Select the placeholder and from the Report add options, click ‘Power BI Tile’

D365 - New Dashboard - Add Power BI Tile

  • Pick one of the available ‘Power BI Reports’

D365 - Add Power BI Tile - Pick Dashboard

  • Save the Dashboard
  • Go to ‘Sales -> Dashboard’ and pick the created ‘Dashboard’

D365 - Open Dashboard in D365

🙂

Dynamics 365 – Error while sending mail on behalf of another user

Recently one of my users complained that they could not send mails on behalf of another users.

Unable to send email on behalf of another user

Issue was because of missing privilege and a setting at actual user, whom the other user trying to send on behalf of

Reason and fix:

To explain this better, I have 2 Users in my system

  • ‘Aruna’ : Having ‘Salesperson’ security role
  • ‘Rajeev’: Having ‘System Administrator’ security role

Issue coming up when ‘Aruna’ trying to send email as ‘Rajeev’ (i.e., Email.From=’Rajeev’)

To allow ‘Aruna’ send email as ‘Rajeev’ below 2 conditions has to be met

  • Provide ‘Send Email as Another User’ privilege to Aruna’s ‘Salesperson’ Security Role

Security Role - Send email as another user

  • Actual User (i.e., Rajeev) should enable ‘Select whether users can send email for you‘ option in his Personal Settings.

Personal Options - Other users can send email

🙂

Dynamics 365 – Native Sitemap Editor

Before Dynamics 365, to edit the Sitemap we had to rely on 3rd party solution like ‘XRM Tool Box’ Site Map Editor, Visual Sitemap Editor.

With advent of Dynamics 365, a native ‘Sitemap Designer’ has been shipped with product and its very simple to use.

To edit the sitemap

  • Open ‘Default Solution -> Client Extensions’
  • You would get all the available Sitemaps listed (If you subscribed to Field Service, Project Service etc, you would see additional sitemaps)
  • For this article, I am going to edit the default ‘Site Map’, so double click on ‘Site Map’
  • It would open ‘Sitemap Designer’
  • To rearrange the ‘Sub Areas’ (i.e., Entity/Component icons) you just need to drag and drop

D365 - Sitemap Editor

Add new Sub Area to Sitemap:

Let me add an Icon (i.e., Sub Area) to open ‘Dashboards’ with default as the ‘Customer Service Operation Dashboard’ under ‘Customers’ group

  • Select the ‘Customers’ group and from the ‘Components’ tab, drag and drop ‘Sub Area’
  • Set the ‘Type’ as ‘Dashboard’, ‘Default Dashboard’ as ‘Customer Service Operation Dashboard’ and Title

Sitemap Editor - Add Dashboard

  • Save and Publish.

Hide/Show Sub Area using ‘Privileges’:

Sometimes we get a requirement to show/hide Sitemap icons based on User’s Security Role.

  • Select the Sub Area
  • Expand the ‘Advanced -> Privileges -> Entity’
  • Choose the entity (i.e., I set the Entity as ‘Site map permission’ which is a custom entity)

Sitemap Editor - Sub Area Privileges

  • Only users having ‘Security Role’ with Read privilege on the ‘Site map permission’ entity can see the icon

We can also set localization labels, Clients (i.e., Web or Outlook or Mobile) where the Sub Area should be available to.

🙂

Categories: CRM, Dynamics 365 Tags:

ADX Web Site Compilation Error – The type ‘System.Object’ is defined in an assembly that is not referenced.

Recently while compiling my ADX web site, I was getting below compilation exception from all my .ascx (Views) files.

Compiler Error Message: CS0012: The type ‘System.Object’ is defined in an assembly that is not referenced. You must add a reference to assembly ‘System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’

Issue was bit strange as I already had “System.Runtime’ dll referred in the website

Fix:

  • Open the Web.config file and add below tag inside the <compilation> tag

<assemblies>

<add assembly=”System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a” />

</assemblies>

  • Your <compilation> tag should look as below

<compilation debug=”true” targetFramework=”4.5″>

<assemblies>

<add assembly=”System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a” />

</assemblies>

</compilation>

Note:

  • If your <compilation> tag already had <add assembly=”…”> tags, add only <add assembly=”System.Runtime…> tag to the existing tags.

🙂

Categories: ADX, CRM, Uncategorized Tags: ,

Wait Condition with ‘Parallel Wait Branch’

February 19, 2017 Leave a comment

In my previous article , I explained using ‘Wait Condition’ with simple scenario. In this article, lets see using ‘Parallel Wait Branch’ with Wait Conditions.

Lets take a simple scenario

  • Up on Opportunity creation, if an Account associated with Opportunity ‘Send Mail’ to Opportunity owner OR close the Opportunity as Lost, if no association happen with in 7 days.

To achieve the above scenario, we have to go with ‘Parallel Wait Branch’ with 2 Wait Conditions

Configuring Work Flow :

  • Create a workflow on Opportunity which triggers when ‘Record is created’
  • Add a “Wait Condition” to check, if Account got assigned to Opportunity (I.e., Opportunity. Account ‘Contains Data’)
  • Create an Email Activity, if ‘Wait Condition’ met
  • Select that wait condition and then choose the ‘Parallel Wait Branch’ option from the Add Step menu
  • Add another “Wait Condition” with ‘Time Out’ option for 7 days

Wait Condition - Time Out.PNG

  • If condition met, add ‘Change Status’ step to close the Opportunity as Lost and Canceled.
  • Workflow looks as below

parallel-wait-condition

  • Save and Activate Workflow

Points to consider using Wait condition:

  • While using a Timeout, and if the date changes, the timeout will automatically adjust and wait until the new date.
  • Even if that date is changed to be in the past, the timeout will readjust to the new date, and will fire instantly.
  • If the server goes down, or the async service stops, any workflows that are ‘waiting’ will be resumed when the server/async service comes back up.
  • If the server/async is down at the exact time as when a wait condition is waiting until, the workflow will continue again when the server/async comes back up, and it will process the wait conditions that were due during the down time.

🙂

Categories: CRM Tags: ,