Posts

Showing posts with the label CRM Portal

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:

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

Perform logic on change of DateTime field

 Writing business logic on change of DateTime field in CRM portal using jQuery is different than normal on change function. eg. If we want to check whether entered date is in past or not then we will use following syntax :  In our case Start Date is the field where we are adding validation. Schema name for start date is new_startdate var dpcontrol = $("#new_startdate_datepicker_description").closest("div.control"); $(dpcontrol).on("dp.change", function (e) { var dateVal = $("#new_startdate").val(); if (dateVal != null) { var newDate = new Date(dateVal), now = new Date(); newDate.setHours(0,0,0,0); now.setHours(0,0,0,0); if (newDate < now) { alert("Date is in past. Please select valid date."); $("#new_startdate_datepicker_description"

jQuery Basic Syntax

 In Microsoft D365, jQuery is mostly used in different CRM portal for development purpose. Providing basic syntax required to Get/Set field value in jQuery :  1. TextField :  var firstname = $("#firstname").val();  //get var lastname = $("#lastname").val("Tendulkar");  //set  2. OptionSet :  var type = $("#typecode").val(); //get var type = $("#typecode").val(16350000);  //set (enter code of optionset field) 3. Lookup :  //Get Lookup Value var lookupGUID = $(“#new_accountid”).val(); var lookupValue = $(“#new_ accountid_name”).val(); var entityName= $(“#new_accountid_entityname”).val(); //set Lookup Value $(“#new_accountid”).val(lookupId); $(“#new_accountid_name”).val(lookupName); $(“# new_accountid_entityname”).val(EntitySchemaName); 4. CheckBox :  //Get Checkbox value var isChecked = $(“#{field_name}”).is(“:checked”); if (isChecked == true) { alert(“Checked!”); } else if (isChecked == false) { alert(“Unchecke