The SFDC lead convert page has that magnifying glass icon that auto searches related accounts in a drop down. Is there way to have the same functionality on a skuid page that autopopulates a search field?
Page 1 / 1
Jamie,
You can do something similar with Skuid’s action framework. Here is a page that demonstrates this. It has a button that sets a condition on an Account model using the Company field from the Lead. The next action queries the model to find any matches.
<skuidpage unsavedchangeswarning="yes" personalizationmode="server" useviewportmeta="true" showsidebar="true" showheader="true" tabtooverride="Lead"> <models>
<model id="Lead" limit="1" query="true" createrowifnonefound="false" datasourcetype="salesforce" datasource="salesforce" sobject="Lead">
<fields>
<field id="FirstName"/>
<field id="LastName"/>
<field id="Company"/>
<field id="CreatedDate"/>
</fields>
<conditions>
<condition type="param" enclosevalueinquotes="true" operator="=" field="Id" value="id"/>
</conditions>
<actions/>
</model>
<model id="SimilarAccounts" limit="20" query="false" createrowifnonefound="false" datasource="salesforce" type="" sobject="Account">
<fields>
<field id="Name"/>
<field id="Id"/>
</fields>
<conditions>
<condition type="fieldvalue" value="" enclosevalueinquotes="true" field="Name" operator="contains" state="filterableoff" inactive="true" name="NameFilter"/>
</conditions>
<actions/>
</model>
</models>
<components>
<pagetitle model="Lead" uniqueid="sk-3j3g8B-97">
<maintitle>
<template>{{FirstName}} {{LastName}} {{Company}}</template>
</maintitle>
<subtitle>
<template>{{Model.label}}</template>
</subtitle>
<actions>
<action type="multi" label="Look for Similar Accounts" icon="sk-icon-search">
<actions>
<action type="setCondition" model="SimilarAccounts" condition="NameFilter" value="{{Company}}"/>
<action type="requeryModel" model="SimilarAccounts" behavior="standard"/>
</actions>
</action>
<action type="savecancel" window="self"/>
</actions>
</pagetitle>
<panelset type="custom" uniqueid="sk-3j3n1W-130" scroll="">
<panels>
<panel width="50%">
<components>
<basicfieldeditor showsavecancel="false" showheader="true" model="Lead" mode="read" uniqueid="sk-3j3g8B-98" buttonposition="">
<columns>
<column width="100%">
<sections>
<section title="Basics">
<fields>
<field id="FirstName"/>
<field id="LastName"/>
<field id="Company" valuehalign="" type=""/>
</fields>
</section>
</sections>
</column>
</columns>
</basicfieldeditor>
</components>
</panel>
<panel width="50%">
<components>
<skootable showconditions="true" showsavecancel="false" showerrorsinline="true" searchmethod="server" searchbox="false" showexportbuttons="false" pagesize="10" createrecords="false" model="SimilarAccounts" buttonposition="" mode="readonly" allowcolumnreordering="false" uniqueid="sk-3j5L_L-221" emptysearchbehavior="query">
<fields>
<field id="Name" hideable="true" uniqueid="fi-3j5PD1-245"/>
</fields>
<rowactions/>
<massactions usefirstitemasdefault="true"/>
<views>
<view type="standard"/>
</views>
<searchfields/>
</skootable>
</components>
</panel>
</panels>
</panelset>
</components>
<resources>
<labels/>
<css/>
<javascript/>
</resources>
<styles>
<styleitem type="background" bgtype="none"/>
</styles>
</skuidpage>
Thanks,
Bill
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.