Featured Video Play Icon

How to add a drop down button list to your detail page in Salesforce using Skuid.

<skuidpage showsidebar="false" showheader="true" tabtooverride="Account" unsavedchangeswarning="" theme="Paper">
   <models>
      <model id="AccountData" limit="1" query="true" createrowifnonefound="false" sobject="Account">
         <fields>
            <field id="Name"/>
            <field id="CreatedDate"/>
            <field id="Description"/>
            <field id="Fax"/>
            <field id="AccountNumber"/>
            <field id="Phone"/>
            <field id="BillingCity"/>
            <field id="BillingCountry"/>
            <field id="BillingState"/>
            <field id="BillingStreet"/>
            <field id="CreatedById"/>
            <field id="CreatedBy.Name"/>
            <field id="NumberOfEmployees"/>
            <field id="Industry"/>
            <field id="LastActivityDate"/>
            <field id="LastModifiedById"/>
            <field id="LastModifiedBy.Name"/>
            <field id="LastModifiedDate"/>
            <field id="OwnerId"/>
            <field id="Owner.Name"/>
            <field id="ParentId"/>
            <field id="Parent.Name"/>
            <field id="ShippingCity"/>
            <field id="ShippingCountry"/>
            <field id="ShippingState"/>
            <field id="ShippingStreet"/>
            <field id="Website"/>
            <field id="Type"/>
            <field id="AnnualRevenue"/>
            <field id="Rating"/>
            <field id="TickerSymbol"/>
            <field id="Ownership"/>
            <field id="Site"/>
            <field id="Sic"/>
            <field id="Id"/>
         </fields>
         <conditions>
            <condition type="param" enclosevalueinquotes="true" operator="=" field="Id" value="id"/>
         </conditions>
         <actions/>
      </model>
      <model id="Contact" limit="100" query="true" createrowifnonefound="false" orderby="LastModifiedDate DESC" sobject="Contact">
         <fields>
            <field id="LastName"/>
            <field id="FirstName"/>
            <field id="Title"/>
            <field id="Email"/>
            <field id="Phone"/>
            <field id="OwnerId"/>
            <field id="Owner.Name"/>
            <field id="AccountId"/>
            <field id="Account.Name"/>
            <field id="Id"/>
            <field id="Business_Phone_Extension__c"/>
            <field id="MobilePhone"/>
         </fields>
         <conditions>
            <condition type="modelmerge" value="" field="AccountId" operator="=" model="AccountData" enclosevalueinquotes="true" mergefield="Id"/>
            <condition type="userinfo" value="" field="OwnerId" operator="=" enclosevalueinquotes="true" userinfotype="userid" state="filterableoff" inactive="true" name="OwnerId"/>
         </conditions>
         <actions/>
      </model>
      <model id="Opportunities" limit="100" query="true" createrowifnonefound="false" orderby="LastModifiedDate DESC" sobject="Opportunity">
         <fields>
            <field id="Amount"/>
            <field id="CloseDate"/>
            <field id="IsClosed"/>
            <field id="TotalOpportunityQuantity"/>
            <field id="StageName"/>
            <field id="Name"/>
            <field id="AccountId"/>
            <field id="Account.Name"/>
         </fields>
         <conditions>
            <condition type="modelmerge" value="" field="AccountId" operator="=" model="AccountData" enclosevalueinquotes="true" mergefield="Id"/>
            <condition type="fieldvalue" value="false" enclosevalueinquotes="false" field="IsClosed" state="filterableoff" inactive="true" name="IsClosed" operator="="/>
            <condition type="fieldvalue" value="" enclosevalueinquotes="false" field="Amount" state="filterableoff" inactive="true" name="AmountCondition" operator="="/>
         </conditions>
         <actions/>
      </model>
      <model id="Cases" limit="100" query="true" createrowifnonefound="false" orderby="LastModifiedDate DESC" sobject="Case">
         <fields>
            <field id="Account.Name"/>
            <field id="Id"/>
            <field id="Type"/>
            <field id="Description"/>
            <field id="CreatedDate"/>
            <field id="ContactId"/>
            <field id="Contact.Name"/>
            <field id="CaseNumber"/>
            <field id="Priority"/>
            <field id="Subject"/>
         </fields>
         <conditions>
            <condition type="modelmerge" value="" field="AccountId" operator="=" model="AccountData" enclosevalueinquotes="true" mergefield="Id"/>
            <condition type="fieldvalue" value="" enclosevalueinquotes="true" field="Priority" state="filterableoff" inactive="true" name="Priority"/>
            <condition type="fieldvalue" value="" enclosevalueinquotes="true" field="Type" state="filterableoff" inactive="true" name="Type"/>
         </conditions>
         <actions/>
      </model>
      <model id="TaskHistory" limit="100" query="true" createrowifnonefound="false" orderby="LastModifiedDate DESC" sobject="Task">
         <fields>
            <field id="Subject"/>
            <field id="ActivityDate"/>
            <field id="Priority"/>
            <field id="Status"/>
            <field id="OwnerId"/>
            <field id="Owner.Name"/>
            <field id="Description"/>
            <field id="WhoId"/>
            <field id="Who.Name"/>
         </fields>
         <conditions>
            <condition type="modelmerge" value="" field="WhatId" operator="=" mergefield="Id" model="AccountData" enclosevalueinquotes="true"/>
            <condition type="fieldvalue" value="Completed" enclosevalueinquotes="true" field="Status"/>
         </conditions>
         <actions/>
      </model>
      <model id="OpenTasks" limit="10" query="true" createrowifnonefound="false" orderby="LastModifiedDate DESC" sobject="Task">
         <fields>
            <field id="Subject"/>
            <field id="WhatId"/>
            <field id="Priority"/>
            <field id="Status"/>
            <field id="ActivityDate"/>
            <field id="OwnerId"/>
            <field id="Owner.Name"/>
            <field id="AccountId"/>
            <field id="Account.Name"/>
            <field id="IsClosed"/>
            <field id="Description"/>
            <field id="WhoId"/>
            <field id="Who.Name"/>
         </fields>
         <conditions>
            <condition type="modelmerge" value="" field="WhatId" operator="=" mergefield="Id" model="AccountData" enclosevalueinquotes="true"/>
            <condition type="fieldvalue" value="Completed" field="Status" operator="!=" userinfotype="userid" enclosevalueinquotes="true"/>
            <condition type="fieldvalue" value="true" enclosevalueinquotes="false" field="IsClosed" operator="!="/>
         </conditions>
         <actions/>
      </model>
      <model id="Partners" limit="100" query="true" createrowifnonefound="false" orderby="LastModifiedDate DESC" sobject="Partner">
         <fields>
            <field id="Role"/>
            <field id="Id"/>
            <field id="OpportunityId"/>
            <field id="Opportunity.Name"/>
            <field id="AccountFromId"/>
            <field id="AccountFrom.Name"/>
            <field id="AccountTo.Name"/>
            <field id="CreatedDate"/>
            <field id="AccountToId"/>
         </fields>
         <conditions>
            <condition type="modelmerge" value="" field="AccountToId" operator="=" model="AccountData" enclosevalueinquotes="true" mergefield="Id"/>
         </conditions>
         <actions/>
      </model>
      <model id="CalendarTasks" limit="100" query="true" createrowifnonefound="false" orderby="LastModifiedDate DESC" sobject="Task">
         <fields>
            <field id="AccountId"/>
            <field id="Account.Name"/>
            <field id="OwnerId"/>
            <field id="Owner.Name"/>
            <field id="IsClosed"/>
            <field id="CreatedById"/>
            <field id="CreatedBy.Name"/>
            <field id="ActivityDate"/>
            <field id="RecurrenceEndDateOnly"/>
            <field id="WhatId"/>
            <field id="What.Name"/>
            <field id="Priority"/>
            <field id="ReminderDateTime"/>
            <field id="RecurrenceStartDateOnly"/>
            <field id="WhoId"/>
            <field id="Who.Name"/>
            <field id="Subject"/>
            <field id="Description"/>
         </fields>
         <conditions>
            <condition type="modelmerge" value="" field="WhatId" operator="=" model="AccountData" enclosevalueinquotes="true" mergefield="Id"/>
         </conditions>
         <actions/>
      </model>
      <model id="Attachments" limit="100" query="true" createrowifnonefound="false" orderby="LastModifiedDate DESC" sobject="Attachment">
         <fields>
            <field id="Name"/>
            <field id="CreatedDate"/>
            <field id="CreatedById"/>
            <field id="CreatedBy.Name"/>
            <field id="LastModifiedById"/>
            <field id="LastModifiedBy.Name"/>
            <field id="LastModifiedDate"/>
            <field id="ContentType"/>
            <field id="BodyLength"/>
            <field id="Description"/>
         </fields>
         <conditions>
            <condition type="modelmerge" value="" field="Parent.Id" operator="=" model="AccountData" enclosevalueinquotes="true" mergefield="Id"/>
         </conditions>
         <actions/>
      </model>
      <model id="Notes" limit="100" query="true" createrowifnonefound="false" orderby="LastModifiedDate DESC" sobject="Note">
         <fields>
            <field id="Body"/>
            <field id="Title"/>
            <field id="LastModifiedById"/>
            <field id="LastModifiedBy.Name"/>
            <field id="LastModifiedDate"/>
            <field id="CreatedBy.Name"/>
            <field id="OwnerId"/>
            <field id="Owner.Name"/>
            <field id="ParentId"/>
            <field id="Parent.Name"/>
         </fields>
         <conditions>
            <condition type="modelmerge" value="" field="ParentId" operator="=" model="AccountData" enclosevalueinquotes="true" mergefield="Id"/>
         </conditions>
         <actions/>
      </model>
      <model id="NewCase" limit="1" query="false" createrowifnonefound="true" sobject="Case">
         <fields>
            <field id="AccountId"/>
            <field id="Account.Name"/>
            <field id="ContactId"/>
            <field id="Contact.Name"/>
            <field id="Type"/>
            <field id="Reason"/>
            <field id="Status"/>
            <field id="Priority"/>
            <field id="Origin"/>
            <field id="Subject"/>
            <field id="Description"/>
         </fields>
         <conditions>
            <condition type="modelmerge" value="" field="AccountId" operator="=" model="AccountData" enclosevalueinquotes="true" mergefield="Id"/>
         </conditions>
         <actions/>
      </model>
      <model id="Event" limit="100" query="true" createrowifnonefound="false" sobject="Event">
         <fields>
            <field id="Subject"/>
            <field id="OwnerId"/>
            <field id="Owner.Name"/>
            <field id="Description"/>
            <field id="IsAllDayEvent"/>
            <field id="ActivityDateTime"/>
            <field id="DurationInMinutes"/>
            <field id="EndDateTime"/>
            <field id="StartDateTime"/>
            <field id="RecurrenceStartDateTime"/>
         </fields>
         <conditions>
            <condition type="modelmerge" value="" field="AccountId" operator="=" model="AccountData" enclosevalueinquotes="true" mergefield="Id" state="" inactive="false"/>
            <condition type="fieldvalue" value="false" enclosevalueinquotes="false" field="IsChild" state="" inactive="false"/>
         </conditions>
         <actions/>
      </model>
      <model id="NewOpportunity" limit="" query="false" createrowifnonefound="true" sobject="Opportunity">
         <fields>
            <field id="Name"/>
            <field id="IsPrivate"/>
            <field id="AccountId"/>
            <field id="Account.Name"/>
            <field id="Amount"/>
            <field id="Type"/>
            <field id="LeadSource"/>
            <field id="CampaignId"/>
            <field id="Campaign.Name"/>
            <field id="StageName"/>
            <field id="Probability"/>
            <field id="NextStep"/>
            <field id="Description"/>
            <field id="CloseDate"/>
         </fields>
         <conditions>
            <condition type="modelmerge" value="" field="AccountId" operator="=" model="AccountData" enclosevalueinquotes="true" mergefield="Id"/>
            <condition type="modelmerge" value="" field="CampaignId" operator="=" model="AccountData" enclosevalueinquotes="true"/>
         </conditions>
         <actions/>
      </model>
      <model id="Campaigns" limit="100" query="true" createrowifnonefound="false" orderby="LastModifiedDate DESC" sobject="CampaignMember">
         <fields>
            <field id="CampaignId"/>
            <field id="Campaign.Name"/>
            <field id="Status"/>
            <field id="HasResponded"/>
            <field id="CreatedDate"/>
            <field id="ContactId"/>
            <field id="Contact.Name"/>
         </fields>
         <conditions>
            <condition type="modelmerge" value="" field="Contact.AccountId" operator="=" model="AccountData" enclosevalueinquotes="true" mergefield="Id"/>
         </conditions>
         <actions/>
      </model>
      <model id="Assets" limit="100" query="true" createrowifnonefound="false" sobject="Asset">
         <fields>
            <field id="Id"/>
            <field id="Name"/>
            <field id="CreatedDate"/>
            <field id="Description"/>
            <field id="InstallDate"/>
            <field id="Product2Id"/>
            <field id="Product2.Name"/>
            <field id="PurchaseDate"/>
            <field id="Quantity"/>
            <field id="Status"/>
            <field id="IsCompetitorProduct"/>
         </fields>
         <conditions>
            <condition type="modelmerge" value="" field="AccountId" operator="=" model="AccountData" enclosevalueinquotes="true" mergefield="Id"/>
         </conditions>
         <actions/>
      </model>
   </models>
   <components>
      <panelset type="standard" scroll="">
         <panels>
            <panel type="left" width="700">
               <components>
                  <pagetitle model="AccountData">
                     <maintitle>
                        <template>{{Name}}</template>
                     </maintitle>
                     <subtitle>
                        <template>{{Model.label}}</template>
                     </subtitle>
                     <actions/>
                  </pagetitle>
               </components>
            </panel>
            <panel>
               <components>
                  <skootable showconditions="true" showsavecancel="false" searchmethod="server" searchbox="false" showexportbuttons="false" pagesize="10" createrecords="false" model="AccountData" buttonposition="" mode="readonly" emptysearchbehavior="query" cssclass="hidetablefooter">
                     <fields/>
                     <rowactions/>
                     <massactions usefirstitemasdefault="true"/>
                     <views>
                        <view type="standard"/>
                     </views>
                     <searchfields/>
                     <actions defaultlabel="Global Actions" defaulticon="sk-icon-magic" usefirstitemasdefault="true">
                        <action type="redirect" label="Clone Account" icon="sk-icon-clone" window="self" url="/apex/skuid__UI?objectType=Account&amp;actionType=Clone&amp;clone=1&amp;id={{{Id}}}"/>
                        <action type="redirect" label="Share" icon="sk-icon-share" window="self" url="/p/share/AccSharingDetail?parentId={{Id}}"/>
                        <action type="multi" label="Delete" icon="sk-icon-delete">
                           <actions>
                              <action type="showPopup">
                                 <popup title="Delete {{Name}}?" width="500px">
                                    <components>
                                       <pagetitle model="AccountData">
                                          <actions>
                                             <action type="multi" label="No, do not Delete anything." icon="sk-icon-cancel">
                                                <actions>
                                                   <action type="closeTopmostPopup"/>
                                                </actions>
                                             </action>
                                             <action type="multi" label="Yes, Delete Account '{{{Name}}}'." icon="sk-icon-save">
                                                <actions>
                                                   <action type="blockUI"/>
                                                   <action type="markRowsForDeletion" model="AccountData"/>
                                                   <action type="save">
                                                      <models>
                                                         <model>AccountData</model>
                                                      </models>
                                                      <onerroractions>
                                                         <action type="blockUI" message="There was an error" timeout="3000"/>
                                                      </onerroractions>
                                                   </action>
                                                   <action type="closeTopmostPopup"/>
                                                   <action type="blockUI"/>
                                                </actions>
                                             </action>
                                          </actions>
                                       </pagetitle>
                                    </components>
                                 </popup>
                              </action>
                           </actions>
                        </action>
                     </actions>
                  </skootable>
               </components>
            </panel>
            <panel type="right" width="186">
               <components>
                  <pagetitle model="AccountData">
                     <actions>
                        <action type="savecancel">
                           <models>
                              <model>Contact</model>
                              <model>Opportunities</model>
                              <model>Cases</model>
                              <model>TaskHistory</model>
                              <model>OpenTasks</model>
                              <model>Partners</model>
                              <model>CalendarTasks</model>
                              <model>Attachments</model>
                              <model>Notes</model>
                              <model>Event</model>
                              <model>Campaigns</model>
                              <model>Assets</model>
                           </models>
                        </action>
                     </actions>
                     <renderconditions logictype="and"/>
                  </pagetitle>
               </components>
            </panel>
         </panels>
      </panelset>
      <tabset rememberlastusertab="true" renderas="">
         <tabs>
            <tab name="Profile" icon="sk-icon-account-profile">
               <components>
                  <basicfieldeditor showsavecancel="false" showheader="true" model="AccountData" mode="read">
                     <columns>
                        <column width="40%">
                           <sections>
                              <section title="General Info">
                                 <fields>
                                    <field id="Name"/>
                                    <field id="ParentId">
                                       <label>Parent Account</label>
                                    </field>
                                    <field id="AccountNumber"/>
                                    <field id="Type">
                                       <label>Type</label>
                                    </field>
                                    <field id="Industry"/>
                                    <field id="Sic">
                                       <label>SIC Code</label>
                                    </field>
                                 </fields>
                              </section>
                              <section title="Description">
                                 <fields>
                                    <field id="Description">
                                       <label/>
                                    </field>
                                 </fields>
                              </section>
                              <section title="Additional Information">
                                 <fields>
                                    <field id="TickerSymbol"/>
                                    <field id="Site"/>
                                    <field id="AnnualRevenue"/>
                                    <field id="Ownership"/>
                                    <field id="NumberOfEmployees"/>
                                 </fields>
                              </section>
                           </sections>
                        </column>
                        <column width="40%">
                           <sections>
                              <section title="Contact Information">
                                 <fields>
                                    <field id="Phone">
                                       <label>Primary Phone</label>
                                    </field>
                                    <field id="BillingState"/>
                                    <field id="Fax">
                                       <label>Fax</label>
                                    </field>
                                    <field id="Website"/>
                                 </fields>
                              </section>
                              <section title="Address">
                                 <fields>
                                    <field type="COMBO" allowhtml="true">
                                       <label>Billing Address</label>
                                       <template>{{BillingStreet}} &lt;br&gt; {{BillingCity}}{{#BillingCity}},{{/BillingCity}} {{BillingState}} &lt;br&gt; {{BillingCountry}} &lt;br&gt; {{BillingPostalCode}}

                                    </template>
                                    </field>
                                    <field type="COMBO" allowhtml="true">
                                       <label>Shipping Address</label>
                                       <template>{{ShippingStreet}} &lt;br&gt; {{ShippingCity}}{{#ShippingCity}},{{/ShippingCity}} {{ShippingState}} &lt;br&gt; {{ShippingCountry}} &lt;br&gt; {{ShippingPostalCode}}
                                    </template>
                                    </field>
                                 </fields>
                              </section>
                           </sections>
                        </column>
                        <column width="20%">
                           <sections>
                              <section title="Internal Information">
                                 <fields>
                                    <field id="Rating"/>
                                 </fields>
                              </section>
                              <section title="System Information">
                                 <fields>
                                    <field id="OwnerId">
                                       <label>Account Owner</label>
                                       <filters/>
                                    </field>
                                    <field id="CreatedDate"/>
                                    <field type="COMBO">
                                       <label>Last Modified</label>
                                       <template>By: {{LastModifiedById}} on {{LastModifiedDate}}</template>
                                    </field>
                                 </fields>
                              </section>
                           </sections>
                        </column>
                     </columns>
                  </basicfieldeditor>
               </components>
            </tab>
            <tab name="Contacts" icon="sk-icon-contact">
               <components>
                  <skootable showconditions="true" showsavecancel="false" searchmethod="server" searchbox="true" showexportbuttons="false" pagesize="10" createrecords="true" model="Contact" mode="read">
                     <fields>
                        <field id="FirstName" allowordering="true"/>
                        <field id="LastName" allowordering="true"/>
                        <field id="Title"/>
                        <field id="Email"/>
                        <field id="Phone"/>
                        <field id="Business_Phone_Extension__c" valuehalign="" type="">
                           <label>Ext.</label>
                        </field>
                        <field id="MobilePhone"/>
                     </fields>
                     <rowactions>
                        <action type="edit"/>
                        <action type="delete"/>
                        <action type="redirect" label="View Profile" url="/{{Id}}" icon="ui-silk-user-go"/>
                        <action type="redirect" label="Send Email" url="/_ui/core/email/author/EmailAuthor?p2_lkid={{Id}}&amp;rtype={{Model.KeyPrefix}}&amp;retURL=%2F{{Id}}" icon="ui-silk-email-go" window="self"/>
                     </rowactions>
                     <massactions usefirstitemasdefault="false" defaulticon="ui-silk-application-cascade">
                        <action type="massupdate"/>
                        <action type="massdelete"/>
                        <action type="popup" window="self" label="Mass Email Selected Contacts" icon="ui-silk-email-go">
                           <popup title="New Popup" width="800">
                              <components/>
                           </popup>
                        </action>
                     </massactions>
                     <views>
                        <view type="standard"/>
                     </views>
                     <actions defaultlabel="Options" defaulticon="ui-silk-text-list-bullets" usefirstitemasdefault="true">
                        <action type="redirect" label="Merge Contacts" url="/merge/conmergewizard.jsp?retURL=%2F{{$Param.id}}%3Fnooverride%3D1&amp;id={{$Param.id}}" icon="ui-silk-arrow-merge"/>
                        <action type="redirect" label="New Contact" url="/{{Model.KeyPrefix}}/e?retURL=%2F{{$Param.id}}&amp;accid={{$Param.id}}" icon="ui-silk-group-add" window="self"/>
                     </actions>
                     <filters>
                        <filter type="toggle" filteroffoptionlabel="All Contacts" createfilteroffoption="true" label="My Contacts">
                           <effects>
                              <effect action="activate" value="" condition="OwnerId"/>
                           </effects>
                        </filter>
                     </filters>
                  </skootable>
               </components>
               <components/>
            </tab>
            <tab name="Partners" icon="sk-icon-members">
               <components>
                  <skootable showconditions="true" showsavecancel="false" searchmethod="server" searchbox="true" showexportbuttons="false" pagesize="10" createrecords="true" model="Partners" mode="read">
                     <fields>
                        <field id="AccountFromId" allowordering="true">
                           <label>Partner</label>
                        </field>
                        <field id="OpportunityId" allowordering="false" type="REFPICK">
                           <label>Opportunity</label>
                           <filters>
                              <filter type="dependent" operator="=" field="AccountId" value="" depfield="AccountToId"/>
                           </filters>
                        </field>
                        <field id="Role" allowordering="false"/>
                        <field id="CreatedDate" allowordering="true">
                           <label>Created Date</label>
                        </field>
                     </fields>
                     <rowactions>
                        <action type="edit"/>
                        <action type="delete"/>
                     </rowactions>
                     <massactions usefirstitemasdefault="true">
                        <action type="massupdate"/>
                        <action type="massdelete"/>
                     </massactions>
                     <views>
                        <view type="standard"/>
                     </views>
                  </skootable>
               </components>
            </tab>
            <tab name="Opportunities" icon="fa-usd">
               <components>
                  <skootable showconditions="true" showsavecancel="false" searchmethod="server" searchbox="true" showexportbuttons="false" pagesize="10" createrecords="true" model="Opportunities" mode="read">
                     <fields>
                        <field id="Name" allowordering="true"/>
                        <field id="Amount"/>
                        <field id="StageName"/>
                        <field id="IsClosed"/>
                        <field id="CloseDate" allowordering="true"/>
                     </fields>
                     <rowactions>
                        <action type="edit"/>
                        <action type="delete"/>
                     </rowactions>
                     <massactions usefirstitemasdefault="false" defaulticon="ui-silk-application-cascade">
                        <action type="massupdate"/>
                     </massactions>
                     <views>
                        <view type="standard"/>
                     </views>
                     <filters>
                        <filter type="toggle" filteroffoptionlabel="Closed &amp; Open" createfilteroffoption="true" condition="IsClosed" label="Open Opportunities">
                           <effects>
                              <effect action="activate" value="" condition="IsClosed"/>
                           </effects>
                        </filter>
                        <filter type="select" filteroffoptionlabel="All Amounts" createfilteroffoption="true" condition="AmountCondition">
                           <sources>
                              <source type="metadata"/>
                           </sources>
                        </filter>
                     </filters>
                     <actions defaultlabel="Options" defaulticon="ui-silk-text-list-bullets" usefirstitemasdefault="true">
                        <action type="redirect" label="New Opportunity" url="/{{Model.KeyPrefix}}/e?retURL=%2F{{$Param.id}}&amp;accid={{$Param.id}}" icon="ui-silk-coins-add" window="self"/>
                     </actions>
                  </skootable>
               </components>
            </tab>
            <tab name="Assets" icon="sk-icon-assets" uniqueid="Assets">
               <components>
                  <skootable showconditions="true" showsavecancel="false" searchmethod="server" searchbox="true" showexportbuttons="false" pagesize="10" createrecords="true" model="Assets" mode="read">
                     <fields>
                        <field id="Name"/>
                        <field id="Description"/>
                        <field id="PurchaseDate"/>
                        <field id="InstallDate"/>
                        <field id="Product2Id"/>
                        <field id="Quantity"/>
                        <field id="IsCompetitorProduct"/>
                        <field id="Status"/>
                     </fields>
                     <rowactions>
                        <action type="edit"/>
                        <action type="delete"/>
                     </rowactions>
                     <massactions usefirstitemasdefault="true">
                        <action type="massupdate"/>
                        <action type="massdelete"/>
                     </massactions>
                     <views>
                        <view type="standard"/>
                     </views>
                  </skootable>
               </components>
            </tab>
            <tab name="Cases" icon="fa-bug">
               <components>
                  <skootable showconditions="true" showsavecancel="false" searchmethod="server" searchbox="true" showexportbuttons="false" pagesize="10" createrecords="true" model="Cases" mode="read">
                     <fields>
                        <field id="CaseNumber" allowordering="true">
                           <label>Case</label>
                        </field>
                        <field id="Subject"/>
                        <field id="ContactId" allowordering="true">
                           <label>Contact</label>
                        </field>
                        <field id="Type"/>
                        <field id="Description"/>
                        <field id="Priority" allowordering="true"/>
                        <field id="CreatedDate" allowordering="true">
                           <label>Date Opened</label>
                        </field>
                     </fields>
                     <rowactions>
                        <action type="edit"/>
                        <action type="delete"/>
                        <action type="redirect" label="Close Case" icon="ui-silk-folder-bug" url="/{{Id}}/s?retURL=%2F{{$Param.id}}" window="self"/>
                     </rowactions>
                     <massactions usefirstitemasdefault="false" defaulticon="ui-silk-application-cascade">
                        <action type="massupdate"/>
                        <action type="massdelete"/>
                     </massactions>
                     <views>
                        <view type="standard"/>
                     </views>
                     <filters>
                        <filter type="select" filteroffoptionlabel="All Types" createfilteroffoption="true" condition="Type">
                           <sources>
                              <source type="metadata"/>
                           </sources>
                        </filter>
                        <filter type="select" filteroffoptionlabel="All Priorities" createfilteroffoption="true" condition="Priority">
                           <sources>
                              <source type="metadata" suffix=" Priority"/>
                           </sources>
                        </filter>
                     </filters>
                     <actions defaultlabel="Options" defaulticon="ui-silk-text-list-bullets" usefirstitemasdefault="true">
                        <action type="redirect" window="self" label="New Case" icon="ui-silk-bug-add" url="/{{Model.KeyPrefix}}/e?retURL=%2F{{$Param.id}}&amp;accid={{$Param.id}}&amp;contactid={{$Model.Contact.data.0.Id}}"/>
                     </actions>
                  </skootable>
               </components>
            </tab>
            <tab name="Activities" icon="fa-tasks">
               <components>
                  <tabset rememberlastusertab="true">
                     <tabs>
                        <tab name="Tasks" icon="ui-silk-tick">
                           <components>
                              <template model="TaskData" multiple="true" allowhtml="true">
                                 <contents>&lt;div class="nx-editor-header-title"&gt;Open Tasks&lt;/div&gt;</contents>
                              </template>
                              <skootable showconditions="true" showsavecancel="false" searchmethod="server" searchbox="true" showexportbuttons="false" pagesize="10" createrecords="true" model="OpenTasks" mode="read">
                                 <fields>
                                    <field id="OwnerId" type="REFPICK">
                                       <label>Assigned To</label>
                                       <filters>
                                          <filter enclosevalueinquotes="false" type="fieldvalue" field="IsActive" value="true"/>
                                          <filter enclosevalueinquotes="true" type="fieldvalue" field="Profile.UserLicense.LicenseDefinitionKey" value="SFDC"/>
                                       </filters>
                                    </field>
                                    <field id="WhoId" type="CUSTOM" snippet="WhoIdJustContacts" optionsource="">
                                       <label>Contact</label>
                                       <filters>
                                          <filter type="modelmerge" operator="=" field="AccountId" fieldtargetobjects="Contact" value="" model="AccountData" enclosevalueinquotes="true" mergefield="Id"/>
                                       </filters>
                                    </field>
                                    <field id="Subject" columnwidth="20%"/>
                                    <field id="Status"/>
                                    <field id="Priority"/>
                                    <field id="ActivityDate">
                                       <label>Activity Date</label>
                                    </field>
                                 </fields>
                                 <rowactions>
                                    <action type="edit"/>
                                    <action type="delete"/>
                                    <action type="custom" snippet="tasks.markCompleted" label="Mark Completed" icon="ui-silk-tick"/>
                                    <action type="popup" window="self" icon="ui-silk-comments" label="Conversation Details">
                                       <popup title="Description of Open Task" width="800">
                                          <components>
                                             <basicfieldeditor showheader="true" showsavecancel="true" model="OpenTasks" mode="edit" layout="above">
                                                <columns>
                                                   <column width="100%">
                                                      <sections>
                                                         <section title="">
                                                            <fields>
                                                               <field id="Description">
                                                                  <label>Comments</label>
                                                               </field>
                                                            </fields>
                                                         </section>
                                                      </sections>
                                                   </column>
                                                </columns>
                                                <conditions>
                                                   <condition type="contextrow" field="Id" autocreated="true"/>
                                                </conditions>
                                             </basicfieldeditor>
                                          </components>
                                       </popup>
                                    </action>
                                 </rowactions>
                                 <massactions usefirstitemasdefault="true">
                                    <action type="massupdate"/>
                                    <action type="massdelete"/>
                                    <action type="custom" label="Mark Completed" icon="ui-silk-tick" snippet="tasks.markCompleted"/>
                                 </massactions>
                                 <views>
                                    <view type="standard"/>
                                 </views>
                                 <actions defaultlabel="Global Actions" defaulticon="ui-silk-wand" usefirstitemasdefault="true">
                                    <action type="redirect" label="Send Email" url="/_ui/core/email/author/EmailAuthor?p2_lkid={{#$Model.AccountData.data}}{{Id15}}{{/$Model.AccountData.data}}&amp;p3_lkid={{$Model.AccountData.data.0.Id15}}&amp;retURL=%2F{{$Param.id}}" icon="ui-silk-email-go" window="self"/>
                                 </actions>
                              </skootable>
                              <template model="TaskHistory" multiple="true" allowhtml="true">
                                 <contents>&lt;div class="nx-editor-header-title"&gt;Completed Tasks&lt;/div&gt;</contents>
                              </template>
                              <skootable showconditions="true" showsavecancel="false" searchmethod="server" searchbox="true" showexportbuttons="false" pagesize="10" createrecords="true" model="TaskHistory" mode="read">
                                 <fields>
                                    <field id="OwnerId" type="REFPICK" required="true">
                                       <label>Assigned To</label>
                                       <filters>
                                          <filter enclosevalueinquotes="false" type="fieldvalue" field="IsActive" value="true"/>
                                          <filter enclosevalueinquotes="true" type="fieldvalue" field="Profile.UserLicense.LicenseDefinitionKey" value="SFDC"/>
                                       </filters>
                                    </field>
                                    <field id="WhoId" type="CUSTOM" snippet="WhoIdJustContacts">
                                       <label>Contact</label>
                                       <filters>
                                          <filter type="modelmerge" operator="=" field="AccountId" fieldtargetobjects="Contact" value="" model="AccountData" enclosevalueinquotes="true" mergefield="Id"/>
                                       </filters>
                                    </field>
                                    <field id="Subject" columnwidth="20%"/>
                                    <field id="Status"/>
                                    <field id="Priority"/>
                                    <field id="ActivityDate" allowordering="true">
                                       <label>Activity Date</label>
                                    </field>
                                 </fields>
                                 <rowactions>
                                    <action type="edit"/>
                                    <action type="delete"/>
                                    <action type="popup" snippet="ViewFullConversation" label="View Full Conversation" icon="ui-silk-comments">
                                       <popup title="{{Subject}}" width="800">
                                          <components>
                                             <basicfieldeditor showheader="true" showsavecancel="true" model="TaskHistory" mode="read" layout="above">
                                                <columns>
                                                   <column width="100%">
                                                      <sections>
                                                         <section title="Details / Description">
                                                            <fields>
                                                               <field id="Description"/>
                                                            </fields>
                                                         </section>
                                                      </sections>
                                                   </column>
                                                </columns>
                                                <conditions>
                                                   <condition type="contextrow" field="Id" autocreated="true"/>
                                                </conditions>
                                             </basicfieldeditor>
                                          </components>
                                       </popup>
                                    </action>
                                 </rowactions>
                                 <massactions usefirstitemasdefault="true">
                                    <action type="massupdate"/>
                                    <action type="massdelete"/>
                                 </massactions>
                                 <views>
                                    <view type="standard"/>
                                 </views>
                                 <actions defaultlabel="Global Actions" defaulticon="ui-silk-wand" usefirstitemasdefault="true">
                                    <action type="custom" window="self" snippet="PHC" appendorprepend="prepend" label="Phone Call" icon="ui-silk-phone-sound"/>
                                    <action type="custom" window="self" label="Email " snippet="EML" icon="ui-silk-email"/>
                                    <action type="custom" window="self" label="Web Conference" snippet="WBC" icon="ui-silk-computer-link"/>
                                    <action type="custom" window="self" label="Voice Mail" snippet="VML" icon="ui-silk-telephone-edit"/>
                                 </actions>
                              </skootable>
                           </components>
                        </tab>
                        <tab name="Campaign History" icon="ui-silk-script-go">
                           <components>
                              <skootable showconditions="true" showsavecancel="false" searchmethod="server" searchbox="false" showexportbuttons="false" pagesize="10" createrecords="true" model="Campaigns" mode="read">
                                 <fields>
                                    <field id="ContactId"/>
                                    <field id="CampaignId"/>
                                    <field id="Status"/>
                                    <field id="HasResponded"/>
                                    <field id="CreatedDate"/>
                                 </fields>
                                 <rowactions>
                                    <action type="edit"/>
                                    <action type="delete"/>
                                 </rowactions>
                                 <massactions usefirstitemasdefault="true">
                                    <action type="massupdate"/>
                                    <action type="massdelete"/>
                                 </massactions>
                                 <views>
                                    <view type="standard"/>
                                 </views>
                              </skootable>
                           </components>
                        </tab>
                     </tabs>
                  </tabset>
               </components>
            </tab>
            <tab name="Calendar" icon="fa-calendar">
               <components>
                  <skoocal rememberdate="true" rememberview="true">
                     <sources>
                        <eventsource name="Events" model="Event" color="" createable="true" updateable="true" deleteable="true" eventclickhandler="autopopup" namefield="Subject" startfield="StartDateTime" endfield="EndDateTime"/>
                     </sources>
                     <views>
                        <eventview type="month"/>
                        <eventview type="week"/>
                     </views>
                  </skoocal>
               </components>
            </tab>
            <tab name="Chatter" icon="fa-comments">
               <components>
                  <social model="AccountData"/>
               </components>
            </tab>
            <tab name="Notes &amp; Attachments" icon="sk-icon-attachments" loadlazypanels="false">
               <components>
                  <tabset rememberlastusertab="true" renderas="">
                     <tabs>
                        <tab name="Notes" icon="ui-silk-note">
                           <components>
                              <skootable showconditions="true" showsavecancel="false" searchmethod="server" searchbox="true" showexportbuttons="false" pagesize="10" createrecords="true" model="Notes" mode="read">
                                 <fields>
                                    <field id="Title"/>
                                    <field id="Body"/>
                                    <field type="COMBO">
                                       <label>Last Modified</label>
                                       <template>{{LastModifiedDate}} by {{LastModifiedById}}</template>
                                    </field>
                                    <field type="COMBO">
                                       <label>Created</label>
                                       <template>{{CreatedDate}} by {{CreatedBy.Name}}</template>
                                    </field>
                                 </fields>
                                 <rowactions>
                                    <action type="edit"/>
                                    <action type="delete"/>
                                 </rowactions>
                                 <massactions usefirstitemasdefault="true">
                                    <action type="massupdate"/>
                                    <action type="massdelete"/>
                                 </massactions>
                                 <views>
                                    <view type="standard"/>
                                 </views>
                              </skootable>
                           </components>
                        </tab>
                        <tab name="Attachments" icon="ui-silk-attach">
                           <components>
                              <skootable showconditions="true" showsavecancel="false" searchmethod="server" searchbox="true" showexportbuttons="false" pagesize="10" createrecords="false" model="Attachments" mode="read">
                                 <fields>
                                    <field id="Name" valuehalign="" type=""/>
                                    <field id="ContentType" valuehalign="" type=""/>
                                    <field id="BodyLength" readonly="true" valuehalign="" type="">
                                       <label>Size (bytes)</label>
                                    </field>
                                    <field id="Description" maxdisplaycharacters="100" valuehalign="" type=""/>
                                    <field type="COMBO" valuehalign="">
                                       <label>Last Modified</label>
                                       <template>{{LastModifiedDate}} by {{LastModifiedById}}</template>
                                    </field>
                                    <field type="COMBO" valuehalign="">
                                       <label>Created</label>
                                       <template>{{CreatedDate}} by {{CreatedById}}</template>
                                    </field>
                                 </fields>
                                 <rowactions>
                                    <action type="edit"/>
                                    <action type="delete"/>
                                    <action type="redirect" label="View Attachment" url="/servlet/servlet.FileDownload?file={{{Id}}}" icon="ui-silk-report-go" window="blank"/>
                                 </rowactions>
                                 <massactions usefirstitemasdefault="true">
                                    <action type="massupdate"/>
                                    <action type="massdelete"/>
                                 </massactions>
                                 <views>
                                    <view type="standard"/>
                                 </views>
                                 <actions defaultlabel="Global Actions" defaulticon="ui-silk-wand" usefirstitemasdefault="true">
                                    <action type="redirect" label="Attach New Files" url="/p/attach/NoteAttach?pid={{$Param.id}}&amp;parentname={{$Model.AccountData.data.0.Name}}&amp;retURL=%2F{{$Param.id}}" icon="ui-silk-add" window="self"/>
                                 </actions>
                              </skootable>
                           </components>
                        </tab>
                        <tab name="Google Drive" loadlazypanels="false">
                           <components>
                              <template multiple="false" model="AccountData" allowhtml="true">
                                 <contents>&lt;iframe src="https://mblazonry--igd.na16.visual.force.com/apex/Accounts_Component?id={{{Id}}}&amp;isdtp=nv"; width="100%" height="600px" frameborder="0"&gt;&lt;/iframe&gt;</contents>
                              </template>
                           </components>
                        </tab>
                     </tabs>
                  </tabset>
               </components>
            </tab>
         </tabs>
      </tabset>
   </components>
   <resources>
      <labels/>
<style>
<css>
         <cssitem location="inline" name="tableDropDown" cachelocation="false">.hidetablefooter .nx-list-footer {
   display: none;
}

.nx-actionbutton {
    float: right;
    background-color: #F2F2F2;
    color: #444;
}

.nx-actionselect-arrow {
    border-left-color: #2E6E9E;
}

.nx-actionselect, .nx-actionbutton {
    margin-top: -3px;
    box-shadow: 0 0 6px 2px #ddd;
    border-bottom: 3px solid #0097a7;
}

/*
.nx-actionbutton {
    float: right;
    background-color: #F2F2F2;
    color: #444;
}

.nx-actionselect-arrow {
    border-left-color: #2E6E9E;
}

.nx-actionselect, .nx-actionbutton {
    margin-top: -3px;
    box-shadow: 0 0 6px 2px #ddd;
    border-bottom: 3px solid #0097a7;
}
*/</cssitem>
      </css>
</style>
<script>
<javascript>
         <jsitem location="inline" name="markCompleted" url="">skuid.snippet.registerSnippet('tasks.markCompleted',function(params){
                // Mark all selected items as closed,
                // then save our 2 Tasks models
                var model = params.model,
                    list = params.list,
                    selectedItems = params.item ? [params.item] : list.getSelectedItems();
                if (selectedItems.length === 1 &amp;&amp; skuid.model.isNewId(selectedItems[0].row.Id)) {
                    alert('Please finish creating this Task before marking it as completed.');
                    return;
                }
                $j.each(selectedItems,function(i,item){
                    model.updateRow(item.row,'Status','Completed');
                });
                // Block the list from having updates
                list.element.block({
                    css: list.blockUICSS, overlayCSS: list.blockOverlayCSS,
                    message:'Marking Tasks as Completed...'
                });

                var saveFinishes = model.save({callback:
                    function(){
                        var updateFinishes = skuid.model.updateData([model,skuid.model.getModel('TaskHistory')]);
                        $j.when(updateFinishes).then(
                            function(){ list.element.unblock(); },
                            function(){ list.element.unblock(); }
                        );
                    }
                });

            });</jsitem>
         <jsitem location="inline" name="fix url">;(function(skuid){
    var renderers = skuid.ui.fieldRenderers,
        urlRenderer = renderers.URL = {
            read : function(field,value){
                if (!value &amp;&amp; (value !== 0)) value = '';
                if (value !== '' &amp;&amp; value.length &lt; 7 || value.substring(0,4) != 'http') {
                    value = 'http://' + value;
                }
                var maxChars = 20,
                    originalValue = value;
        		if (maxChars &lt; value.length) value = value.substring(0,maxChars) + '...';
                if (value !== '') value = '&lt;a href="'+ originalValue +'"&gt;'+value+'&lt;/a&gt;';
                field.element.html(
            		'&lt;div class="nx-fieldtext"&gt;' + skuid.utils.nl2br(value)
        			+ ((field.editable) ? '&lt;div class="focusbox" tabindex="0"/&gt;' : '')
        			+ '&lt;/div&gt;'
        		);
            },
            edit: function(field,value) {
                renderers.TEXT.edit(field,value);
            }
        };
})(skuid);</jsitem>
         <jsitem location="inlinesnippet" name="NewCompletedTask" cachelocation="false" url="">var TaskModel = skuid.model.getModel('TaskHistory');

var self = arguments[0];
var $ = skuid.$;

// Create a new Task in our Task Model
var NewTask = TaskModel.createRow({
  initiatorId : self.list._GUID,
  additionalConditions : self.list.options.conditions
});

var defaults = {
    'Priority':'Normal',
    'Status':'Completed',
    'OwnerId': skuid.utils.userInfo.userId,
    'Owner.Name': skuid.utils.userInfo.userName,
    'ActivityDate': skuid.time.getSFDate(new Date())
};

if (self.defaults) {
    $.extend(defaults,self.defaults);
}

TaskModel.updateRow(NewTask,defaults);

// Create a new Item in our Table (wrapper around the new Task row)
var newItem = self.list.newItem(
   NewTask,
   { editModeForNewItems : true }
);
self.list.render({
   resetPagination : true
   ,refreshFields : false
});

// Focus on the Subject field
$.each(newItem.fields,function(){
    if (this.id === 'Subject'){
        var inputElement = this.element.find(':input').first();
        inputElement &amp;&amp; inputElement.focus();
    }
});
</jsitem>
         <jsitem location="inlinesnippet" name="PHC" cachelocation="false" url="">var params = arguments[0];

// This is where you set the defaults you want
params.defaults = {
    'Subject':'Phone Call: '
};

skuid.snippet.getSnippet('NewCompletedTask')(params);</jsitem>
         <jsitem location="inlinesnippet" name="EML" cachelocation="false" url="">var params = arguments[0];

// This is where you set the defaults you want
params.defaults = {
    'Subject':'Email: '
};

skuid.snippet.getSnippet('NewCompletedTask')(params);</jsitem>
         <jsitem location="inlinesnippet" name="WBC" cachelocation="false" url="">var params = arguments[0];

// This is where you set the defaults you want
params.defaults = {
    'Subject':'Web Conference: '
};

skuid.snippet.getSnippet('NewCompletedTask')(params);</jsitem>
         <jsitem location="inlinesnippet" name="VML" cachelocation="false" url="">var params = arguments[0];

// This is where you set the defaults you want
params.defaults = {
    'Subject':'Voicemail: '
};

skuid.snippet.getSnippet('NewCompletedTask')(params);</jsitem>
         <jsitem location="inlinesnippet" name="WhoIdJustContacts" cachelocation="false" url="">//
// CONFIGURATION
//
// Define the possible target objects
var targetObjects = ['Contact'];
// Render as a Picklist instead of an Autocomplete?
var renderAsPicklist = true;

var field = arguments[0],
    value = skuid.utils.decodeHTML(arguments[1]),
    metadata = field.metadata,
    $ = skuid.$;
if (field.mode == 'edit') {
    // Limit the set of target objects
    var targets = [],
        uniqueTargets = {};
    $.each(metadata.referenceTo,function(i,r){
        if (($.inArray(r.objectName,targetObjects) != -1)
        &amp;&amp; (!uniqueTargets[r.objectName])) {
            targets.push(r);
            uniqueTargets[r.objectName] = 1;
            if (targets.length == targetObjects.length) return false;
        }
    });
    if (targets.length) {
        // Make this field render as a picklist?
        if (renderAsPicklist) field.options.type = 'REFPICK';
        // Override the current referenceTo
        metadata.referenceTo.length = 0;
        var ref = [];
        $.each(targets,function(){
            ref.push(this.objectName);
        });
        metadata.ref = ref.join();
        metadata.referenceTo = targets;
    }
}
// Run the standard renderer
skuid.ui.fieldRenderers[metadata.displaytype][field.mode](field,value);</jsitem>
         <jsitem location="inlinesnippet" name="saveNewItemsInPopup" cachelocation="false" url="">var $ = skuid.$,
    params = arguments[0],
    component = params.component,
    popup = component.editor.element.closest('.ui-dialog-content'),
    modelsToSave = [],
    objLabelsToSave = [],
    uniqueModels = {};

popup.children().each(function(){
    var obj = $(this).data('object');
    if (obj &amp;&amp; obj.model &amp;&amp; !uniqueModels[obj.model.id]) {
        var model = obj.model;
        modelsToSave.push(model);
        if (model.data &amp;&amp; model.data.length) {
            if (model.data.length&gt;1) {
                objLabelsToSave.push(model.labelPlural);
            } else {
                objLabelsToSave.push(model.label);
            }
        }
        uniqueModels[obj.model.id] = 1;
    }
});

var message = 'Saving new ';
if (objLabelsToSave.length &lt; 3) {
    message += objLabelsToSave.join(' and ');
} else {
    var lastObj = objLabelsToSave.pop();
    message += objLabelsToSave.join(', ');
    message += ', and ' + lastObj;
}
message += '...';
popup.block({
    message: message
});

skuid.model.save(modelsToSave,{callback:function(result){
    if (result.totalsuccess){

        // Refresh the data in related Models on the page
        var uniqueRelatedObjectsToCheck = {},
            relatedModelsToUpdate = [];

        $.each(modelsToSave,function(){
            if (this.objectName &amp;&amp; !uniqueRelatedObjectsToCheck[this.objectName]) {
                uniqueRelatedObjectsToCheck[this.objectName] = 1;
            }
        });

        // Loop over all Models,
        // including the Models we've already saved,
        // and find ones that are on the same objects as the ones we've already saved.
        // Update them if they do not have unsaved changes.
        $.each(skuid.model.list(),function(){
            if (uniqueRelatedObjectsToCheck[this.objectName]
            &amp;&amp; !this.hasChanged) {
                relatedModelsToUpdate.push(this);
            }
        });

        $.when(skuid.model.updateData(relatedModelsToUpdate)).then(function(){
            $.each(popup.children(),function(){
                var obj = $(this).data('object');
                if (obj &amp;&amp; obj.unregister) obj.unregister();
            });
            popup.dialog('destroy');

            // Create new Rows in our Models to Save,
            // to prepare for the NEXT time someone creates a new record
            $.each(modelsToSave,function(){
                this.createRow();
            });

        });
    } else {
        popup.unblock();
    }
}});
</jsitem>
      </javascript>
</script>
   </resources>
</skuidpage>