Skip to main content

Hi guys,


I have a skuid page on account object. It shows the contacts associated to the account and on the drawer on contacts it will show the related phone, email, and social associated to contact records.


I can’t seem to find the right condition to show the related phone record that are associated to the specific contact record. This issue is happening to phone, email, and social.


Please see XML file.

drive.google.com




Draft-Account-Contacts (1).xml



Google Drive file.






You need to set the Context in the Drawer components.



<skuid__page unsavedchangeswarning="yes" personalizationmode="server" showsidebar="false" showheader="false">
<models>
<model id="Accounts" limit="50" query="true" createrowifnonefound="false" datasource="salesforce" sobject="Account">
<fields>
<field id="Id"/>
<field id="Name"/>
<field id="Opportunities" type="childRelationship">
<fields>
<field id="Name"/>
<field id="Amount"/>
</fields>
<conditions/>
</field>
<field id="Contacts" type="childRelationship" limit="10">
<fields>
<field id="Phone"/>
<field id="Name"/>
</fields>
</field>
</fields>
<conditions/>
<actions/>
</model>
<model id="Contacts" limit="" query="false" createrowifnonefound="false" datasource="salesforce" sobject="Contact">
<fields>
<field id="AccountId"/>
<field id="Account.Name"/>
<field id="Name"/>
<field id="Email"/>
<field id="MobilePhone"/>
<field id="Phone"/>
<field id="Fax"/>
</fields>
<conditions>
<condition type="fieldvalue" value="" enclosevalueinquotes="true" field="AccountId" fieldtargetobjects="Account" clientorserver="server" state="filterableoff" inactive="true" name="AccountId"/>
</conditions>
<actions/>
</model>
<model id="Opps" limit="" query="false" createrowifnonefound="false" datasource="salesforce" sobject="Opportunity">
<fields>
<field id="AccountId"/>
<field id="Account.Name"/>
<field id="Name"/>
<field id="Amount"/>
</fields>
<conditions>
<condition type="fieldvalue" value="" enclosevalueinquotes="true" field="AccountId" fieldtargetobjects="Account" clientorserver="server" state="filterableoff" inactive="true" name="AccountId"/>
</conditions>
<actions/>
</model>
</models>
<components>
<skuid__table allowColumnFreezing="dragDrop" model="Accounts" uniqueid="sk-2CsO-23082" mode="read" showSaveCancel="true" pageSize="Infinity" enableDrawers="true">
<fields>
<field id="Name" uniqueid="fi-2CsO-23643"/>
<field id="Opportunities" type="CHILDREL" label="Opps" delimiter="&lt;br&gt;" template="{{Name}} - {{Amount}}" allowHtml="true" uniqueid="fi-2Ctf-67500"/>
<field id="Contacts" type="CHILDREL" label="Contacts" delimiter="&lt;br&gt;" template="{{Name}} - {{Phone}}" allowHtml="true" uniqueid="fi-2Ctf-67501"/>
</fields>
<filtering enableSearch="false"/>
<actions/>
<rowActions/>
<massActions/>
<exportProperties useTableColumns="true"/>
<sorting enable="false"/>
<drawer>
<components>
<skuid__wrapper uniqueid="sk-2Cts-68941">
<components>
<skuid__tabSet deferTabRendering="true" uniqueid="sk-2Csl-40330">
<tabs>
<skuid__tabPanel name="Opps">
<components>
<skuid__table allowColumnFreezing="dragDrop" model="Opps" uniqueid="sk-2Csp-42127" mode="read" pageSize="10" showListFooter="false">
<fields>
<field id="Name" uniqueid="fi-2Cs--50137"/>
<field id="Amount" horizontalAlignment="right" uniqueid="fi-2Cs--50138"/>
</fields>
<filtering enableSearch="false"/>
<actions/>
<rowActions/>
<massActions/>
<exportProperties useTableColumns="true"/>
<sorting enable="false"/>
<conditions>
<condition type="contextrow" field="AccountId" mergefield="Id" operator="=" fieldtargetobjects="Account"/>
</conditions>
</skuid__table>
</components>
</skuid__tabPanel>
<skuid__tabPanel name="Contacts">
<components>
<skuid__table allowColumnFreezing="dragDrop" model="Contacts" uniqueid="sk-2Csq-42953" mode="read" pageSize="Infinity" showListFooter="false">
<fields>
<field id="Name" uniqueid="fi-2Cst-46442"/>
<field id="Email" uniqueid="fi-2Ct4-52203"/>
<field id="MobilePhone" uniqueid="fi-2Ct4-52204"/>
<field id="Phone" uniqueid="fi-2Ct4-52205"/>
<field id="Fax" uniqueid="fi-2Ct4-52206"/>
</fields>
<filtering enableSearch="false"/>
<actions/>
<rowActions/>
<massActions/>
<exportProperties useTableColumns="true"/>
<sorting enable="false"/>
<conditions>
<condition type="contextrow" field="AccountId" mergefield="Id" operator="=" fieldtargetobjects="Account"/>
</conditions>
</skuid__table>
</components>
</skuid__tabPanel>
</tabs>
</skuid__tabSet>
</components>
<styles>
<spacing top="2" right="2" bottom="2" left="2"/>
</styles>
<background/>
<renderConditions logictype="and"/>
<styleVariantConditions/>
</skuid__wrapper>
</components>
<beforeLoad>
<action type="blockUI" styleSettingsVariant="dark"/>
<action type="updateCondition" model="Opps" behavior="set" condition="AccountId" valuesource="fieldvalue" value="{{Id}}"/>
<action type="updateCondition" model="Contacts" behavior="set" condition="AccountId" valuesource="fieldvalue" value="{{Id}}"/>
<action type="requeryModels" behavior="loadmore">
<models>
<model>Contacts</model>
<model>Opps</model>
</models>
</action>
<action type="unblockUI"/>
</beforeLoad>
</drawer>
</skuid__table>
</components>
<resources>
<labels/>
<javascript/>
<css/>
<actionsequences/>
</resources>
<styles>
<styleitem type="background" bgtype="none"/>
</styles>
</skuid__page>

Reply