Posts

Add Data Import Status to sitemap of Model Driven App

Image
The Data Import feature of MS CRM helps you to import data in bulk by using an Excel template. Now, when you import Excel data to CRM, CRM provides you with the great feature of observing the data import status immediately in the same window. But what if users want to see their status after some time? Then they need to navigate to advanced settings -> Data Management -> Import This requires a lot of clicking to just see the status of the data import.   To avoid this issue, we will add data import to the sitemap of the model-driven app. You just need to add URL subarea to your sitemap.   Follow below steps to add URL subarea to sitemap 1. Open your model driven app from solution 2. Customize the sitemap 3. Add subarea to your sitemap 4. Select Type as a URL 5. Mentioned below URL to see Data Import Status 6. Give some meaning title like Data Import Status   Format of URL should be like below : /main.aspx?appid=[YourAppID]&pagetype=entitylist&etn=importfile Replace [Your

Customize OOB Subgrid to show records based on dynamic filter criteria

  OOB dynamic CRM subgrids are limited to static filter criteria's only. If we want to add any dynamic filter criteria to filter records on subgrid then it's not possible with normal subgrid configuration. However, we can achieve such requirements by customizing fetchxml of view present on subgrid using JavaScript. eg. If we want to filter accounts on case entity by matching criteria (Current case record Case number = All accounts with matching Account number i.e [case number(case) = account number (account)]) then we can achieve such requirements by using below JavaScript Add below JS on load of case entity. so that on load it will get case number and filter account subgrid dynamically function filterAccountSubgridInCase(executionContext) { var formContext = executionContext.getFormContext(); var gridContext = formContext.getControl("Subgrid_Accounts"); var caseNumber = formContext.getAttribute("new_casenumber").getValue(); //customizing

Portal Error - URL of the Dynamics 365 organization connected to this portal has been changed.

Image
If you are getting portal error - "URL of the Dynamics 365 organization connected to this portal has been changed." then it's because of your CRM instance url is changed or updated by someone.  To resolve this error you need to navigate to power apps admin center and then go to Portal Actions and click on "Update Dynamics 365 URL" After this wait for sometime or restart you CRM Portal. After restarting, if you try to access your CRM portal it will not throw any error :) If you are getting latest UI, then follow below approach:

Custom Subgrid Using HTML Web resource

Sometimes you will get requirement to show records in subgrid without any proper relationship. In such scenario you can go with custom subgrid and show all those related records in HTML table that won't be possible with OOB way of ms crm Below is the sample code for HTML web resource for creating sample custom subgrid Here we are showing all accounts in Case entity where matching criteria is Case Number = Account number(that too without any relationship between Case and account) html><head><meta><meta><meta><meta><meta><meta><meta><meta><meta><meta><meta><meta><meta><meta><meta><meta><meta><meta><meta><meta><meta><meta><meta><meta><meta><meta><meta><meta><meta><meta><meta><meta><meta><meta><meta><meta><meta><meta><meta><meta><meta&g

Power Apps Portals - Lock/Unlock User Account for Invalid Sign In Attempt

  Site Settings that are related to Invalid Sign In Attempt. you can configure these site settings as per your requirement. Authentication/LoginThrottling/IpAddressTimeoutTimeSpan : The amount of time the IP address will have to wait if Authentication/LoginThrottling/MaxInvaildAttemptsFromIPAddress occur within Authentication/LoginThrottling/MaxAttemptsTimeLimitTimeSpan amount of time. Default: 00:10:00 (10 mins) Authentication/LoginThrottling/MaxAttemptsTimeLimitTimeSpan The amount of time the Authentication/LoginThrottling/MaxInvalidAttemptsFromIPAddress are to be within before the IP address has to wait Authentication/LoginThrottling/IpAddressTimeoutTimeSpan. Default: 00:03:00 (3 mins) Authentication/LoginThrottling/MaxInvaildAttemptsFromIPAddress The default number of unauthenticated login attempts from an IP address before the IP address is blocked for Authentication/LoginThrottling/IpAddressTimeoutTimeSpan if the attempts occur within Authentication/LoginThrottling/MaxAttemptsTim

Power Apps Portal - Authentication, Authorization

Image
 In Power Apps Portal we have below Authentications methods: Registration -  With this option any user can register with portal and access portal. This is open registration To enable and disable this option following property needs to be set true/false in site settings: Authentication/Registration/OpenRegistrationEnabled 2. Redeem Invitation : If User have Invitation code to register on portal then user will use that code and register with portal (For more information follow below video) To enable and disable this option following property needs to be set true/false in site settings: Authentication/Registration/InvitationEnabled 3. External login : This is used when user want to login by using external authentication. eg Azure AD, Facebook, LinkedIn, etc. To enable and disable this option following property needs to be set true/false in site settings: Authentication/Registration/ExternalLoginEnabled Authentication/Registration/AzureADLoginEnabled For more details

ADF - (Part3) Integrate Data From CRM to External system Using Stored procedure

Image
 In this blog we will see how we can use stored procedure to transform our data in ADF.  For better understanding you can check my previous blog for better understanding. When we integrate CRM data to external system SQL, then for  Option-Set fields present in CRM, we get Option-Set values and not Text value. eg. we have Credit Hold option set field in CRM and after integration we are getting option set value. To solve this problem we will create OptionSetMetaData table in SQL which will store details about option-set fields SQL query to create OptionSetMetaData table CREATE TABLE [dbo].[OptionSetMetadata]( [ID] [uniqueidentifier] NULL, [EntityName] [varchar](50) NULL, [OptionSetFieldName] [varchar](50) NULL, [OptionSetText] [varchar](50) NULL, [OptionSetValue] [int] NULL ) //To Insert Records in sql Table Insert Into OptionSetMetadata Values (NEWID(), 'account', 'Credit Hold', 'Yes', 1) Insert Into OptionSetMetadata Values (NEWID(), 'account&#