Using Custom JavaScript field on Entity List to add JavaScript in Portal in Dynamics 365

Suppose we have added an Entity List on Portal to display Contact information to the portal.

https://nishantrana.me/2017/02/02/using-entity-list-to-show-crm-data-in-portal-in-dynamics-365/

Now we want to add some JavaScript to it. For this we can use the Custom JavaScript field in Options tab of Entity List.


$(document).ready(function () {

$("#EntityListControl").on("loaded", function () {

$('#EntityListControl td').filter(function () {
return this.textContent === "SYSTEM"
}).css("color", "red");

});
});

We can make use of jQuery for this. The above code selects the TD with text System and highlights it with red font colour.

Hope it helps..

Advertisements

Add Attach File additional settings in Entity Form in Portal in Dynamics 365

For attaching files along with an entity form through the portal, we can make use of the Add Attach File section in the Additional Settings tab of Entity Form.

For e.g. in the below Contact Us form, we have checked Attach File check box which basically add the File Control to the web page in the portal.

Allow Multiple Files lets the user attach multiple files. Label would be the label for the control.

Attach File Required option makes attaching a file mandatory and the Required Error message shows the associated error message.

Attach File Save Option– Notes i.e. files are stored as attachment to notes.

Let us see how the settings effects the display and functionality in the Portal.

Attach File label with required symbol à

Clicking on Submit without attaching a file à

Attaching multiple filesà

Clicking on Submit after entering all the required fields à

Opening the lead record inside CRM shows the attachments added to the notes à

Hope it helps..

Using Custom JavaScript field on Entity Form to add JavaScript in Portal in Dynamics 365

Suppose we have added an Entity Form on Portal to display Lead information to the portal.

https://nishantrana.me/2017/02/03/using-entity-form-to-show-crm-form-inside-portal-in-dynamics-365/

Now we want to add some JavaScript to it. For this we can use the Custom JavaScript field in Additional Settings tab of Entity Form.

We can make use of jQuery for this. The above code shows alert and also accesses the Topic field of Lead record using the schema name subject.

Alert Message –

Setting field value –

More details below

https://www.microsoft.com/en-us/dynamics/crm-setup-and-administration/custom-javascript.aspx

https://rajeevpentyala.com/2016/09/12/useful-jscript-syntaxes-adx-portal/

Hope it helps..

Managing Forum in Community Portals in Dynamics 365 – Part 1.

Suppose we have setup portals in Dynamics 365 and have used Community Portal template.

Community portal allows us to create Forums that lets the users discuss various topics.

  • To create a new Forum, log in to CRM, go to Community – Forums.

  • Click on New to create a new Forum.

The important properties here are

  • WebSite – Community Portal. (the web site inside which we want to create the forum)
  • Parent Page – Page where we want the forum to appear. Forums in our case.
  • Partial URL – URL for the page.
  • Forum and Thread Page Template – Specify the existing template for them.
  • Display Order – Defines the order at which it should appear.

Creating the new forum record in published state (Publishing State) adds the Forum to the forum page in the portal.

Forum will have an associated thread (s), which can be created by the Portal user in the portal or can be created by Admin user within CRM.

Test Forum with the associated thread :-

Inside CRM we’d see the thread associated to the forum.

Thread will have associated Post(s) to it. Post are auto created when a thread is created in the portal.

Suppose we are creating a new thread with the below details in our test forum from within the portal.

This will create a post associated to the thread.

In next blog post we’d explore other features of the community portal.

Hope it helps.