web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How to create dynamic images in Crm 2011 on-premise

(0) ShareShare
ReportReport
Posted on by 1,044

I want guidance as well as help here. I am creating a customization where an entity is supposed to have dynamic images. Its an image of a floor and when I click on the floor, it should open up to show me an image of floor wings and from floor wings to rooms in the wings and from there to particular rooms. The rooms should have indicators showing whether the bed in the room is empty or occupied (e.g red for occupied and green for empty). These indicators are the one that needs to be updated based on values in a form. 

I am absolutely lost on how to proceed on this and even if it can be achieved in CRM or not. Any guidance and help would be deeply appreciated.

*This post is locked for comments

I have the same question (0)
  • Brian Geraghty Profile Picture
    2,040 on at

    I'm afraid you're going to have to provide a lot more detail; I'm not sure what floor wings are, or why you want to/need to track them; CRM is good a providing links to images, but not necessarily displaying them. There are options there, but I haven't ever seen anything like what you appear to be describing shy of a customization.

    ~Brian

  • HamzaKhan Profile Picture
    1,044 on at

    The idea is simple Brian...there is an image of a floor of a building, if you click on it, it should open up the floor and show you the wings or corridors inside the floor, and if you click on a wing/corridor it should further open up to show the rooms that are in a particular floor

  • Michael Hammons Profile Picture
    on at

    Hi Hamza,

    Technically this can probably be done with some JavaScript and HTML5 and stored in CRM as web resources. The JavaScript could read CRM records of rooms that have been "booked" and display the appropriate red/green box. Since you are representing buildings, wings, floors and rooms this could probably be table driven then change the cell color of the table based on a value read from CRM records. Something like below; the yellow outlines being the floors or sections/wings of the building, click on the section, see the rooms in the section, click on a box, toggles between reg/green and updates the record in CRM.

    Overall it's doable, but, will probably be a fair amount of coding to do. Keeping it in HTML5 and JavaScript should make it very light and even mobile (tablet) friendly.

    Mike

  • HamzaKhan Profile Picture
    1,044 on at

    Hi Mike,

    Thank you for the detailed response. So javascript and HTML 5 are the resources I should use?

    And can you explain further what do you mean by table driven? How do I link the box with one particular record? As every box is a room here how do I make certain that the appropriate box is being populated?

    And do I need to make different entities for Floor, rooms, wings etc? It would be better I could make one entity with the information in it.

  • HamzaKhan Profile Picture
    1,044 on at

    Btw I read that HTML 5 is not supported by CRM 2011 On-premise. Is that true? I am getting mixed vibes and answers here.

  • Verified answer
    Michael Hammons Profile Picture
    on at

    JavaScript and HTML5 (and I include CSS, as they work best together) is what first came to my mind. It doesn't need to be HTML5, you just get more layout control with it. It could be HMTL4 as well. It could be Silverlight but I generally recommend moving away from SL (I know some folks may disagree here but that's a different discussion).

    Most buildings and floors are more or less box/rectangle shaped, so this is fairly easily illustrated in an HTML table format. Think  of the image above as a table with 7 rows and 25 columns, the rooms are the individual cells; in this example it would have 175 rooms (cells).  Here is an example that can point in the direction I was thinking, add a click event to the cells to turn them the desired color. css-tricks.com/.../example-one.php

    I agree it should be one entity, let's call it occupancy (or maybe reservations) that would have building, wing, floor, and room info in it. Your code would then query for the building, wing, floor, and room details; setting the colors for each of the records. E.g. Building is blue, wing is yellow, floor is orange and the cells will be either red or green (depending on the occupied setting). The colors and table info should all be linked to a style sheet. You might need a "cross reference table" to link cell numbers with room numbers.

    HTML5 support and CRM2011. It depends. The web resource editor will strip out HTML5 Doc types, so it is not recommended to do any editing of your resources in CRM. Create them outside of CRM and import them via a Solution. As of UR12 and the introduction of multi-browser support  and IE10 support, HTML5 in a resource should not cause any problems (caveat, I have not tested this).

    Since you are on-premise, you could more easily keep the code outside of CRM, and use a button in CRM to launch it. It might even be easier to go this route because you will have greater control over the code and not have to worry about Solutions and CRM specific challenges (use the SDK/API to read the tables from CRM). It depends on your use cases.

    Hope this helps a little.

    Mike

  • Michael Hammons Profile Picture
    on at

    To add a little more detail to the layout, think of each building as a table, on click, a new table is generated that shows the wings, on click, it creates a new table that shows the floors, on click, it creates a new table that shows the rooms.  

  • HamzaKhan Profile Picture
    1,044 on at

    That is a very detailed answer Michael. I am definitely getting the hang of it now and I will start working on it after clearing some other issues with the customer. But I want the cells to turn red or green after i have updated a record rather than the other way round.

    So I guess there should be a javascript that will get data through REST and update the cells.

  • HamzaKhan Profile Picture
    1,044 on at

    Michael, I have created the first instance of the project, where a building, is generating floors, and floors are showing wings and so on to rooms. Now I am working on the second part of the project where  the form should update the room colours. I need to know about cross-referencing tables and a good guide to how to update the image.

    Hope you can help.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans