Skip to main content

The Create Row action property “Have associated Components initially show this row in…” set to Edit Mode doesn’t work with field editors.


Example:


<skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="true" useviewportmeta="true" showheader="true">
<models>
<model id="accountTest" limit="" query="false" createrowifnonefound="false" datasource="salesforce" type="" sobject="Account">
<fields>
<field id="Name"/>
<field id="AccountNumber"/>
<field id="Id"/>
</fields>
<conditions/>
<actions/>
</model>
</models>
<components>
<buttonset model="accountTest" uniqueid="sk-2boQiu-116">
<buttons>
<button type="multi" label="Add in Edit Mode" icon="sk-icon-add">
<actions>
<action type="createRow" fieldmodel="accountTest" affectedrows="context" model="accountTest" appendorprepend="prepend" defaultmodefornewitems="edit"/>
</actions>
</button>
</buttons>
</buttonset>
<basicfieldeditor showheader="true" showsavecancel="true" showerrorsinline="true" model="accountTest" buttonposition="" uniqueid="sk-2boRIS-119" mode="read">
<columns>
<column width="50%">
<sections>
<section title="Section A" collapsible="no">
<fields>
<field id="Id"/>
<field id="Name"/>
<field id="AccountNumber"/>
</fields>
</section>
</sections>
</column>
<column width="50%">
<sections>
<section title="Section B">
<fields/>
</section>
</sections>
</column>
</columns>
</basicfieldeditor>
</components>
<resources>
<labels/>
<javascript/>
<css/>
</resources>
<styles>
<styleitem type="background" bgtype="none"/>
</styles>
</skuidpage>

It looks like you’ve set the “Add” to edit but the Field Editor isn’t set to edit. Try this:

























































I don’t want the field editor in edit mode. I want it in read with inline edit mode in case the model has records on query (on the test page I have no records just to simplify). But I want it in edit mode for new records created by the button’s action.


Is this clearer?


<skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="true" useviewportmeta="true" showheader="true">
<models>
<model id="accountTest" limit="2" query="true" createrowifnonefound="false" datasource="salesforce" type="" sobject="Account">
<fields>
<field id="Name"/>
<field id="AccountNumber"/>
<field id="Id"/>
</fields>
<conditions/>
<actions/>
</model>
</models>
<components>
<buttonset model="accountTest" uniqueid="sk-2boQiu-116">
<buttons>
<button type="multi" label="Add in Edit Mode" icon="sk-icon-add">
<actions>
<action type="createRow" fieldmodel="accountTest" affectedrows="context" model="accountTest" appendorprepend="prepend" defaultmodefornewitems="edit"/>
</actions>
</button>
</buttons>
</buttonset>
<basicfieldeditor showheader="true" showsavecancel="true" showerrorsinline="true" model="accountTest" buttonposition="" uniqueid="sk-2boRIS-119" mode="read">
<columns>
<column width="50%">
<sections>
<section title="Section A" collapsible="no">
<fields>
<field id="Id"/>
<field id="Name"/>
<field id="AccountNumber"/>
</fields>
</section>
</sections>
</column>
<column width="50%">
<sections>
<section title="Section B">
<fields/>
</section>
</sections>
</column>
</columns>
</basicfieldeditor>
</components>
<resources>
<labels/>
<javascript/>
<css/>
</resources>
<styles>
<styleitem type="background" bgtype="none"/>
</styles>
</skuidpage>

Ah. Yes. This is now clear. I’ll get that written up and let you know when this issue is resolved.


Reply