Advertisements

Archive

Posts Tagged ‘Dynamics Portal’

Dynamics Portals – Using ‘Emojis’ in Entity Form and Entity List

In this article, lets see how to use Emoji’s to capture the data in Portal’s Forms.

Emoji1

It’s very simple to achieve. All you need to do is to set the Dynamics ‘Option Set’ field’s ‘Label’ with ‘Emoji’.

Below is the ‘HOW’ part.

Create an ‘Option Set’ field with ‘Emojis’:

  • In Dynamics, create a new ‘Option Set’ Field with 2 options
  • In the Option’s ‘Label’ paste the Emoji.

Emoji2

  • Place this ‘Option Set’ field on the Dynamics Form and View which are being referred in your portal’s ‘Entity Form’ and ‘Entity List’.

Make ‘Options’ to render side by side in Portal:

  • By default, ‘Option Set’ renders as ‘Drop down’ control in Portal.
  • To show the ‘Options’ as Side by Side, add a new ‘Metadata’ to ‘Entity Form’.

Emoji7

Test the Emojis in Portal:

  • Navigate to Portal and open the ‘Employees’ view. Option Set value would renders as ‘Emoji’

Emoji5

  • Open the record and you should get ‘Emojis’ rendered side by side.

Emoji1

Note:

  • You can ‘Copy’ the Emoji from here . Search the Emoji as per your requirement and click ‘Copy’.

Emoji3

  • The rendering of Emojis will be same in ‘Dynamics Web Application’.

Emoji8

🙂 

 

 

 

Advertisements

ADX/Dynamics Portals – Date field custom validation using JScript

April 6, 2019 1 comment

Other day, In one of our Portal Web Form step, we got a requirement to validate ‘Date Of Birth’ where the value should not be  the future date.

We can achieve this by adding a custom validator using JScript and register in your ‘Web Form Step’.

Below is the JScript code snippet which you need to paste in your Web Form Step’s ‘Custom JavaScript’ control.

DOB_Validator_1

Note:

  • In below script replace the ‘new_dateofbirth’ with your field’s schema name.
  • ‘new_dateofbirth_label‘ is the label of the DOB field on your Web Form Step.

$(document).ready(function () {
try{
if (typeof (Page_Validators) == ‘undefined’) return;
// Create new DOB validator
var dobValidator = document.createElement(‘span’);
dobValidator.style.display = “none”;
dobValidator.id = “dobValidator”;
dobValidator.controltovalidate = “new_dateofbirth”;
dobValidator.errormessage = “<a href=’#new_dateofbirth_label’>Date of birth should be in past.</a>”;
dobValidator.validationGroup = “”;
dobValidator.initialvalue = “”;
dobValidator.evaluationfunction = function () {
var dobValue = $(“#new_dateofbirth”).val();
var dob=new Date(dobValue);
var today = new Date();
if (dob > today) {
return false;
}
return true;
};
// Add the dobValidator to Web Page’s validators array
Page_Validators.push(dobValidator);
// Attach event handler of the validation summary link
$(“a[href=’#new_dateofbirth_label’]”).on(“click”, function () {  scrollToAndFocus(‘new_dateofbirth_label’,’new_dateofbirth’);

});
}
catch(e)
{
alert(“Error during DOB validation  – “+e.description);
}
});

  • Save the Web Form Step and test in portal.
  • If you try to save DOB with future date. It shows warning in the banner as below:

DOB_Validator_2

  • Click on the message and it will take you to the DOB control.

Refer my other article to get familiar with Portal syntax’s.

🙂

 

 

Dynamics Portals – Entity List – Integration using OData feed

February 17, 2019 Leave a comment

With Dynamics Portal’s Entity list ‘OData Feed’ option, we can expose the data in the form OData API, which can be further consumed by external applications.

Lets take a scenario,

  • You have a public facing Dynamics Portal where people gets registered, which get stored as ‘Contacts’ in Dynamics CE instance.
  • You need to share all the ‘Active Contacts’ to your back end team which uses an Excel sheet to manage data.

It can be achieved by enabling OData feed on Entity List by following below steps:

  • Open your Entity List and go tot ‘OData Feed’ section. (Refer my previous articles on how to create an Entity List)
  • Enable the ‘OData Feed’ option along with below details
    • Entity Type Name : Your Dynamics entity schema name
    • Entity Set Name : Can be anything but as a best practice provide plural name of your Dynamics entity.
    • View : Select the view.  The structure of your OData feed would be determined based on the view you pick.

Portal_OData_7

  • Once the ‘OData Feed’ enabled, you can get all the oData feeds enabled on Portals by forming URL -> {Your Portal URL}+”/_odata

Portal_OData_8

  • Now access the ‘Contacts’ oData feed by forming URL -> {Your Portal URL}+”/_odata“+Entity Set Name (i.e., contacts)

Portal_OData_9.PNG

How to consume the oData API in Excel:

  • Copy the OData set URL
  • In the new Excel sheet, go to Data -> Get Data -> From Other Sources -> From OData Feed

Portal_OData_1

  • Paste the OData URL and click ‘OK’

Portal_OData_2

  • Click ‘Load’ to load the data to excel sheet.

Portal_OData_5

  • If you want to Transform data like replace ‘Null’, click on ‘Transform Data’

Portal_OData_4

  • Your excel sheet shall looks as below once the data loads.

Portal_OData_6

Note:

  • The OData API URL is accessible anonymously with no authentication prompted.

🙂

 

 

Dynamics Portals – Portal Checker

February 16, 2019 Leave a comment

‘Portal Checker’ has been added as part of Portal capabilities version 9.1.1 for Dynamics 365 CE apps.

Portal checker for Dynamics 365 for CE Portal is a self-service diagnostic tool that can be used by Portal administrators to identify common issues in their portal.

Portal_Checker_1

  • In the Portal administration screen, click on ‘Diagnose and resolve problems’

Portal_Checker

Portal checker helps to identify issues with your portal by looking at various configuration parameters and provides suggestions on how to fix them.

Refer this article for more details

🙂

 

Dynamics Portal – Configurations packaging and migrating to different instances

February 16, 2019 Leave a comment

In Dynamics CE, to move Customizations and Configurations from one instance to another, we rely on Solutions.

How about migrating Dynamics Portal configurations from one instance to other?

  • As we know, Dynamics Portal development involves several configurations and Customizations to achieve a desired experience for portal end users.
  • To migrate Portal configurations from the source Dynamics CE instance, and then importing it into the target Dynamics CE instance, you would need to use the Configuration Migration tool and a portal-specific configuration schema file.

Portal_ConfigurationMigration

Refer this article for detailed explanation.

🙂