Duplicate field editor /component

  • 2
  • Problem
  • Updated 2 years ago
  • In Progress
Duplicate field editor/component appearing quite frequently even though associated model (component's model) contains only one row. 

Please see the screen shot.



Thanks.
Photo of Jnanendra Pande

Jnanendra Pande

  • 160 Points 100 badge 2x thumb

Posted 2 years ago

  • 2
Photo of Amy Dewaal

Amy Dewaal, Official Rep

  • 8,200 Points 5k badge 2x thumb
Jnanendra,

What version of Skuid are you on?
Are there multiple field editors on the page for different scenarios that use render conditions? I'm wondering if a render condition is acting weird somewhere.
Could you post a screenshot of your page in the pagebuilder so we can see how it's set up?

Thanks!
Amy
Photo of Jnanendra Pande

Jnanendra Pande

  • 160 Points 100 badge 2x thumb
Hi Amy, 

I am on skuid version 8.15.15.  Duplicate component appears not only for field editor but also other components (eg. table, wizard etc.) and there is only one component on the page. Today I saw duplicate table; please see screenshot and page xml. 


Screenshot:




Xml:

<skuidpage unsavedchangeswarning="" personalizationmode="server" showsidebar="false" showheader="false" theme="PractiFI SPA Lightning">
    <models>
        <model id="ClientStages" limit="" query="false" createrowifnonefound="false" adapter="salesforce" type="" sobject="cloupra__Category__c">
            <fields>
                <field id="Id" uionly="true" displaytype="TEXT" label="Id" length="18" defaultValue="zzz" readonly="true"/>
                <field id="Name" uionly="true" displaytype="TEXT" label="Name" defaultValue="zzz" readonly="true"/>
                <field id="cloupra__Related_To__c" uionly="true" displaytype="TEXT" label="Related To"/>
            </fields>
            <conditions/>
            <actions/>
        </model>
        <model id="ClientSegments" limit="" query="false" createrowifnonefound="false" adapter="salesforce" type="" sobject="cloupra__Category__c">
            <fields>
                <field id="Id" uionly="true" displaytype="TEXT" label="Id" length="18" defaultValue="zzz" readonly="true"/>
                <field id="Name" uionly="true" displaytype="TEXT" label="Name" defaultValue="zzz" readonly="true"/>
                <field id="cloupra__Related_To__c" uionly="true" displaytype="TEXT" label="Related To"/>
            </fields>
            <conditions/>
            <actions/>
        </model>
        <model id="ClientEntityTypes" limit="" query="false" createrowifnonefound="false" adapter="salesforce" type="" sobject="cloupra__Category__c">
            <fields>
                <field id="Id" uionly="true" displaytype="TEXT" label="Id" length="18" defaultValue="zzz" readonly="true"/>
                <field id="Name" uionly="true" displaytype="TEXT" label="Name" defaultValue="zzz" readonly="true"/>
                <field id="cloupra__Related_To__c" uionly="true" displaytype="TEXT" label="Related To"/>
            </fields>
            <conditions/>
            <actions/>
        </model>
        <model id="Clients" limit="50" query="true" createrowifnonefound="false" adapter="salesforce" type="" sobject="Account" orderby="Name">
            <fields>
                <field id="Id"/>
                <field id="Name"/>
                <field id="ShippingCity"/>f
                <field id="ShippingState"/>
                <field id="cloupra__Client_Entity_Type__c"/>co
                <field id="cloupra__Client_Entity_Type__r.Name"/>
                <field id="cloupra__Client_Stage__r.Name"/>
                <field id="cloupra__Orgn_Segment__r.Name"/>
                <field id="Owner.SmallPhotoUrl"/>
                <field id="cloupra__Client_Stage__r.cloupra__Background_Colour__c"/>
                <field id="cloupra__Client_Stage__r.cloupra__Text_Colour__c"/>
                <field id="cloupra__Orgn_Segment__r.cloupra__Background_Colour__c"/>
                <field id="cloupra__Orgn_Segment__r.cloupra__Text_Colour__c"/>
                <field id="Owner.FirstName"/>
                <field id="Owner.LastName"/>
                <field id="ShippingCountry"/>
                <field id="cloupra__Client_Stage__r.cloupra__Border__c"/>
                <field id="cloupra__Orgn_Segment__r.cloupra__Border__c"/>
                <field id="cloupra__Primary_Contact__r.cloupra__LinkedIn_Photo__c"/>
                <field id="cloupra__Primary_Contact__r.cloupra__Photo_File__r.skuid__Url__c"/>
                <field id="cloupra__Primary_Contact__r.cloupra__Preferred_Full_Name__c"/>
            </fields>
            <conditions>
                <condition type="fieldvalue" value="" enclosevalueinquotes="true" field="cloupra__Client_Stage__c" state="filterableoff" inactive="true" name="cloupra__Client_Stage__c"/>
                <condition type="fieldvalue" value="" enclosevalueinquotes="true" field="cloupra__Orgn_Segment__c" state="filterableoff" inactive="true" name="cloupra__Orgn_Segment__c"/>
                <condition type="fieldvalue" value="" enclosevalueinquotes="true" field="cloupra__Client_Entity_Type__c" state="filterableoff" inactive="true" name="cloupra__Client_Entity_Type__c"/>
                <condition type="fieldvalue" value="" enclosevalueinquotes="false" field="CreatedDate" state="filterableoff" inactive="true" name="CreatedDate"/>
                <condition type="fieldvalue" value="Client" enclosevalueinquotes="true" field="cloupra__Orgn_Type__c"/>
                <condition type="param" value="teammemberId" field="OwnerId" operator="=" enclosevalueinquotes="true" novaluebehavior="deactivate"/>
            </conditions>
            <actions>
                <action>
                    <actions>
                        <action type="custom" snippet="pfi.syncConditions"/>
                    </actions>
                    <events>
                        <event>models.loaded</event>
                    </events>
                </action>
            </actions>
        </model>
        <model id="NAV_ChildState" limit="1" query="false" createrowifnonefound="true" adapter="salesforce" type="">
            <fields>
                <field id="context" uionly="true" displaytype="TEXT" label="context"/>
                <field id="tab" uionly="true" displaytype="TEXT" label="tab"/>
                <field id="action" uionly="true" displaytype="TEXT" label="action"/>
            </fields>
            <conditions/>
            <actions/>
        </model>
        <model id="NAV_ExtraConditions" limit="20" query="false" createrowifnonefound="false" adapter="salesforce" type="">
            <fields>
                <field id="name" uionly="true" displaytype="TEXT" label="name"/>
                <field id="value" uionly="true" displaytype="TEXT" label="value"/>
            </fields>
            <conditions/>
            <actions/>
        </model>
    </models>
    <components>
        <grid uniqueid="sk-a47-N-181">
            <divisions>
                <division behavior="flex" minwidth="100px" ratio="1">
                    <components>
                        <pficore__copymodeldatawithfilter uniqueid="sk-1h2jeT-262" model="ClientStages" parentmodel="CATEGORIESALL" relatedto="Client Stage"/>
                    </components>
                </division>
                <division behavior="flex" verticalalign="top" minwidth="100px" ratio="1">
                    <components>
                        <pficore__populatecategories uniqueid="sk-a4CoJ-196" model="ClientSegments" relatedto="Client Segment"/>
                    </components>
                </division>
                <division behavior="flex" verticalalign="top" minwidth="100px" ratio="1">
                    <components>
                        <pficore__populatecategories uniqueid="sk-a50Bd-203" model="ClientEntityTypes" relatedto="Client Entity Type"/>
                    </components>
                </division>
                <division behavior="flex" verticalalign="top" minwidth="100px" ratio="1">
                    <components/>
                </division>
            </divisions>
            <styles>
                <styleitem type="background" bgtype="none"/>
            </styles>
        </grid>
        <grid uniqueid="sk-1WOZEm-348">
            <divisions>
                <division behavior="flex" minwidth="100px" ratio="1" verticalalign="center">
                    <components>
                        <pagetitle uniqueid="sk-1WOc1q-358" model="Clients">
                            <maintitle>Clients</maintitle>
                            <actions/>
                        </pagetitle>
                    </components>
                </division>
                <division behavior="flex" verticalalign="center" minwidth="100px" ratio="1">
                    <components>
                        <template multiple="false" uniqueid="sk-1WOhYo-367" cssclass="pf-filter-message" model="" allowhtml="true">
                            <contents>{{$Param.message}}</contents>
                        </template>
                    </components>
                </division>
                <division behavior="flex" verticalalign="center" minwidth="100px" ratio="1">
                    <components>
                        <pagetitle model="Clients" uniqueid="sk-1KnKkU-168">
                            <actions>
                                <action type="custom" label="Clear Filters" icon="fa-eraser" snippet="pfi.clearFilters" secondary="true">
                                    <renderconditions logictype="and"/>
                                    <enableconditions logictype="and"/>
                                </action>
                            </actions>
                        </pagetitle>
                    </components>
                </division>
            </divisions>
            <styles>
                <styleitem type="background" bgtype="none"/>
            </styles>
        </grid>
        <skootable showconditions="true" showsavecancel="true" showerrorsinline="true" searchmethod="server" searchbox="true" showexportbuttons="false" pagesize="5" createrecords="false" model="Clients" buttonposition="" mode="read" uniqueid="sk-a47-N-189" emptysearchbehavior="query" searchplaceholdertext="Search..." allowscrollbars="false" floatheader="true" tablescrollheight="600px">
            <fields>
                <field type="COMBO" valuehalign="" allowhtml="true" readonly="true" allowordering="true" orderfield="Name">
                    <template>&lt;div class="pf-client-name pf-table-text-field"&gt;&lt;a href="/apex/practifi?context=client&amp;tab=basics&amp;action=view&amp;id1={{{Id}}}" class="changeStateOnClick"&gt;{{{Name}}}&lt;/a&gt;&lt;/div&gt;
&lt;div class="cell-float-left"&gt;
   {{#cloupra__Client_Stage__c}}&lt;div class="caption pf-stage" style="{{#cloupra__Client_Stage__r.cloupra__Background_Colour__c}}background-color: {{{cloupra__Client_Stage__r.cloupra__Background_Colour__c}}}; {{/cloupra__Client_Stage__r.cloupra__Background_Colour__c}}{{#cloupra__Client_Stage__r.cloupra__Text_Colour__c}}color: {{{cloupra__Client_Stage__r.cloupra__Text_Colour__c}}}; {{/cloupra__Client_Stage__r.cloupra__Text_Colour__c}}{{#cloupra__Client_Stage__r.cloupra__Border__c}}border: {{{cloupra__Client_Stage__r.cloupra__Border__c}}};{{/cloupra__Client_Stage__r.cloupra__Border__c}}"&gt;{{{cloupra__Client_Stage__r.Name}}}&lt;/div&gt;{{/cloupra__Client_Stage__c}}
&lt;/div&gt;
&lt;div class="cell-float-left"&gt;
   {{#cloupra__Orgn_Segment__c}}&lt;div class="caption pf-type" style="background-color: {{{cloupra__Orgn_Segment__r.cloupra__Background_Colour__c}}}; color: {{{cloupra__Orgn_Segment__r.cloupra__Text_Colour__c}}}; border: {{{cloupra__Orgn_Segment__r.cloupra__Border__c}}};"&gt;{{{cloupra__Orgn_Segment__r.Name}}}&lt;/div&gt;{{/cloupra__Orgn_Segment__c}}
&lt;/div&gt;</template>
                    <label>Client</label>
                </field>
                <field type="COMBO" valuehalign="" allowhtml="true" readonly="true" columnwidth="" allowordering="true" orderfield="cloupra__Primary_Contact__r.cloupra__Preferred_Full_Name__c">
                    <template>{{#cloupra__Primary_Contact__c}}
    &lt;a href="/apex/practifi?context=person&amp;tab=basics&amp;action=view&amp;id1={{{cloupra__Primary_Contact__c}}}" class="changeStateOnClick"&gt;
        &lt;div class="pf-flex-box"&gt;
            &lt;div class="cell-float-left"&gt;
                &lt;img class="pf-photothumb pf-photothumb-me" src="{{#cloupra__Primary_Contact__r.cloupra__LinkedIn_Photo__c}}
                   {{{cloupra__Primary_Contact__r.cloupra__LinkedIn_Photo__c}}}
                {{/cloupra__Primary_Contact__r.cloupra__LinkedIn_Photo__c}}
                {{^cloupra__Primary_Contact__r.cloupra__LinkedIn_Photo__c}}
                   {{#cloupra__Primary_Contact__r.cloupra__Photo_File__r}}
                      {{{cloupra__Primary_Contact__r.cloupra__Photo_File__r.skuid__Url__c}}}
                   {{/cloupra__Primary_Contact__r.cloupra__Photo_File__r}}
                   {{^cloupra__Primary_Contact__r.cloupra__Photo_File__r}}
                      /profilephoto/005/T
                   {{/cloupra__Primary_Contact__r.cloupra__Photo_File__r}}
                {{/cloupra__Primary_Contact__r.cloupra__LinkedIn_Photo__c}}"/&gt;
            &lt;/div&gt;
            &lt;div class="cell-float-left"&gt;
                {{{cloupra__Primary_Contact__r.cloupra__Preferred_Full_Name__c}}}
            &lt;/div&gt;
        &lt;/div&gt;
    &lt;/a&gt;
{{/cloupra__Primary_Contact__c}}</template>
                    <label>Primary Contact</label>
                </field>
                <field type="COMBO" valuehalign="" allowhtml="true" readonly="true" allowordering="true" orderfield="ShippingCity">
                    <label>Location</label>
                    <template>&lt;div&gt;{{#ShippingCity}}{{{ShippingCity}}} {{/ShippingCity}}{{{ShippingState}}}&lt;/div&gt;</template>
                </field>
                <field type="COMBO" valuehalign="" allowhtml="true" allowordering="true" orderfield="Owner.FirstName" readonly="true">
                    <label>Owner</label>
                    <template>&lt;a href="/apex/practifi?context=teammember&amp;tab=basics&amp;action=view&amp;id1={{{OwnerId}}}" class="changeStateOnClick"&gt;
    &lt;div class="pf-flex-box"&gt;
        &lt;div class="cell-float-left"&gt;
        	&lt;img class="pf-photothumb pf-photothumb-me" src="{{{Owner.SmallPhotoUrl}}}"/&gt;
        &lt;/div&gt;
        &lt;div class="cell-float-left"&gt;
           {{#Owner.FirstName}}{{{Owner.FirstName}}}&lt;br/&gt;{{/Owner.FirstName}}{{{Owner.LastName}}}
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/a&gt;</template>
                </field>
            </fields>
            <rowactions>
                <action type="multi" label="Edit" icon="fa-pencil">
                    <actions>
                        <action type="updateRow" fieldmodel="NAV_ChildState" field="context" enclosevalueinquotes="true" value="client"/>
                        <action type="updateRow" fieldmodel="NAV_ChildState" field="tab" enclosevalueinquotes="true" value="basics"/>
                        <action type="updateRow" fieldmodel="NAV_ChildState" field="action" enclosevalueinquotes="true" value="edit"/>
                        <action type="custom" snippet="pfi.processRowAction"/>
                    </actions>
                </action>
            </rowactions>
            <massactions usefirstitemasdefault="true">
                <action type="massdelete"/>
            </massactions>
            <views>
                <view type="standard"/>
            </views>
            <filters>
                <filter type="select" filteroffoptionlabel="STAGE" createfilteroffoption="true" affectcookies="true" autocompthreshold="25" conditionsource="manual" labelmode="no" condition="cloupra__Client_Stage__c">
                    <sources>
                        <source type="model" effectsbehavior="justdefault" model="ClientStages">
                            <labeltemplate>{{{Name}}}</labeltemplate>
                            <valuetemplate>{{Id}}</valuetemplate>
                        </source>
                    </sources>
                </filter>
                <filter type="select" filteroffoptionlabel="SEGMENT" createfilteroffoption="true" affectcookies="true" autocompthreshold="25" conditionsource="manual" labelmode="no" condition="cloupra__Orgn_Segment__c">
                    <sources>
                        <source type="model" effectsbehavior="justdefault" model="ClientSegments">
                            <labeltemplate>{{{Name}}}</labeltemplate>
                            <valuetemplate>{{Id}}</valuetemplate>
                        </source>
                    </sources>
                </filter>
                <filter type="select" filteroffoptionlabel="ENTITY TYPE" createfilteroffoption="true" affectcookies="true" autocompthreshold="25" conditionsource="manual" labelmode="no" condition="cloupra__Client_Entity_Type__c">
                    <sources>
                        <source type="model" effectsbehavior="justdefault" model="ClientEntityTypes">
                            <labeltemplate>{{{Name}}}</labeltemplate>
                            <valuetemplate>{{Id}}</valuetemplate>
                        </source>
                    </sources>
                </filter>
                <filter type="select" filteroffoptionlabel="CREATED" createfilteroffoption="true" affectcookies="true" autocompthreshold="25" conditionsource="manual" labelmode="no" condition="CreatedDate">
                    <sources>
                        <source type="manual" effectsbehavior="justdefault">
                            <options>
                                <option label="This Week" type="simple" value="THIS_WEEK"/>
                                <option label="This Month" type="simple" value="THIS_MONTH"/>
                                <option label="This Quarter" type="simple" value="THIS_QUARTER"/>
                                <option label="This Year" type="simple" value="THIS_YEAR"/>
                                <option label="This FY" type="simple" value="THIS_FISCAL_YEAR"/>
                            </options>
                        </source>
                    </sources>
                </filter>
            </filters>
            <searchfields/>
            <actions defaultlabel="Global Actions" defaulticon="sk-icon-magic" usefirstitemasdefault="true">
                <action type="multi" label="Add" icon="fa-plus">
                    <actions>
                        <action type="updateRow" fieldmodel="NAV_ChildState" field="context" enclosevalueinquotes="true" value="client"/>
                        <action type="updateRow" fieldmodel="NAV_ChildState" field="tab" enclosevalueinquotes="true" value="basics"/>
                        <action type="updateRow" fieldmodel="NAV_ChildState" field="action" enclosevalueinquotes="true" value="add"/>
                        <action type="createRow" model="NAV_ExtraConditions" appendorprepend="prepend" defaultmodefornewitems="edit">
                            <defaults>
                                <default type="fieldvalue" field="name" value="orgnType"/>
                                <default type="fieldvalue" field="value" value="Client"/>
                            </defaults>
                        </action>
                        <action type="custom" snippet="pfi.processGlobalAction"/>
                    </actions>
                </action>
            </actions>
        </skootable>
    </components>
    <resources>
        <labels/>
        <javascript>
            <jsitem location="inlinesnippet" name="clearFilters" cachelocation="false">var params = arguments[0];
var theModel = params.model;
$ = skuid.$;

$('#main-include').block({
	message: 'Cancelling filters...',
    css:{
		top:'80px'
	}
});			

$.each(theModel.conditions, function (i, condition) {
	if (condition.name) theModel.deactivateCondition(condition);
});

//Update the model and notify User of the progress
$.when(theModel.updateData()).then(function(){
    $('#main-include').unblock();
});</jsitem>
        </javascript>
        <css/>
    </resources>
    <styles>
        <styleitem type="background" bgtype="none"/>
    </styles>
</skuidpage>
 




Screenshot (wizard component): 


Xml:

<skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="false" showheader="false" theme="Lightning Design">    <models>
        <model id="NewClientProcess" limit="0" query="false" createrowifnonefound="true" sobject="cloupra__Applied_Process__c" adapter="salesforce" type="">
            <fields>
                <field id="Id"/>
                <field id="cloupra__Entity__c"/>
                <field id="cloupra__Entity__r.Name"/>
                <field id="cloupra__Service__c"/>
                <field id="cloupra__Service__r.Name"/>
                <field id="cloupra__Process__c"/>
                <field id="cloupra__Process__r.Name"/>
                <field id="cloupra__Service__r.cloupra__Service_Type__r.Name"/>
                <field id="cloupra__Process__r.cloupra__Code__c"/>
                <field id="cloupra__Stage__c"/>
                <field id="cloupra__Stage__r.Name"/>
                <field id="OwnerId"/>
                <field id="Owner.Name"/>
                <field id="cloupra__Due_Date__c"/>
                <field id="cloupra__Process__r.cloupra__Related_To__c"/>
                <field id="Name"/>
                <field id="cloupra__Description__c"/>
                <field id="cloupra__Service__r.cloupra__Client__c"/>
                <field id="cloupra__Service__r.cloupra__Client__r.Name"/>
                <field id="cloupra__Entity__r.cloupra__Orgn_Type__c"/>
                <field id="cloupra__Service__r.OwnerId"/>
                <field id="cloupra__Service__r.Owner.Name"/>
                <field id="cloupra__Entity__r.OwnerId"/>
                <field id="cloupra__Entity__r.Owner.Name"/>
                <field id="Owner.IsActive"/>
            </fields>
            <conditions logic="">
                <condition type="param" value="clientId" field="cloupra__Entity__c" operator="=" enclosevalueinquotes="true" novaluebehavior="deactivate"/>
                <condition type="param" value="providerId" field="cloupra__Entity__c" operator="=" enclosevalueinquotes="true" novaluebehavior="deactivate"/>
                <condition type="param" value="employerId" field="cloupra__Entity__c" operator="=" userinfotype="userid" enclosevalueinquotes="true" novaluebehavior="deactivate"/>
                <condition type="param" value="adviceserviceId" field="cloupra__Service__c" operator="=" state="" novaluebehavior="deactivate" mergefield="Id" enclosevalueinquotes="true"/>
                <condition type="userinfo" value="" field="OwnerId" operator="=" enclosevalueinquotes="true" userinfotype="userid"/>
            </conditions>
            <actions>
                <action>
                    <actions>
                        <action type="custom" snippet="renderProcessType"/>
                    </actions>
                    <events>
                        <event>row.updated</event>
                    </events>
                    <fields>
                        <field>cloupra__Service__c</field>
                    </fields>
                </action>
                <action>
                    <actions>
                        <action type="setCondition" model="Services" condition="cloupra__Employer__c" value="{{cloupra__Entity__c}}"/>
                        <action type="setCondition" model="Services" condition="cloupra__Client__c" value="{{cloupra__Entity__c}}"/>
                        <action type="requeryModel" model="Services" behavior="standard"/>
                        <action type="custom" snippet="renderService"/>
                    </actions>
                    <events>
                        <event>row.updated</event>
                    </events>
                    <fields>
                        <field>cloupra__Entity__c</field>
                    </fields>
                </action>
                <action>
                    <actions>
                        <action type="custom" snippet="renderProcessName"/>
                    </actions>
                    <events>
                        <event>row.updated</event>
                    </events>
                    <fields>
                        <field>cloupra__Entity__c</field>
                        <field>cloupra__Process__c</field>
                        <field>cloupra__Service__c</field>
                    </fields>
                </action>
            </actions>
        </model>
        <model id="ServiceProcesses" limit="500" query="true" createrowifnonefound="false" sobject="cloupra__Service_Process__c" adapter="salesforce" type="">
            <fields>
                <field id="cloupra__Service_Type__c"/>
                <field id="cloupra__Service_Type__r.Name"/>
                <field id="cloupra__Process__c"/>
                <field id="cloupra__Process__r.Name"/>
                <field id="cloupra__Process__r.cloupra__Related_To__c"/>
                <field id="cloupra__Process__r.cloupra__Order__c"/>
            </fields>
            <conditions>
                <condition type="modelmerge" value="" field="cloupra__Service_Type__c" operator="=" model="NewClientProcess" enclosevalueinquotes="true" mergefield="cloupra__Service__c" novaluebehavior="noquery" state="filterableoff" inactive="true" name="ServiceType"/>
            </conditions>
            <actions/>
        </model>
        <model id="Processes" limit="500" query="true" createrowifnonefound="false" sobject="cloupra__Process__c" orderby="cloupra__Order__c, Id" adapter="salesforce" type="">
            <fields>
                <field id="Id"/>
                <field id="Name"/>
                <field id="cloupra__Code__c"/>
                <field id="cloupra__Related_To__c"/>
                <field id="cloupra__Active__c"/>
                <field id="cloupra__Order__c"/>
            </fields>
            <conditions logic="">
                <condition type="fieldvalue" value="true" enclosevalueinquotes="false" field="cloupra__Active__c"/>
            </conditions>
            <actions/>
        </model>
        <model id="ProcessSteps" limit="50" query="false" createrowifnonefound="false" sobject="cloupra__Process_Step__c" orderby="cloupra__Order__c DESC, Id" adapter="salesforce" type="">
            <fields>
                <field id="cloupra__Order__c"/>
                <field id="cloupra__Team_Member__c"/>
                <field id="cloupra__Team_Member__r.Name"/>
                <field id="Id"/>
                <field id="OwnerId"/>
                <field id="Owner.Name"/>
                <field id="cloupra__Estimated_Effort_Days__c"/>
                <field id="cloupra__Estimated_Effort_Hours__c"/>
                <field id="cloupra__Estimated_Effort_Minutes__c"/>
                <field id="cloupra__Description__c"/>
                <field id="cloupra__Process__c"/>
                <field id="cloupra__Process__r.Name"/>
                <field id="cloupra__Task_Subject__c"/>
                <field id="cloupra__Due_Date__c"/>
                <field id="cloupra__Stage__c"/>
                <field id="cloupra__Stage__r.Name"/>
                <field id="cloupra__Task_Group__c"/>
                <field id="cloupra__Task_Group__r.Name"/>
                <field id="cloupra__Relationship_Type__c"/>
                <field id="cloupra__Relationship_Type__r.Name"/>
                <field id="cloupra__Assignment_Type__c"/>
                <field id="cloupra__Priority__c"/>
                <field id="cloupra__Priority__r.Name"/>
                <field id="Owner.IsActive"/>
            </fields>
            <conditions>
                <condition type="modelmerge" value="" field="cloupra__Process__c" operator="=" state="filterableon" model="NewClientProcess" enclosevalueinquotes="true" mergefield="cloupra__Process__c" novaluebehavior="deactivate" inactive="false" name="SelectedProcessId"/>
                <condition type="fieldvalue" value="false" enclosevalueinquotes="false" field="cloupra__Suppress_At_Launch__c"/>
                <condition type="fieldvalue" value="true" enclosevalueinquotes="false" field="cloupra__Active__c"/>
            </conditions>
            <actions/>
        </model>
        <model id="NewTasks" limit="" query="false" createrowifnonefound="false" sobject="cloupra__Task__c" orderby="cloupra__Due_Date__c, Id" adapter="" type="">
            <fields>
                <field id="OwnerId"/>
                <field id="Owner.Name"/>
                <field id="cloupra__Estimated_Effort_Days__c"/>
                <field id="cloupra__Estimated_Effort_Hours__c"/>
                <field id="cloupra__Estimated_Effort_Minutes__c"/>
                <field id="cloupra__Waiting_on_Predecessor__c"/>
                <field id="cloupra__Based_On_Process_Step__c"/>
                <field id="Name"/>
                <field id="cloupra__Due_Date__c"/>
                <field id="cloupra__Stage__c"/>
                <field id="cloupra__Stage__r.Name"/>
                <field id="cloupra__Priority__c"/>
                <field id="cloupra__Priority__r.Name"/>
                <field id="cloupra__Priority__r.cloupra__Text_Colour__c"/>
                <field id="cloupra__Task_Description__c"/>
                <field id="cloupra__Process_Step__c"/>
                <field id="cloupra__Process_Step__r.Name"/>
                <field id="cloupra__Rich_Description__c"/>
            </fields>
            <conditions>
                <condition type="modelmerge" value="" field="cloupra__Applied_Process__c" operator="=" model="NewClientProcess" enclosevalueinquotes="true" mergefield="Id" novaluebehavior="deactivate"/>
            </conditions>
            <actions/>
        </model>
        <model id="Services" limit="200" query="true" createrowifnonefound="false" sobject="cloupra__Service__c" orderby="cloupra__Service_Type__r.Name, Id" adapter="salesforce" type="">
            <fields>
                <field id="Name"/>
                <field id="cloupra__Service_Type__c"/>
                <field id="cloupra__Service_Type__r.Name"/>
                <field id="cloupra__Client__c"/>
                <field id="cloupra__Client__r.Name"/>
                <field id="OwnerId"/>
                <field id="Owner.Name"/>
            </fields>
            <conditions logic="((1 and 3) or (2 and 4)) and 5">
                <condition type="modelmerge" value="" field="cloupra__Client__c" operator="=" novaluebehavior="deactivate" state="filterableon" model="NewClientProcess" enclosevalueinquotes="true" mergefield="cloupra__Entity__c" inactive="false" name="cloupra__Client__c"/>
                <condition type="modelmerge" value="" field="cloupra__Employer__c" operator="=" novaluebehavior="deactivate" model="NewClientProcess" enclosevalueinquotes="true" mergefield="cloupra__Entity__c" state="filterableoff" inactive="true" name="cloupra__Employer__c"/>
                <condition type="blank" value="null" field="cloupra__Client__c" operator="!=" enclosevalueinquotes="false"/>
                <condition type="blank" value="null" field="cloupra__Employer__c" operator="!=" enclosevalueinquotes="false"/>
                <condition type="fieldvalue" value="true" enclosevalueinquotes="false" field="cloupra__Service_Type__r.cloupra__Active__c"/>
            </conditions>
            <actions/>
        </model>
        <model id="ClientProcessStages" limit="0" query="false" createrowifnonefound="false" sobject="cloupra__Category__c" orderby="" adapter="salesforce" type="">
            <fields>
                <field id="Name"/>
                <field id="Id"/>
            </fields>
            <conditions/>
            <actions/>
        </model>
        <model id="TeamMemberRelationships" limit="500" query="false" createrowifnonefound="false" adapter="salesforce" type="" sobject="cloupra__Relationship__c">
            <fields>
                <field id="cloupra__From_Team_Member__c"/>
                <field id="cloupra__From_Team_Member__r.Name"/>
                <field id="cloupra__Relationship_Type__c"/>
                <field id="cloupra__Relationship_Type__r.Name"/>
                <field id="cloupra__From_Team_Member__r.IsActive"/>
            </fields>
            <conditions>
                <condition type="fieldvalue" value="" enclosevalueinquotes="true" field="cloupra__To_Team_Member__c" state="filterableoff" inactive="true" name="cloupra__To_Team_Member__c"/>
                <condition type="multiple" value="" field="cloupra__Relationship_Type__c" state="filterableoff" inactive="true" name="cloupra__Relationship_Type__c" operator="in" enclosevalueinquotes="true">
                    <values>
                        <value/>
                    </values>
                </condition>
            </conditions>
            <actions/>
        </model>
        <model id="InactiveUsers" limit="2000" query="false" createrowifnonefound="false" adapter="salesforce" type="" sobject="User">
            <fields>
                <field id="IsActive"/>
                <field id="Name"/>
            </fields>
            <conditions>
                <condition type="fieldvalue" value="false" enclosevalueinquotes="false" field="IsActive"/>
                <condition type="multiple" value="" field="Id" operator="in" enclosevalueinquotes="true" state="filterableoff" inactive="true" name="userIds">
                    <values>
                        <value/>
                    </values>
                </condition>
            </conditions>
            <actions/>
        </model>
        <model id="NAV_ChildState" limit="1" query="false" createrowifnonefound="true" adapter="salesforce" type="" doclone="" unloadwarningifunsavedchanges="false">
            <fields>
                <field id="context" uionly="true" displaytype="TEXT" label="context"/>
                <field id="tab" uionly="true" displaytype="TEXT" label="tab"/>
                <field id="action" uionly="true" displaytype="TEXT" label="action"/>
                <field id="id1" uionly="true" displaytype="TEXT" label="id1" length="18"/>
            </fields>
            <conditions/>
            <actions/>
        </model>
        <model id="TaskStages" limit="0" query="false" createrowifnonefound="false" sobject="cloupra__Category__c" orderby="" adapter="salesforce" type="">
            <fields>
                <field id="Name"/>
                <field id="Id"/>
            </fields>
            <conditions/>
            <actions/>
        </model>
        <model id="TaskPriorities" limit="0" query="false" createrowifnonefound="false" sobject="cloupra__Category__c" orderby="" adapter="salesforce" type="">
            <fields>
                <field id="Name"/>
                <field id="Id"/>
            </fields>
            <conditions/>
            <actions/>
        </model>
        <model id="AvailableProcesses" limit="0" query="false" createrowifnonefound="false" sobject="cloupra__Process__c" orderby="" adapter="salesforce" type="">
            <fields>
                <field id="Id"/>
                <field id="Name"/>
                <field id="cloupra__Code__c"/>
                <field id="cloupra__Related_To__c"/>
                <field id="cloupra__Active__c"/>
                <field id="cloupra__Order__c"/>
            </fields>
            <conditions logic="">
                <condition type="fieldvalue" value="true" enclosevalueinquotes="false" field="cloupra__Active__c"/>
            </conditions>
            <actions/>
        </model>
    </models>
    <components>
        <grid uniqueid="sk-2A6PzW-186">
            <divisions>
                <division behavior="flex" minwidth="100px" ratio="1" verticalalign="top">
                    <components>
                        <pficore__populatecategories uniqueid="sk-LaSJx-812" model="ClientProcessStages" relatedto="Client Process Stage"/>
                    </components>
                </division>
                <division behavior="flex" verticalalign="top" minwidth="100px" ratio="1">
                    <components>
                        <pficore__populatecategories uniqueid="sk-PumcU-585" model="TaskPriorities" relatedto="Task Priority"/>
                    </components>
                </division>
                <division behavior="flex" verticalalign="top" minwidth="100px" ratio="1">
                    <components>
                        <pficore__populatecategories uniqueid="sk-Pun4b-593" model="TaskStages" relatedto="Task Stage"/>
                    </components>
                </division>
                <division behavior="flex" verticalalign="top" minwidth="100px" ratio="1">
                    <components/>
                </division>
                <division behavior="flex" verticalalign="top" minwidth="100px" ratio="1">
                    <components/>
                </division>
                <division behavior="flex" verticalalign="top" minwidth="100px" ratio="1">
                    <components/>
                </division>
                <division behavior="flex" verticalalign="top" minwidth="100px" ratio="1">
                    <components/>
                </division>
                <division behavior="flex" verticalalign="top" minwidth="100px" ratio="1">
                    <components/>
                </division>
            </divisions>
            <styles>
                <styleitem type="background" bgtype="none"/>
            </styles>
        </grid>
        <pagetitle uniqueid="launch-process-wiz-title" model="NewClientProcess" cssclass="">
            <actions/>
        </pagetitle>
        <grid uniqueid="sk-Lclno-927">
            <divisions>
                <division behavior="flex" minwidth="100px" ratio="1">
                    <components>
                        <wizard uniqueid="sp-wizard" buttonslocation="top">
                            <steps>
                                <step stepid="step1" steplabel="Step 1 of 2: Select a Service &amp; Process Type">
                                    <components>
                                        <grid uniqueid="sk-LNwBP-11698">
                                            <divisions>
                                                <division behavior="flex" minwidth="100px" ratio="1">
                                                    <components>
                                                        <basicfieldeditor showheader="true" showsavecancel="false" model="NewClientProcess" buttonposition="" mode="edit" uniqueid="appliedProcessEdit" layout="above" cssclass="">
                                                            <columns layoutmode="responsive" columngutter="4px" rowgutter="4px">
                                                                <column ratio="1" minwidth="300px" behavior="flex">
                                                                    <sections>
                                                                        <section title="" collapsible="no" showheader="false">
                                                                            <fields>
                                                                                <field id="cloupra__Entity__c" showhelp="true" valuehalign="" type="" optionsource="" displaytemplate="{{Name}}{{#cloupra__Orgn_Type__c}} ({{{cloupra__Orgn_Type__c}}}){{/cloupra__Orgn_Type__c}}" required="false" searchtemplate="" cssclass="sp-entity">
                                                                                    <renderconditions logictype="and" onhidedatabehavior="keep"/>
                                                                                    <enableconditions/>
                                                                                    <searchfields/>
                                                                                    <filters>
                                                                                        <filter type="multiple" operator="in" field="cloupra__Orgn_Type__c" value="" enclosevalueinquotes="true">
                                                                                            <values>
                                                                                                <value>Client</value>
                                                                                                <value>Employer</value>
                                                                                            </values>
                                                                                        </filter>
                                                                                    </filters>
                                                                                </field>
                                                                                <field id="cloupra__Service__c" showhelp="true" valuehalign="" type="REFPICK" optionsource="model" cssclass="sp-service-picklist" snippet="" optionmodel="Services">
                                                                                    <renderconditions logictype="and" onhidedatabehavior="keep">
                                                                                        <rendercondition type="blank" operator="!=" fieldmodel="NewClientProcess" sourcetype="fieldvalue" field="cloupra__Entity__c" value="null" enclosevalueinquotes="false"/>
                                                                                    </renderconditions>
                                                                                    <enableconditions/>
                                      &n
Photo of Amy Dewaal

Amy Dewaal, Official Rep

  • 8,200 Points 5k badge 2x thumb
Do you have any custom javascript or CSS resources on the page? Is this the only page that is experiencing this problem or are there others?

Thanks!
Amy
Photo of Gyan

Gyan

  • 1,400 Points 1k badge 2x thumb
Hi Amy, 

I have provided screen shots (2 screen shots) from 2 different pages and the problem occurs frequently on these pages.  As you can see on the xml these pages do have custom javascript. However, we are ocassionally seeing duplicate components on other pages as well where we don't have custom JS/CSS.

Thanks.
Gyan
Photo of Gyan

Gyan

  • 1,400 Points 1k badge 2x thumb
I think xml for second screenshot was truncated,  in my previous comment. please see the full xml here:

<skuidpage unsavedchangeswarning="" personalizationmode="server" showsidebar="false" showheader="false" theme="Lightning Design">
    <models>
        <model id="NewClientProcess" limit="0" query="false" createrowifnonefound="true" sobject="cloupra__Applied_Process__c" adapter="salesforce" type="">
            <fields>
                <field id="Id"/>
                <field id="cloupra__Entity__c"/>
                <field id="cloupra__Entity__r.Name"/>
                <field id="cloupra__Service__c"/>
                <field id="cloupra__Service__r.Name"/>
                <field id="cloupra__Process__c"/>
                <field id="cloupra__Process__r.Name"/>
                <field id="cloupra__Service__r.cloupra__Service_Type__r.Name"/>
                <field id="cloupra__Process__r.cloupra__Code__c"/>
                <field id="cloupra__Stage__c"/>
                <field id="cloupra__Stage__r.Name"/>
                <field id="OwnerId"/>
                <field id="Owner.Name"/>
                <field id="cloupra__Due_Date__c"/>
                <field id="cloupra__Process__r.cloupra__Related_To__c"/>
                <field id="Name"/>
                <field id="cloupra__Description__c"/>
                <field id="cloupra__Service__r.cloupra__Client__c"/>
                <field id="cloupra__Service__r.cloupra__Client__r.Name"/>
                <field id="cloupra__Entity__r.cloupra__Orgn_Type__c"/>
                <field id="cloupra__Service__r.OwnerId"/>
                <field id="cloupra__Service__r.Owner.Name"/>
                <field id="cloupra__Entity__r.OwnerId"/>
                <field id="cloupra__Entity__r.Owner.Name"/>
                <field id="Owner.IsActive"/>
            </fields>
            <conditions logic="">
                <condition type="param" value="clientId" field="cloupra__Entity__c" operator="=" enclosevalueinquotes="true" novaluebehavior="deactivate"/>
                <condition type="param" value="providerId" field="cloupra__Entity__c" operator="=" enclosevalueinquotes="true" novaluebehavior="deactivate"/>
                <condition type="param" value="employerId" field="cloupra__Entity__c" operator="=" userinfotype="userid" enclosevalueinquotes="true" novaluebehavior="deactivate"/>
                <condition type="param" value="adviceserviceId" field="cloupra__Service__c" operator="=" state="" novaluebehavior="deactivate" mergefield="Id" enclosevalueinquotes="true"/>
                <condition type="userinfo" value="" field="OwnerId" operator="=" enclosevalueinquotes="true" userinfotype="userid"/>
            </conditions>
            <actions>
                <action>
                    <actions>
                        <action type="custom" snippet="renderProcessType"/>
                    </actions>
                    <events>
                        <event>row.updated</event>
                    </events>
                    <fields>
                        <field>cloupra__Service__c</field>
                    </fields>
                </action>
                <action>
                    <actions>
                        <action type="setCondition" model="Services" condition="cloupra__Employer__c" value="{{cloupra__Entity__c}}"/>
                        <action type="setCondition" model="Services" condition="cloupra__Client__c" value="{{cloupra__Entity__c}}"/>
                        <action type="requeryModel" model="Services" behavior="standard"/>
                        <action type="custom" snippet="renderService"/>
                    </actions>
                    <events>
                        <event>row.created</event>
                        <event>row.updated</event>
                    </events>
                    <fields>
                        <field>cloupra__Entity__c</field>
                    </fields>
                </action>
                <action>
                    <actions>
                        <action type="custom" snippet="renderProcessName"/>
                    </actions>
                    <events>
                        <event>row.updated</event>
                    </events>
                    <fields>
                        <field>cloupra__Entity__c</field>
                        <field>cloupra__Process__c</field>
                        <field>cloupra__Service__c</field>
                    </fields>
                </action>
            </actions>
        </model>
        <model id="ServiceProcesses" limit="500" query="true" createrowifnonefound="false" sobject="cloupra__Service_Process__c" adapter="salesforce" type="">
            <fields>
                <field id="cloupra__Service_Type__c"/>
                <field id="cloupra__Service_Type__r.Name"/>
                <field id="cloupra__Process__c"/>
                <field id="cloupra__Process__r.Name"/>
                <field id="cloupra__Process__r.cloupra__Related_To__c"/>
                <field id="cloupra__Process__r.cloupra__Order__c"/>
            </fields>
            <conditions>
                <condition type="modelmerge" value="" field="cloupra__Service_Type__c" operator="=" model="NewClientProcess" enclosevalueinquotes="true" mergefield="cloupra__Service__c" novaluebehavior="noquery" state="filterableoff" inactive="true" name="ServiceType"/>
            </conditions>
            <actions/>
        </model>
        <model id="Processes" limit="500" query="true" createrowifnonefound="false" sobject="cloupra__Process__c" orderby="cloupra__Order__c, Id" adapter="salesforce" type="">
            <fields>
                <field id="Id"/>
                <field id="Name"/>
                <field id="cloupra__Code__c"/>
                <field id="cloupra__Related_To__c"/>
                <field id="cloupra__Active__c"/>
                <field id="cloupra__Order__c"/>
            </fields>
            <conditions logic="">
                <condition type="fieldvalue" value="true" enclosevalueinquotes="false" field="cloupra__Active__c"/>
            </conditions>
            <actions/>
        </model>
        <model id="ProcessSteps" limit="50" query="false" createrowifnonefound="false" sobject="cloupra__Process_Step__c" orderby="cloupra__Order__c DESC, Id" adapter="salesforce" type="">
            <fields>
                <field id="cloupra__Order__c"/>
                <field id="cloupra__Team_Member__c"/>
                <field id="cloupra__Team_Member__r.Name"/>
                <field id="Id"/>
                <field id="OwnerId"/>
                <field id="Owner.Name"/>
                <field id="cloupra__Estimated_Effort_Days__c"/>
                <field id="cloupra__Estimated_Effort_Hours__c"/>
                <field id="cloupra__Estimated_Effort_Minutes__c"/>
                <field id="cloupra__Description__c"/>
                <field id="cloupra__Process__c"/>
                <field id="cloupra__Process__r.Name"/>
                <field id="cloupra__Task_Subject__c"/>
                <field id="cloupra__Due_Date__c"/>
                <field id="cloupra__Stage__c"/>
                <field id="cloupra__Stage__r.Name"/>
                <field id="cloupra__Task_Group__c"/>
                <field id="cloupra__Task_Group__r.Name"/>
                <field id="cloupra__Relationship_Type__c"/>
                <field id="cloupra__Relationship_Type__r.Name"/>
                <field id="cloupra__Assignment_Type__c"/>
                <field id="cloupra__Priority__c"/>
                <field id="cloupra__Priority__r.Name"/>
                <field id="Owner.IsActive"/>
            </fields>
            <conditions>
                <condition type="modelmerge" value="" field="cloupra__Process__c" operator="=" state="filterableon" model="NewClientProcess" enclosevalueinquotes="true" mergefield="cloupra__Process__c" novaluebehavior="deactivate" inactive="false" name="SelectedProcessId"/>
                <condition type="fieldvalue" value="false" enclosevalueinquotes="false" field="cloupra__Suppress_At_Launch__c"/>
                <condition type="fieldvalue" value="true" enclosevalueinquotes="false" field="cloupra__Active__c"/>
            </conditions>
            <actions/>
        </model>
        <model id="NewTasks" limit="" query="false" createrowifnonefound="false" sobject="cloupra__Task__c" orderby="cloupra__Due_Date__c, Id" adapter="" type="">
            <fields>
                <field id="OwnerId"/>
                <field id="Owner.Name"/>
                <field id="cloupra__Estimated_Effort_Days__c"/>
                <field id="cloupra__Estimated_Effort_Hours__c"/>
                <field id="cloupra__Estimated_Effort_Minutes__c"/>
                <field id="cloupra__Waiting_on_Predecessor__c"/>
                <field id="cloupra__Based_On_Process_Step__c"/>
                <field id="Name"/>
                <field id="cloupra__Due_Date__c"/>
                <field id="cloupra__Stage__c"/>
                <field id="cloupra__Stage__r.Name"/>
                <field id="cloupra__Priority__c"/>
                <field id="cloupra__Priority__r.Name"/>
                <field id="cloupra__Priority__r.cloupra__Text_Colour__c"/>
                <field id="cloupra__Task_Description__c"/>
                <field id="cloupra__Process_Step__c"/>
                <field id="cloupra__Process_Step__r.Name"/>
                <field id="cloupra__Rich_Description__c"/>
            </fields>
            <conditions>
                <condition type="modelmerge" value="" field="cloupra__Applied_Process__c" operator="=" model="NewClientProcess" enclosevalueinquotes="true" mergefield="Id" novaluebehavior="deactivate"/>
            </conditions>
            <actions/>
        </model>
        <model id="Services" limit="200" query="true" createrowifnonefound="false" sobject="cloupra__Service__c" orderby="cloupra__Service_Type__r.Name, Id" adapter="salesforce" type="">
            <fields>
                <field id="Name"/>
                <field id="cloupra__Service_Type__c"/>
                <field id="cloupra__Service_Type__r.Name"/>
                <field id="cloupra__Client__c"/>
                <field id="cloupra__Client__r.Name"/>
                <field id="OwnerId"/>
                <field id="Owner.Name"/>
            </fields>
            <conditions logic="(1 and 3 and 5) or (2 and 4 and 5)">
                <condition type="modelmerge" value="" field="cloupra__Client__c" operator="=" novaluebehavior="deactivate" state="" model="NewClientProcess" enclosevalueinquotes="true" mergefield="cloupra__Entity__c" inactive="false"/>
                <condition type="modelmerge" value="" field="cloupra__Employer__c" operator="=" novaluebehavior="deactivate" model="NewClientProcess" enclosevalueinquotes="true" mergefield="cloupra__Entity__c" state="" inactive="false"/>
                <condition type="blank" value="null" field="cloupra__Client__c" operator="!=" enclosevalueinquotes="false"/>
                <condition type="blank" value="null" field="cloupra__Employer__c" operator="!=" enclosevalueinquotes="false"/>
                <condition type="fieldvalue" value="true" enclosevalueinquotes="false" field="cloupra__Service_Type__r.cloupra__Active__c"/>
            </conditions>
            <actions/>
        </model>
        <model id="ClientProcessStages" limit="0" query="false" createrowifnonefound="false" sobject="cloupra__Category__c" orderby="" adapter="salesforce" type="">
            <fields>
                <field id="Name"/>
                <field id="Id"/>
            </fields>
            <conditions/>
            <actions/>
        </model>
        <model id="TeamMemberRelationships" limit="500" query="false" createrowifnonefound="false" adapter="salesforce" type="" sobject="cloupra__Relationship__c">
            <fields>
                <field id="cloupra__From_Team_Member__c"/>
                <field id="cloupra__From_Team_Member__r.Name"/>
                <field id="cloupra__Relationship_Type__c"/>
                <field id="cloupra__Relationship_Type__r.Name"/>
                <field id="cloupra__From_Team_Member__r.IsActive"/>
            </fields>
            <conditions>
                <condition type="fieldvalue" value="" enclosevalueinquotes="true" field="cloupra__To_Team_Member__c" state="filterableoff" inactive="true" name="cloupra__To_Team_Member__c"/>
                <condition type="multiple" value="" field="cloupra__Relationship_Type__c" state="filterableoff" inactive="true" name="cloupra__Relationship_Type__c" operator="in" enclosevalueinquotes="true">
                    <values>
                        <value/>
                    </values>
                </condition>
            </conditions>
            <actions/>
        </model>
        <model id="InactiveUsers" limit="2000" query="false" createrowifnonefound="false" adapter="salesforce" type="" sobject="User">
            <fields>
                <field id="IsActive"/>
                <field id="Name"/>
            </fields>
            <conditions>
                <condition type="fieldvalue" value="false" enclosevalueinquotes="false" field="IsActive"/>
                <condition type="multiple" value="" field="Id" operator="in" enclosevalueinquotes="true" state="filterableoff" inactive="true" name="userIds">
                    <values>
                        <value/>
                    </values>
                </condition>
            </conditions>
            <actions/>
        </model>
        <model id="NAV_ChildState" limit="1" query="false" createrowifnonefound="true" adapter="salesforce" type="" doclone="" unloadwarningifunsavedchanges="false">
            <fields>
                <field id="context" uionly="true" displaytype="TEXT" label="context"/>
                <field id="tab" uionly="true" displaytype="TEXT" label="tab"/>
                <field id="action" uionly="true" displaytype="TEXT" label="action"/>
                <field id="id1" uionly="true" displaytype="TEXT" label="id1" length="18"/>
            </fields>
            <conditions/>
            <actions/>
        </model>
        <model id="TaskStages" limit="0" query="false" createrowifnonefound="false" sobject="cloupra__Category__c" orderby="" adapter="salesforce" type="">
            <fields>
                <field id="Name"/>
                <field id="Id"/>
            </fields>
            <conditions/>
            <actions/>
        </model>
        <model id="TaskPriorities" limit="0" query="false" createrowifnonefound="false" sobject="cloupra__Category__c" orderby="" adapter="salesforce" type="">
            <fields>
                <field id="Name"/>
                <field id="Id"/>
            </fields>
            <conditions/>
            <actions/>
        </model>
        <model id="AvailableProcesses" limit="0" query="false" createrowifnonefound="false" sobject="cloupra__Process__c" orderby="" adapter="salesforce" type="">
            <fields>
                <field id="Id"/>
                <field id="Name"/>
                <field id="cloupra__Code__c"/>
                <field id="cloupra__Related_To__c"/>
                <field id="cloupra__Active__c"/>
                <field id="cloupra__Order__c"/>
            </fields>
            <conditions logic="">
                <condition type="fieldvalue" value="true" enclosevalueinquotes="false" field="cloupra__Active__c"/>
            </conditions>
            <actions/>
        </model>
    </models>
    <components>
        <grid uniqueid="sk-2A6PzW-186">
            <divisions>
                <division behavior="flex" minwidth="100px" ratio="1" verticalalign="top">
                    <components>
                        <pficore__populatecategories uniqueid="sk-LaSJx-812" model="ClientProcessStages" relatedto="Client Process Stage"/>
                    </components>
                </division>
                <division behavior="flex" verticalalign="top" minwidth="100px" ratio="1">
                    <components>
                        <pficore__populatecategories uniqueid="sk-PumcU-585" model="TaskPriorities" relatedto="Task Priority"/>
                    </components>
                </division>
                <division behavior="flex" verticalalign="top" minwidth="100px" ratio="1">
                    <components>
                        <pficore__populatecategories uniqueid="sk-Pun4b-593" model="TaskStages" relatedto="Task Stage"/>
                    </components>
                </division>
                <division behavior="flex" verticalalign="top" minwidth="100px" ratio="1">
                    <components/>
                </division>
                <division behavior="flex" verticalalign="top" minwidth="100px" ratio="1">
                    <components/>
                </division>
                <division behavior="flex" verticalalign="top" minwidth="100px" ratio="1">
                    <components/>
                </division>
                <division behavior="flex" verticalalign="top" minwidth="100px" ratio="1">
                    <components/>
                </division>
                <division behavior="flex" verticalalign="top" minwidth="100px" ratio="1">
                    <components/>
                </division>
            </divisions>
            <styles>
                <styleitem type="background" bgtype="none"/>
            </styles>
        </grid>
        <pagetitle uniqueid="launch-process-wiz-title" model="NewClientProcess" cssclass="">
            <actions/>
        </pagetitle>
        <grid uniqueid="sk-Lclno-927">
            <divisions>
                <division behavior="flex" minwidth="100px" ratio="1">
                    <components>
                        <wizard uniqueid="sp-wizard" buttonslocation="top">
                            <steps>
                                <step stepid="step1" steplabel="Step 1 of 2: Select a Service &amp; Process Type">
                                    <components>
                                        <grid uniqueid="sk-LNwBP-11698">
                                            <divisions>
                                                <division behavior="flex" minwidth="100px" ratio="1">
                                                    <components>
                                                        <basicfieldeditor showheader="true" showsavecancel="false" model="NewClientProcess" buttonposition="" mode="edit" uniqueid="appliedProcessEdit" layout="above" cssclass="">
                                                            <columns layoutmode="responsive" columngutter="4px" rowgutter="4px">
                                                                <column ratio="1" minwidth="300px" behavior="flex">
                                                                    <sections>
                                                                        <section title="" collapsible="no" showheader="false">
                                                                            <fields>
                                                                                <field id="cloupra__Entity__c" showhelp="true" valuehalign="" type="" optionsource="" displaytemplate="{{Name}}{{#cloupra__Orgn_Type__c}} ({{{cloupra__Orgn_Type__c}}}){{/cloupra__Orgn_Type__c}}" required="false" searchtemplate="" cssclass="sp-entity">
                                                                                    <renderconditions logictype="and" onhidedatabehavior="keep"/>
                                                                                    <enableconditions/>
                                                                                    <searchfields/>
                                                                                    <filters>
                                                                                        <filter type="multiple" operator="in" field="cloupra__Orgn_Type__c" value="" enclosevalueinquotes="true">
                                                                                            <values>
                                                                                                <value>Client</value>
                                                                                                <value>Employer</value>
                                                                                            </values>
                                                                                        </filter>
                                                                                    </filters>
                                                                                </field>
                                                                                <field id="cloupra__Service__c" showhelp="true" valuehalign="" type="REFPICK" optionsource="model" cssclass="sp-service-picklist" snippet="" optionmodel="Services">
                                                                                    <renderconditions logictype="and" onhidedatabehavior="keep">
                                                                                        <rendercondition type="blank" operator="!=" fieldmodel="NewClientProcess" sourcetype="fieldvalue" field="cloupra__Entity__c" value="null" enclosevalueinquotes="false"/>
                                                                                    </renderconditions>
                                                                                    <enableconditions/>
                                                                                    <searchfields/>
                                                                                    <filters/>
                                                                                    <label>Service</label>
                                                                                </field>
                                                                                <field id="cloupra__Service__c" showhelp="true" valuehalign="" type="" cssclass="sp-service-ac" optionsource="">
                                                                                    <renderconditions logictype="and" onhidedatabehavior="keep">
                                                                                        <rendercondition type="blank" operator="=" fieldmodel="NewClientProcess" sourcetype="fieldvalue" field="cloupra__Entity__c" value="null" enclosevalueinquotes="false"/>
                                                                                    </renderconditions>
                                                                                    <enableconditions/>
                                                                                    <filters>
                                                                                        <filter type="fieldvalue" operator="=" enclosevalueinquotes="false" field="cloupra__Service_Type__r.cloupra__Active__c" value="true"/>
                                                                                    </filters>
                                                                                    <searchfields/>
                                                                                </field>
                                                                                <field id="cloupra__Process__c" required="true" type="CUSTOM" optionsource="model" addnoneoption="false" snippet="processSelection" optionmodel="Processes" displaytemplate="{{Name}}{{#DONOTRENDER}}{{cloupra__Related_To__c}}{{/DONOTRENDER}}" showhelp="true" valuehalign="" cssclass="sp-process-type">
                                                                                    <filters/>
                                                                                    <searchfields/>
                                                                                    <renderconditions logictype="and" onhidedatabehavior="keep"/>
                                                                                    <label>Process Type</label>
                                                                                    <enableconditions/>
                                                                                </field>
                                                                                <field id="Name" required="true" valuehalign="" type="" snippet="" cssclass="sp-process-name">
                                                                                    <renderconditions logictype="and" onhidedatabehavior="keep"/>
                                                                                    <enableconditions/>
                                                                                </field>
                                                                                <field id="cloupra__Description__c" showhelp="true" valuehalign="" type="">
                                                                                    <renderconditions logictype="and" onhidedatabehavior="keep"/>
                                                                                    <enableconditions/>
                                                                                </field>
                                                                            </fields>
                                                                        </section>
                                                                    </sections>
                                                                </column>
                                                                <column ratio="1" minwidth="300px" behavior="flex">
                                                                    <sections>
                                                                        <section title="" collapsible="no" showheader="false">
                                                                            <fields>
                                                                                <field id="OwnerId" type="" required="true" displaytemplate="{{Name}}" addnoneoption="false" valuehalign="" optionsource="">
                                                                                    <label>Owner</label>
                                                                                    <filters>
                                                                                        <filter type="blank" operator="!=" field="IsActive" value="null" enclosevalueinquotes="false"/>
                                                                                        <filter type="fieldvalue" operator="does not contain" enclosevalueinquotes="true" field="Profile.Name" value="Chatter"/>
                                                                                        <filter type="fieldvalue" operator="does not contain" enclosevalueinquotes="true" field="Name" value="Guest"/>
                                                                                    </filters>
                                                                                </field>
                                                                                <field id="cloupra__Due_Date__c" showhelp="true" valuehalign="" type="" monthpicker="true" yearpicker="true" yearpickermin="c-10" yearpickermax="c+10"/>
                                                                                <field id="cloupra__Stage__c" type="REFPICK" optionsource="model" optionmodel="ClientProcessStages" readonly="false" required="true" addnoneoption="true" showhelp="true" valuehalign="">
                                                                                    <searchfields/>
                                                                                    <filters/>
                                                                                </field>
                                                                            </fields>
                                                                        </section>
                                                                    </sections>
                                                                </column>
                                                            </columns>
                                                        </basicfieldeditor>
                                                    </components>
                                                </division>
                                            </divisions>
                                            <styles>
                                                <styleitem type="background" bgtype="none"/>
                                            </styles>
                                        </grid>
                                    </components>
                                    <actions>
                                        <action type="multi" label="Cancel &amp; Finish" stepid="step1" window="self" icon="fa-remove" url="/apex/PracticeView">
                                            <models>
                                                <model>NewClientProcess</model>
                                            </models>
                                            <actions>
                                                <action type="showPopup" message="Are you sure you want to cancel without starting the process?">
                                                    <popup title="" width="400">
                                                        <components>
                                                            <template multiple="true" model="RunningUser" allowhtml="true" uniqueid="sk-2D1_dI-599">
                                                                <contents>&lt;div class="alertpopuptext"&gt;Are you sure you want to cancel without starting the process?&lt;/div&gt;</contents>
                                                            </template>
                                                            <pagetitle model="RunningUser" cssclass="alertpopupbuttons" uniqueid="sk-2D1_dI-600">
                                                                <actions>
                                                                    <action type="multi" label="Yes, Cancel" window="self" cssclass="ui-button">
                                                                        <actions>
                                                                            <action type="cancel">
                                                                                <models>
                                                                                    <model>NewClientProcess</model>
                                                                                    <model>NewTasks</model>
                                                                                </models>
                                                                            </action>
                                                                            <action type="custom" window="self" url="/apex/{{{$Model.RedirectValues.data.0.FirstName}}}?id={{{$Model.RedirectValues.data.0.LastName}}}" snippet="pfi.processBackAction"/>
                                                                            <action type="closeTopmostPopup"/>
                                                                        </actions>
                                                                    </action>
                                                                    <action type="multi" label="No, Continue" window="self">
                                                                        <actions>
                                                                            <action type="closeTopmostPopup"/>
                                                                        </actions>
                                                                    </action>
                                                                </actions>
                                                            </pagetitle>
                                                        </components>
                                                    </popup>
                                                </action>
                                            </actions>
                                            <hotkeys/>
                                        </action>
                                        <action type="multi" label="Next" icon="fa-arrow-right" stepid="step2" window="self" snippet="generateTasks" uniqueid="process-launch-next">
                                            <actions>
                                                <action type="custom" snippet="validateStep1"/>
                                                <action type="custom" snippet="validateEntityOrServiceMust"/>
                                                <action type="custom" snippet="generateTasks"/>
                                                <action type="navigateToStep" snippet="generateTasks" stepid="step2"/>
                                            </actions>
                                        </action>
                                    </actions>
                                </step>
                                <step stepid="step2" steplabel="Step 2 of 2: Create Tasks" loadlazypanels="false">
                                    <components>
                                        <grid uniqueid="sk-LNqLR-1144">
                                            <divisions>
                                                <division behavior="flex" minwidth="100px" ratio="1" verticalalign="top">
                                                    <components>
                                                        <skootable showconditions="true" showsavecancel="false" searchmethod="server" searchbox="false" showexportbuttons="false" pagesize="all" createrecords="true" model="NewTasks" mode="edit" uniqueid="launchclient-step2-table" buttonposition="">
                                                            <fields>
                                                                <field id="Name" valuehalign="" type="" columnwidth="15%"/>
                                                                <field id="cloupra__Due_Date__c" valuehalign="" type="" monthpicker="true" yearpicker="true" yearpickermin="c-10" yearpickermax="c+10"/>
                                                                <field id="cloupra__Rich_Description__c" valuehalign="" type="" columnwidth="25%"/>
                                                                <field id="cloupra__Priority__c" type="REFPICK" snippet="" required="false" valuehalign="" optionsource="model" optionmodel="TaskPriorities">
                                                                    <filters/>
                                                                    <searchfields/>
                                                                </field>
                                                                <field id="cloupra__Stage__c" type="REFPICK" snippet="" required="false" valuehalign="" optionsource="model" optionmodel="TaskStages">
                                                                    <filters/>
                                                                    <searchfields/>
                                                                </field>
                                                                <field id="OwnerId" type="" allowordering="false" valuehalign="" optionsource="" displaytemplate="{{Name}}">
                                                                    <label>Assigned To</label>
                                                                    <filters>
                                                                        <filter type="fieldvalue" operator="=" enclosevalueinquotes="false" field="IsActive" value="true"/>
                                                                    </filters>
                                                                </field>
                                                                <field id="cloupra__Estimated_Effort_Days__c" required="true" valuehalign="" type="">
                                                                    <label>Estimate</label>
                                                                </field>
                                                                <field id="cloupra__Estimated_Effort_Hours__c" required="true" valuehalign="" type="">
                                                                    <label/>
                                                                </field>
                                                                <field id="cloupra__Estimated_Effort_Minutes__c" required="true" valuehalign="" type="">
                                                                    <label/>
                                                                </field>
                                                            </fields>
                                                            <rowactions>
                                                                <action type="edit"/>
                                                            </rowactions>
                                                            <massactions usefirstitemasdefault="true">
                                                                <action type="massdelete"/>
                                                                <action type="massupdate"/>
                                                            </massactions>
                                                            <views>
                                                                <view type="standard"/>
                                                            </views>
                                                        </skootable>
                                                    </components>
                                                </division>
                                            </divisions>
                                            <styles>
                                                <styleitem type="background" bgtype="none"/>
                                            </styles>
                                        </grid>
                                    </components>
                                    <actions>
                                        <action type="navigate" label="Prev" icon="fa-arrow-left" stepid="step1" window="self" uniqueid="step2-perv-btn"/>
                                        <action type="multi" label="Cancel &amp; Finish" stepid="step1" window="self" icon="fa-remove" url="/apex/PracticeView">
                                            <models>
                                                <model>NewClientProcess</model>
                                            </models>
                                            <actions>
                                                <action type="showPopup" message="Are you sure you want to cancel without starting the process?">
                                                    <popup title="" width="400">
                                                        <components>
                                                            <template multiple="true" model="RunningUser" allowhtml="true" uniqueid="sk-2D1_dI-601">
                                                                <contents>&lt;div class="alertpopuptext"&gt;Are you sure you want to cancel without starting the process?&lt;/div&gt;</contents>
                                                            </template>
                                                            <pagetitle model="RunningUser" cssclass="alertpopupbuttons" uniqueid="sk-2D1_dI-602">
                                                                <actions>
                                                                    <action type="multi" label="Yes, Cancel" window="self">
                                                                        <actions>
                                                                            <action type="cancel">
                                                                                <models>
                                                                                    <model>NewClientProcess</model>
                                                                                    <model>NewTasks</model>
                                                                                </models>
                                                                            </action>
                                                                            <action type="custom" window="self" url="" snippet="pfi.processBackAction"/>
                                                                            <action type="closeTopmostPopup"/>
                                                                        </actions>
                                                                    </action>
                                                                    <action type="multi" label="No, Continue" window="self">
                                                                        <actions>
                                                                            <action type="closeTopmostPopup"/>
                                                                        </actions>
                                                                    </action>
                                                                </actions>
                                                            </pagetitle>
                                                        </components>
                                                    </popup>
                                                </action>
                                            </actions>
                                            <hotkeys/>
                                        </action>
                                        <action type="multi" label="Save &amp; Finish" icon="fa-check" url="/apex/ClientView?id={{$Model.NewOrganisation.data.0.Id}}" window="self" snippet="saveAndRedirect">
                                            <models>
                                                <model>NewPrimaryContact</model>
                                                <model>NewSecondaryContacts</model>
                                                <model>NewOrganisation</model>
                                                <model>PriConRelationshipAdd</model>
                                                <model>SecConRelationshipAdd</model>
                                            </models>
                                            <actions>
                                                <action type="custom" snippet="validateStep2"/>
                                                <action type="blockUI" timeout="1500" message="Just a moment..."/>
                                                <action type="save" rollbackonanyerror="true">
                                                    <models>
                                                        <model>NewClientProcess</model>
                                                        <model>NewTasks</model>
                                                    </models>
                                                </action>
                                                <action type="updateRow" fieldmodel="NAV_ChildState" field="context" enclosevalueinquotes="true" value="process"/>
                                                <action type="updateRow" fieldmodel="NAV_ChildState" field="tab" enclosevalueinquotes="true" value="basics"/>
                                                <action type="updateRow" fieldmodel="NAV_ChildState" field="action" enclosevalueinquotes="true" value="view"/>
                                                <action type="updateRow" fieldmodel="NAV_ChildState" field="id1" enclosevalueinquotes="true" value="{{{$Model.NewClientProcess.data.0.Id}}}"/>
                                                <action type="custom" snippet="pfi.processGlobalAction"/>
                                            </actions>
                                            <hotkeys/>
                                        </action>
                                    </actions>
                                </step>
                            </steps>
                            <renderconditions logictype="and"/>
                        </wizard>
                    </components>
                </division>
            </divisions>
            <styles>
                <styleitem type="background" bgtype="none"/>
            </styles>
        </grid>
    </components>
    <resources>
        <labels/>
        <javascript>
            <jsitem location="inline" name="FieldValidation" cachelocation="false" url="">// Generic Field Validator (validates required field, email etc.)
(function(skuid) {
	var $ = skuid.$;
	$(document.body).one('pageload',function() {

	    skuid.snippet.registerSnippet('validateFields', function(models, editorId) {
		    var editor = $(editorId).data('object').editor;
		    editor.clearMessages();
			var validationErrors = [];
			var allRegisterdFields = {};
			
			$.each(models, function(i, modelName) {
			    var model = skuid.$M(modelName);
			    if(model)
			        allRegisterdFields = $.extend({}, allRegisterdFields, model.registeredFields);
			});
			
			if($.isEmptyObject(allRegisterdFields)) return;			

			var validateEmail = function(email) {
				var re = /^(([^&lt;&gt;()[\]\\.,;:\s@\"]+(\.[^&lt;&gt;()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
				return re.test(email); 
			};

			var validatePhoneNumber = function(phone) {
				var reg = /\(?([0-9]{3})\)?([ .-]?)([0-9]{3})\2([0-9]{4})/;
				return reg.test(phone); 
			};
			
    		var validateCurrency = function(currency){
				var cur = /^\$?([0-9]{1,3},([0-9]{3},)*[0-9]{3}|[0-9]+)(.[0-9][0-9])?$/;
				return cur.test(currency);
			};

			$.each(allRegisterdFields, function(i, f) {			
			    if(!f.metadata || f.mode != 'edit' || f.row.__deleted ) return true;

				var dt = f.metadata ? f.metadata.displaytype: null;
                var el = (dt == 'TEXTAREA'? 'textarea': 'input,select');
				var temp = f.element.find(el);
				var fieldValue = temp.val();
				
				var limit =  f.metadata.length;
				if(!limit) limit = 80;
				
				if(fieldValue &amp;&amp; fieldValue.length &gt; limit) {
					validationErrors.push({message: 'Charecter Limit Exceeded [' + f.metadata.label + ']', severity: 'ERROR'} );
				}
				
				//Validate Email format with Regex
				if(fieldValue &amp;&amp; dt == 'EMAIL' &amp;&amp; !validateEmail(fieldValue)) {
					validationErrors.push({message: 'Invalid Email [' + f.metadata.label + ']', severity: 'ERROR'} );
				} 
				
				
				if(fieldValue &amp;&amp; dt == 'PHONE' &amp;&amp; !validatePhoneNumber(fieldValue)) {
					//validationErrors.push({message: 'Invalid Phone - must be 10 digits without spaces [' + f.metadata.label + ']', severity: 'ERROR'} );
				} 
				
				if(fieldValue &amp;&amp; dt == 'CURRENCY' &amp;&amp; !validateCurrency(fieldValue)) {
					//validationErrors.push({message: 'Invalid Currency [' + f.metadata.label + ']', severity: 'ERROR'} );
				} 				
				if (f.required) {
					empty =  /^\s*$/.test(temp.val());
				  if(!fieldValue || empty) {
					validationErrors.push({message: 'Required Field Empty [' + f.metadata.label + ']', severity: 'ERROR'} );
					
				  }
				}
			});

			// Check whether validation errors were found
			if (validationErrors.length) {
                editor.handleMessages(validationErrors);
				return false;
			} 
			else {
			    return true;
			} 
	    });
	});
})(skuid);
//End</jsitem>
            <jsitem location="inline" name="processSelection" cachelocation="false" url="">(function(skuid) {
	var $ = skuid.$;
	$(document.body).one('pageload',function() {
        var initialised = false;
        var clientProcesses = [], anyServiceProcesses = [], relatedServices = {};
    
        skuid.snippet.registerSnippet('processSelection', function () {	
            if(initialised === false) {
                var processes = skuid.model.getModel('Processes');
                var serviceProcesses = skuid.model.getModel('ServiceProcesses');
                    
                //Cache processes that relate to 'Client' or 'Any Service'
                $.each(processes.data, function() {
                    if(!this.cloupra__Related_To__c)
                        return;
                    if(this.cloupra__Related_To__c.indexOf('Client') &gt; -1)
                        clientProcesses.push(this);
                    if(this.cloupra__Related_To__c.indexOf('Any Service') &gt; -1)
                        anyServiceProcesses.push(this);
                });
                
                $.each(serviceProcesses.data, function() {
                    if(!this.cloupra__Service_Type__c)
                        return;
                    if(!this.cloupra__Process__r.cloupra__Related_To__c || (this.cloupra__Process__r.cloupra__Related_To__c &amp;&amp; this.cloupra__Process__r.cloupra__Related_To__c.indexOf('Service') === -1))
                        return; //Junction object exists, but process not configured this way.
                    
                    if(relatedServices[this.cloupra__Service_Type__c] == undefined)
                        relatedServices[this.cloupra__Service_Type__c] = [];
                    relatedServices[this.cloupra__Service_Type__c].push(this.cloupra__Process__r);
                });
                initialised = true;
            }
            
            
            var field = arguments[0],
                value = skuid.utils.decodeHTML(arguments[1]),
                metadata = field.metadata,
                newClientProcess = field.row;
            
            if(field.mode == 'edit') {
                var select = $('&lt;select id = processSelect&gt;').appendTo(field.element);
                $('&lt;option value&gt;').appendTo(select).text('--None--');
                select.block();
                
                select.on('change', null, function() { //Set field to selected value -- on change
                    var ptext = $("#processSelect option:selected").text();
    
                   /*
                    var mods = {};
                    mods[metadata.id] = select.val();
                    field.model.updateRow (
                        field.row,
                        mods
                    );
                    */
                   // field.model.updateRow(field.row, {cloupra__Process__c: select.val(), cloupra__Process__r:{Id: select.val(), Name: ptext}});
                    field.model.updateRow(field.row, {cloupra__Process__c: select.val(), cloupra__Process__r: skuid.$M('Processes').dataMap[select.val()]});
                });
                
                
                var availableProcesses = [];
                
                //If no service selected, get processes that relate to 'Client'
                if(!newClientProcess.cloupra__Service__r) {
                    //Fetch processes Related_To = 'Client'
                    $.each(clientProcesses, function() {
                        availableProcesses.push(this);
                    });
                }
                
                //If a service is selected, get processes Related_To = 'Any Service' or where a ServiceProcess junction object exists
                else {
                    
                    //Also, because a service could be both mapped via junction object and relate to 'Any Service'- dedup is required
                    
                    var dedup = {};
                    if(relatedServices[newClientProcess.cloupra__Service__r.cloupra__Service_Type__c]) {
                        $.each(relatedServices[newClientProcess.cloupra__Service__r.cloupra__Service_Type__c], function() {
                            availableProcesses.push(this);
                            dedup[this.Id] = this;
                        });
                    }
                    
                    
                    $.each(anyServiceProcesses, function() {
                        if(dedup[this.Id])
                            return;
                            
                        availableProcesses.push(this);
                    });
                }
            
                //Now sort and create each available object as an &lt;option&gt;
                if(!availableProcesses || !availableProcesses.length) 
                    return;
                
                availableProcesses.sort(function(a, b) {
                    return a.cloupra__Order__c - b.cloupra__Order__c;
                });
                
                $.each(availableProcesses, function(){
                    var option = $('&lt;option&gt;').appendTo(select).val(this.Id).text(this.Name);
                    if(this.Id == value) {
                        option.attr('selected', 'selected');
                    }
                });
            }
            else {
                skuid.ui.fieldRenderers.PICKLIST[field.mode](field, field.row.value);
            }
        });   
	});
})(skuid);</jsitem>
            <jsitem location="inline" name="ValidateAndGenerateTasks" cachelocation="false" url="">(function(skuid){
	var $ = skuid.$;
	$(document.body).one('pageload',function() {
		var models = skuid.model.map();
		var newClientProcess = models.NewClientProcess;
		var newTasks = models.NewTasks;		
        var editor = $('#launch-process-wiz-title').data('object').editor;

		skuid.snippet.registerSnippet('validateStep1', function() {
            return skuid.snippet.getSnippet('validateFields')(['NewClientProcess'], '#launch-process-wiz-title');
		});

		skuid.snippet.registerSnippet('validateStep2', function() {
            return skuid.snippet.getSnippet('validateFields')(['NewTasks'], '#launch-process-wiz-title');
		});
		
	    skuid.snippet.registerSnippet('validateEntityOrServiceMust', function() {
	        editor.clearMessages();
	        var validationErrors = [];
            var entity = $('.sp-entity input').val();
            var srv = $('.sp-service-picklist input').val();
            var allSrv = $('.sp-service-ac input').val();


            var isEmpty = function(val) {
                return /^\s*$/.test(val);
			};
            
            var relatedToValidationMsg = 'Required Field have no Value [Entity] OR [Service]';
            
            if((!entity || isEmpty(entity)) &amp;&amp; (!srv || isEmpty(srv)) &amp;&amp; (!allSrv || isEmpty(allSrv))) {
                validationErrors.push({message:relatedToValidationMsg, severity:'ERROR'});
			}
            // Check whether validation errors were found
            if (validationErrors.length) {
                editor.handleMessages(validationErrors);
            	return false;
			} 
            else {
                return true;
			}	        
		});
	    
	    skuid.snippet.registerSnippet('generateTasks', function(params) {
			$.blockUI({
				message: 'Retrieving the steps for this process type. Hold on a moment...',
				css:{
					top:'200px'
				}
			});
			
			//remove all rows from task model
	        if(skuid.$M('NewTasks').data[0]) {
			    skuid.$M('NewTasks').abandonRows(skuid.$M('NewTasks').data);
			}
			var client = models.Client;
			var clientRow = client ? client.getFirstRow() : null;
			
			//Get the selected process from Step 1.
			//var selectedProcess = newClientProcess.getFirstRow().cloupra__Process__c;
			var processSteps = models.ProcessSteps;
			//var processStepDeps = models.ProcessStepDeps;
			//Deactivate all of the filterable conditions (filterable conditions have names)
			$.each(processSteps.conditions, function (i, condition) {
				if (condition.name) processSteps.deactivateCondition(condition);
			});
			
			var relDef = $.Deferred();
			var processDef = $.Deferred();
			var userDef = $.Deferred();
			
			var teamMember = skuid.utils.userInfo.userId;
			var tmName = skuid.utils.userInfo.name;
			var tmMap = {};
			
			var ownerList = [];
			var inactiveUsers = {};
			
			//Plug that selected process into the Process Steps model
			//(to retrieve the steps for the process).
			var psCondition = processSteps.getConditionByName('SelectedProcessId');
			processSteps.setCondition(psCondition, newClientProcess.getFirstRow().cloupra__Process__c);
			
			//Update the ProcessSteps model and when results are returned, generate a task per process step
			skuid.model.updateData([processSteps], function(results){   
				processDef.resolve();
			});
			
			processDef.then(function() {
				//Cache RelationshipType
				var relTypes = [];
				
				$.each(processSteps.data,function(i,processStep) {
					if(this.cloupra__Assignment_Type__c == 'Specify Now') {
					  ownerList.push(this.OwnerId);
					}
					
					//if(this.cloupra__Assignment_Type__c == 'Assign to Service/Client Owner') {}
					
					if(this.cloupra__Assignment_Type__c == 'Specify by Relationship') {
						relTypes.push(this.cloupra__Relationship_Type__c);
					}
				});
				
				var cpRow = newClientProcess.getFirstRow();
				//console.log(cpRow);
				if(cpRow &amp;&amp; cpRow.cloupra__Service__r) {
					teamMember = cpRow.cloupra__Service__r.OwnerId;
					tmName = cpRow.cloupra__Service__r.Owner ? cpRow.cloupra__Service__r.Owner.Name : '';
				    ownerList.push(teamMember);
				}				
				else if(cpRow &amp;&amp; cpRow.cloupra__Entity__r) {
					teamMember = cpRow.cloupra__Entity__r.OwnerId;
					tmName = cpRow.cloupra__Entity__r.Owner ? cpRow.cloupra__Entity__r.Owner.Name : '';
				    ownerList.push(teamMember);
				}
				
				if(relTypes.length) {    
					var relModel = skuid.$M('TeamMemberRelationships');
					var tmCond = relModel.getConditionByName('cloupra__To_Team_Member__c');
					var rtCond = relModel.getConditionByName('cloupra__Relationship_Type__c');
					
					relModel.setCondition(tmCond, teamMember);
					relModel.setCondition(rtCond, relTypes);
					
					relModel.updateData(function() {
						$.each(relModel.data, function() {
							tmMap[this.cloupra__Relationship_Type__c] = this;
				            ownerList.push(this.cloupra__From_Team_Member__c);

						});
						relDef.resolve();
					});
				}
				else {
					relDef.resolve();
				}				
			});	
			
			relDef.then(function() {
			    var inactiveUserModel = skuid.$M('InactiveUsers');
			    var theCond = inactiveUserModel.getConditionByName('userIds');
			    inactiveUserModel.setCondition(theCond, ownerList);
			    inactiveUserModel.updateData(function() {
			        $.each(inactiveUserModel.data, function() {
			            inactiveUsers[this.Id] = this;
			        });
			        userDef.resolve();
			        
			    });
			});
			
			userDef.then(function() {
				if(!newTasks.getFirstRow()) {
					$.each(processSteps.data,function(i, processStep) {
					    var row = newTasks.createRow();
					    
						/*
						// if we make task stage required we will have to set
(Edited)
Photo of Amy Dewaal

Amy Dewaal, Official Rep

  • 8,200 Points 5k badge 2x thumb
Gyan,

Thanks for the XML and clarification. Unfortunately, I can't do much to test with the XML because it has custom objects and fields that aren't present in my test org. If you'd like and are able, you could try to reproduce this problem using standard objects and fields, and then I would be able to copy and paste that XML. Otherwise, I have some more questions that might shed some light on the issue:
  • How are these Skuid page deployed? 
  • Is it through objects or page assignments? 
  • Is there anything in the Visualforce pages behind these Skuid pages that could be causing the Skuid page to show twice?
  • When components do double, does any message show in the Chrome developer console (hit opt-cmd-j on Mac or ctrl-shift-j on Windows to open it)?
Thanks!
Amy