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..
The JavaScript option on en Entity List in CRM Portal No Longer gets included in the rendered page. Is there another way of manipulating the results displayed in the entity list grid?
LikeLike
This is how its done now 🙂
https://docs.microsoft.com/en-us/dynamics365/customer-engagement/portals/add-webpage-render-list-records
LikeLiked by 1 person
How Can we get RecordID from portal form?
LikeLike
Would it be possible to change the color of one value based on another column value?
From you Example:
If owner = System
Then, display Address 1 in Red
May thanks!
Yvan
LikeLike
How do you get the id of the list. I could not find the ID when the list is rendered
LikeLike