I am also working with a Portal Entity List rendered as a full calendar and trying to get the colors set in the system to pull through and replace the default blue, this should be a yellow color and not blue.
Fetch XML filter for ‘RequestedShipDate(On or After)’
<filter type="or" adx:uiinputtype="dynamic" adx:uiname="Ship From Date">
<condition value="" attribute="new_requestedshipdate" operator="on-or-after" adx:uiinputtype="dynamic" />
</filter>
Fetch XML filter for ‘RequestedShipDate(On or Before)’
<filter type="or" adx:uiinputtype="dynamic" adx:uiname="Ship To Date">
<condition value="" attribute="new_requestedshipdate" operator="on-or-before" adx:uiinputtype="dynamic" />
</filter>
P.S We need to define type as ‘dynamic’ so that portal will not perform any data transformation on filter options.
The Fetch XML filter controls will be displayed as checkboxes in the Entity List Page as shown below. We need to change the ‘type’ as ‘text’ for the checkbox controls to set value for the Dates.
Change the ‘Ship From Date’ check box as Text Box
//Change the ‘checkbox’ control’s type as Text
$('[name="7"]').prop('type', 'text');
//Set Unique Id for the control
$('[name="7"]').prop('id', 'bk_fld_shipDateAfter');
//Hide the control
$('[name="7"]').hide();
//Set null value for the Dates
$("#bk_fld_shipDateAfter").val("");
Follow the same above steps to change the ‘Ship To Date’ check box as Text Box
$("input[type=checkbox][name=8]").prop('id', 'bk_fld_shipDateBefore');
$("input[type=checkbox][name=8]").hide();
$("input[type=checkbox][name=8]").prop('type', 'text');
$("#bk_fld_shipDateBefore").val("");
Hi Partner,
So if you want to set the color automatically based on a field in D365, it's going to be a little complicated.
You should get the option set value from D365 first, you could use liquid and page template to do this, but the final value you get is only the value with number format, not the label. So you still need to find other ways to transfer the value to label.
After that, you should get the color label in the custom JS in portal and then use them in the background.
If your color doesn't change very often, I suggest you to get the color code directly and set them into the code manually.
Regards,
Leo
It's based on an option set on the appointment.
Hi Partner,
Yes, the answer above will make all the color the same. But since we got them in an array, we could set different color for different records based on your requirement.
Could you share what's the condition for each color?
Regards,
Leo
Thanks but i need to change from colour to colour, so one would be green and another blue. the above would set them all to the same colour if i'm right.
Hi Partner,
You could use F12 developer tool to get the color code.
Just put the mouse on the icon and find its color code.
Best Regards,
Leo
Thanks Leo,
Do you know how to pull the colour from the calendar in CRM?
Hi Partner,
If you want to show other background colors, you should replace the default style in Portal.
Replace the ".event-info" background to "yellow".
To do this, you should go to Entity List->Options->Custom JavaScript and add custom JS code.
$(function () { var timesRun = 0; var interval = setInterval(function () { var cas=$(".event-info"); if (cas.length!=0) { clearInterval(interval); for(var i=0;i
Best Regards,
Leo
Siv Sagar
149
Super User 2025 Season 1
Muhammad Shahzad Sh...
61
Most Valuable Professional
Daivat Vartak (v-9d...
53
Super User 2025 Season 1