Skip to main content
Skip table of contents

Wrapping the Floorplan

The floorplan can be used on any other page by wrapping the calendar component and providing a number of variables.

Variable Name

Value/Description

floorplanId

The Id of a Floorplan__c record. This is the floorplan that will be loaded in the component.

hideOtherAreas (optional)

Specify a Boolean value to control the display of areas. By default, this value is set to false. When set to true, it hides any areas not listed in the highlightedAreasIds.

highlightedAreaIds (optional)

A comma-separated list of Area__c record ids. These records will be highlighted on the floorplan.

If no highlightedAreaIds are specified, all the existing areas will be highlighted on the floorplan.

highlightColor (optional)

Either a hex-color code or a color name that will be the highlight color of the areas defined in the highlightedAreaIds. Both #FFC0CB and pink are valid options.

Fallback color is #088F8F.

floorplanDateTime (optional)

A datetime value, allowing you to initialise the floorplan on a certain date/time.

Fallback will be today’s date.

height (optional)

Height of the floorplan in pixels.

Has a fallback of 500.

Sample code:

CODE
<aura:component implements="flexipage:availableForRecordHome,force:hasRecordId">
    <FP25:floorplanWrapper
        floorplanId="a027a000008CYHbAAO"
        highlightedAreaIds="a017a0000071YY2AAM"
        highlightColor="#ff0000"
        hideOtherAreas="true"
    >
    </FP25:floorplanWrapper>
</aura:component>

Floorplan Wrapper for a custom Floorplan field on Opportunity
CODE
<aura:component implements="flexipage:availableForRecordHome,force:hasRecordId" access="global" >
    <aura:attribute name="opportunityRecord" type="Object"/>
    <aura:attribute name="recordLoadError" type="String"/>
    
    <force:recordData aura:id="recordLoader"
    recordId="{!v.recordId}"
    fields="Name, Floorplan__c,Area__c"
    targetFields="{!v.opportunityRecord}"
    targetError="{!v.recordLoadError}"
    />
	<aura:if isTrue="{!v.opportunityRecord.Floorplan__c}">
        <FP25:floorplanWrapper
            floorplanId="{!v.opportunityRecord.Floorplan__c}"
            highlightedAreaIds="{!v.opportunityRecord.Area__c}"
            highlightColor="#ff0000"
        >
        </FP25:floorplanWrapper>
    </aura:if>
</aura:component>
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.