I have a custome entity in CRM, which is called "Portalnotice". It will be used to save a message or notice in a certain timeframe.
Now I want to show the information from this entity (the notice) to all the users, who log on to the website via a pop-up.
It should be a button on this pop-up, like "seen", and everytime a user clicks on it, the information that the user has already clicked should be saved somewhere, so the message won't show up again for the same user.
Do you have any idea or suggestion how can I solve this problem?
usually, portals use liquid inheritance to render pages. So you could modify the baseliquid, which is used for your portal (may be "layout 1 column"?) and place code in there, then the code will be available on each and every page.
The code which could be used can be a fetch to fetch the latest news which is still to be visible (so you might have validfrom/validto attributes in your table).
The cookie can be access in the request.params collection. Just make sure to set the cookie for the whole site by adding the "path=/" option to the cookie.
The last bit is the display of teh message. You can either make a div in the roorliquid and show it accordingly or simply do a window.confirm (which is really old fashioned 🙂 )
If you need more specific help on this idea, just ping me.
Hope it helps,
PS it is temptimg to use the header or footer template for this functionality. I would not recommend to do so as header and footer are heavily cached which leads to not that great predictable behaviors in scripting based on data...