Archive

Author Archive

Dynamics workflow – Unable to set Email ‘Regarding’ field

December 3, 2019 Leave a comment

Other day, while working on a straight forward ‘Send Email’ using a ‘Workflow’, I could not set the ‘Regarding’ field on ‘Email’ form.

Scenario:

  • Create a new custom entity ‘Transaction’.
  • Send an Email when a new ‘Transaction’ record gets created.

So, I created a new workflow on ‘Transaction’ entity and added ‘Send Email’ step.

SendMail_0.PNG

On the ‘Email’ configuration screen, all I could see was a blank ‘Look for:’ field.

SendMail_1

Reason & Fix:

  • ‘Activities’ option was not enabled on the ‘Transaction’ entity.

SendMail_2

  • Enable ‘Activities’ and publish.
  • Go to the workflow and I got the Entity Reference in ‘Look for:’ field.

SendMail_3

Its one of those days where we struggle for trivial problems 🙂

 

Categories: CRM Tags: ,

BotDetect Captcha – 404 error – images are not loading

November 29, 2019 Leave a comment

Recently we leveraged BotDetect libraries in our Aspx MVC application to generate CAPTCHA.

After configured all the steps, CAPTCHA images were not showing up on web page.

CAPTCHA_1

Using browsers F12 option, we could notice there were 404 (i.e., Not Found) error codes.

CAPTCHA_2

Fix:

  • Issue in our case was all the BotDetect requests getting routed, which should not be.
  • Add below statement in your project’s ‘RouteConfig.cs’ file, which prevents BotDetect requests routing.

// BotDetect requests must not be routed
routes.IgnoreRoute(“{*botdetect}”,  new { botdetect = @”(.*)BotDetectCaptcha\.ashx” });

CAPTCHA_3

  • Rebuild the project and run and you should get the CAPTCHA code.

CAPTCHA_4

Refer article for the steps to configure CAPTCHA in MVC application.

🙂

Categories: ADX Tags: , ,

ADX Portal – Prevent unauthorized access of custom pages

November 26, 2019 Leave a comment

For one of our requirements, we built a custom .aspx page and placed under ‘Areas’ folder of OOB ADX website’s ‘MasterPortal’ project.

ADX_Prevent_UnAuthAccess

Issue:

  • The .aspx page was accessible without signing in to the portal by using the following URL convention
    • https://base_portal_url/Areas/folderName/Pages/filename.aspx

Fix:

  • On Page_Load of the aspx page, check whether the request is from authenticated user or not.
  • If unauthenticated request, set 401 error code (i.e., Unauthorized error) to the Response object and redirect to portals ‘SignIn’ page.
  • Below is the code snippet need to be placed in Aspx page’s ‘Page_Load’ event, which redirects unauthenticated requests to Portal’s ‘SignIn’ page.

protected void Page_Load(object sender, EventArgs e)
{
if (!Request.IsAuthenticated)
{
Response.StatusCode = 401;
Response.End();
}
}

🙂

Categories: ADX Tags: , ,

ADX/Dynamics portal – Setting up password policies

November 21, 2019 Leave a comment

If you want to imply password policy (i.e., Certain length, must have a digit, etc…) during the portal registrations, following entries need to be added to ‘Site Settings’ entity.

ADX_PasswordPolicy_1.PNG

Name Value
Authentication/UserManager/PasswordValidator/AlphanumericUserNames TRUE
Authentication/UserManager/PasswordValidator/RequireDigit TRUE
Authentication/UserManager/PasswordValidator/RequiredLength 9
Authentication/UserManager/PasswordValidator/RequireLowercase TRUE
Authentication/UserManager/PasswordValidator/RequireNonLetterOrDigit TRUE
Authentication/UserManager/PasswordValidator/RequireUppercase TRUE

If the password does not meet any of the configured setting values, you gonna get OOB validation error as follows:

ADX_PasswordPolicy

For more ‘Authentication’ related settings, refer the article

Refer this article for portals client scripting.

🙂

Canvas App using Dynamics On-premise data

November 19, 2019 Leave a comment

Last week there was a question on my blog to check for the options to build a Canvas App which consumes CRM on-premise data.

To answer this, Power Apps has connectors (CDS and Dynamics 365) to communicate with Dynamics online but there is no built-in Dynamics on-premise connector.

However there are options to connect Canvas app with Dynamics on-premise, which are listed below.

Using ‘Gateway’ to connect to SQL on-premise DB:

  • This option is about connecting to Dynamics SQL DB using on-premises data gateway.
  • The on-premises data gateway acts as a bridge to provide quick and secure data transfer between on-premises data PowerApps.
  • Refer my blog on steps to use gateway and build a Canvas App.
  • Limitation:
    • With ‘Gateway’ option we can only view Dynamics data in PowerApps.
    • There is no way to add or modify Dynamics data using the current PowerApps gateways.

Using ‘KingswaySoft’ connector:

  • KingswaySoft SSIS Integration Toolkit for Dynamics 365 includes components to integrate with CDS.
  • Using the ‘CDS Connection Manager’ we can easily connect and bring data into and out of CDS.
  • Once data is in CDS, we will be able to leverage this data with PowerApps.
  • Any updated data being generated with PowerApps will be reflected in CDS which can then be retrieved and synced with your Dynamics on-premise instance.

Integrate on-premise environment with the CDS:

  • Its the same approach, ‘KingswaySoft’ connector leverages but this option is manual integration.
  • Integrate the on premise environment with the CDS–in effect setting up a hybrid environment, where you have a copy of your configuration in the cloud as well as your on premise CRM, and create a bi-directional integration to synchronize data changes between the two environments.
  • Limitation:
    • There will be potential delay for record changes to synchronize between the On-premise and CDS.

Refer the article for more details.

🙂

 

Dynamics/ADX Portal – Handling ‘Page flickering’ due to long running scripts

November 18, 2019 Leave a comment

In our portal, we have a couple of entity forms with JScript registered on page load event, which hide/show or enable/disable controls based on business rules.

Due to the script execution delays, end users were experiencing page flickering on load.

What is flickering:

  • If you have a script with hide/show control logic, on page load event, end user would see the unintended controls momentarily before your script kicks in.
  • Assume that you have an ‘Option Set’ field on Entity form, which you hide based on logged in user’s web role using jscript. What if there is a lag in your script execution, end user would see the ‘Option Set’ for a split second, before it gets hidden.

How to handle flickering in Portals:

  • We have added below statements in both the ‘Custom JavaScript’ and ‘Custom CSS’ to the portal Web Page’s ‘Advanced’ tab.

Portal_Loading

  • The above technique works on a simple rule;
    • Hide all the controls before the page loads (i.e., using CSS).
    • Let the script with your business rules executes.
    • Show the controls only when the Page load completes (i.e., using $(window).load event).
  • Lets dissect the statements added in ‘Custom JavaScript’ and ‘Custom CSS’.
    • #content_form is the OOB portal ‘form’ control’s object, available in all portal pages.

Portal_Loading_2

    • To hide all the controls, set the #content_form { display: none; } in ‘Custom CSS’.
    • Now, show the #content_form only when page load completes, by setting ‘display’ to ‘block’ in $(window).load event.

Notes:

  • Following are the events, as per their order, during any Web Page’s Load.
    • $(document).ready
      • document.ready triggers when the DOM is ready, e.g. all elements are there to be found/used, but not necessarily all the content.
    • $(window).load
      • window.load event is fired after whole content is loaded like page contain images,css etc.
  • We can also show ‘Loader’ symbol during page load. All we need is ‘Spinner’ image and hide/show using the specified technique.

🙂

 

Categories: CRM

Power Platform new announcements – Microsoft Power Automate, RPA and more

November 18, 2019 Leave a comment

In Microsoft Ignite 2019, following major updates to the Microsoft Power Platform were announced:

  • Microsoft Flow is being renamed to Microsoft Power Automate, to better align with the Microsoft Power Platform.
  • Robotic process automation (RPA) has been added to Microsoft Power Automate, delivering an end-to-end automation solution that spans AI, APIs, and UI on the Microsoft Power Platform.
  • Microsoft Power Virtual Agents—a no-code/low-code app that allows anyone to create and deploy intelligent AI-powered virtual agents.
    • Refer my blog for Virtual Agents Intro.
  • A host of new security enhancements for Microsoft Power BI, that add industry leading data security capabilities no matter where your analytics data is used and accessed.
  • Tighter integration between the Microsoft Power Platform and Microsoft Teams, bringing the world’s most popular collaboration app and the Power Platform closer together.
  • A new set of prebuilt models for AI Builder that add even more advanced AI models to Microsoft Power Automate and Microsoft Power Apps that are available to everyone.

Refer this link for more details and keynote

🙂