Web Development – Useful jQuery Syntax’s

Rajeev Pentyala - Microsoft power platform blog

In this article, I am compiling the useful jQuery syntax’s which comes handy during your Dynmaics/ADX portal development or any other web development.

Prerequisite

  • Add jQuery library to your web page using <script> tag.
  • You can get the jQuery CDN here

Get Operations:

  • Get HTML element by Id

$(“#HTMLelementId“)

  • Get element by Class name

$(“.ClassName“)

  • Get element by ‘partial’ Id name.
    • As an example, if you want to get a Checkbox control which has ID ‘myChkBox‘, you can either get the element using full id with $(“#myChkBox”) or use partial id $(“[id$=’ChkBox‘]”).

$(“[id$=’PartialId‘]”)

  • Get Value

$(“#HTMLelementId“).val()

  • Get selected drop down text

$(“#DropdownId option:selected”).text()

Set Operations:

  • Set Text box

$(“#HTMLelementId“).val(“Hello World”);

  • Set Checkbox

$(“#checkboxId“).prop(“checked”, true); //true is checked; false is unchecked.

Add or Remove CSS Class

  • $(“#HTMLelementId“).addClass(“YourClassName“); // Add Class

View original post 339 more words

Useful JScript syntax’s – ADX/Dynamics 365 Portals

Rajeev Pentyala - Microsoft power platform blog

CRM form script’s (i.e., Onload, OnSave, OnChange) won’t run on ADX/Dynamics 365 Entity Form’s.

What if we must Get/Set, Hide/Show or Enable/Disable controls based on business logic? We need to write custom script and add in “Custom JavaScript” section of “Entity Form”.

Custom Javascript Custom Javascript

In this article, I am providing syntax’s to Get/Set attribute values and basic validations.

Get value:

Text Field:

Here ‘name’ is CRM field’s schema name.

  • var contactName=$(“#name”).val();

Look up

  • var lookupGUID = $(“#new_contactid”).val();
  • var lookupValue = $(“#new_ contactid_name”).val();
  • var entityName= $(“#new_contactid_entityname”).val();

Option Set

  • var userType = $(“#new_usertype”).val();

DateTime

  • var dobValue= $(“#new_dob”).val();
  • // Convert to date
  • var dob=new Date(dobValue);

Checkbox

Below is the script to determine whether the checkbox is checked or not

var isChecked = $(“#{field_name}”).is(“:checked”);
if (isChecked == true) {
alert(“Checked!”);
}
else if (isChecked == false) {
alert(“Unchecked!”);
}

Radio Button

Radio button renders as 2 controls. Below is the syntax to read which radio…

View original post 667 more words

Enhanced email for timeline in Dynamics 365 – 2020 release wave 2

With 2020 release wave 1, we had seen a couple of enhancements in Email experience https://nishantrana.me/2020/02/24/enhanced-email-experience-for-agents-in-dynamics-365-customer-service-2020-release-wave-1/ now this has been extended to Email within the Timeline section Enable early access to 2020 release wave 2 Navigate to App Settings in Sales Hub, and click Manage for Enhanced email for timeline Enable it and save. Let […]

Enhanced email for timeline in Dynamics 365 – 2020 release wave 2

Dynamics CRM Prepopulate To Activity Party on Email when multiple/single records selected from grid

Recently we had a requirement to open Email entity form with To field prepopulated with the selected records from grid. We have added custom button on grid using Ribbon Workbench Tool and added Action to call below Javascript on click on button. function OpenQuickCreateemail(selectedItems) { var partylist = []; if (selectedItems.length == 1) { OpenQuickCreateemailsingleRecorde(selectedItems); […]

Dynamics CRM Prepopulate To Activity Party on Email when multiple/single records selected from grid

Creating a solution patch in D365 Power Platform, why would you do so?

Note: I’m a firm believer in releasing only managed solutions to testing and production environments and maintaining an unmanaged solution on the development box only, therefore this post is based on the MS best practice architecture of exporting managed solutions for distribution. To understand solution patches think of them in the direct definition of what […]

Creating a solution patch in D365 Power Platform, why would you do so?

{Quick Tip} Redirect to edit form post creating a record in PowerApps/ dynamics 365 portals

This one is a small tip for anyone who are trying to build up their portal application and did not have much exposure to portals yet. And this is one of the most common requirement that I face in almost every portal implementation. So you have your insert form and then when the portal user […]

{Quick Tip} Redirect to edit form post creating a record in PowerApps/ dynamics 365 portals

Show item action buttons in Dynamics 365 Portal Entity list as horizontal buttons instead of vertical list

Recently I got this requirement where I needed to show the actions buttons inside Entity List in horizontal fashion. Be default whenever you configure entity list item action buttons like Details/ Edit/ Delete/ Workflow, it shows up in vertical fashion. However the customer wanted to show the buttons horizontally, side by side. It’s actually much […]

Show item action buttons in Dynamics 365 Portal Entity list as horizontal buttons instead of vertical list

Show item action buttons in Dynamics 365 Portal Entity list as horizontal buttons instead of vertical list

Recently I got this requirement where I needed to show the actions buttons inside Entity List in horizontal fashion. Be default whenever you configure entity list item action buttons like Details/ Edit/ Delete/ Workflow, it shows up in vertical fashion. However the customer wanted to show the buttons horizontally, side by side. It’s actually much […]

Show item action buttons in Dynamics 365 Portal Entity list as horizontal buttons instead of vertical list

Custom button to save a record and stay on the same step without moving to the next or previous step inside a Webform step in PowerApps portals/ Dynamics 365 Portals? Check this out!

Follow my blog for more interesting topics on Dynamics 365, Portals and Power Platform. For training and consulting, write to us at info@xrmforyou.com Few months back I posted an article on how you can develop a custom button for Save as draft functionality on an Entity form in PowerApps portals. On that post I have received […]

Custom button to save a record and stay on the same step without moving to the next or previous step inside a Webform step in PowerApps portals/ Dynamics 365 Portals? Check this out!

Custom button to save a record and stay on the same step without moving to the next or previous step inside a Webform step in PowerApps portals/ Dynamics 365 Portals? Check this out!

Follow my blog for more interesting topics on Dynamics 365, Portals and Power Platform. For training and consulting, write to us at info@xrmforyou.com Few months back I posted an article on how you can develop a custom button for Save as draft functionality on an Entity form in PowerApps portals. On that post I have received […]

Custom button to save a record and stay on the same step without moving to the next or previous step inside a Webform step in PowerApps portals/ Dynamics 365 Portals? Check this out!
Create your website at WordPress.com
Get started