Platform: Skuid On Salesforce
Version: 12.0.4
Browser: Chrome (71.0.3578.98)
OS: Windows 10 (64 Bit)
loadNextOffsetPage is not working, both in Javascript as well as when you press the “Load more” button on the bottom of a table.
This is probably related to loadAllRemainingRecords not working.
The symptoms are:
When loadNextOffsetPage is called, it finishes processing but does not load any more records when there are more records to load.
When loadAllRemainingRecords is called, it never finishes processing.
Below is a page where you can reproduce the issue. You’ll need to replace the name conditions on the Account model with the names of two accounts you know you have in your system.
When pressing the “Load All Accounts” you’ll see it blocks the ui and never unblocks.
When pressing “Load Next Account” it will block the ui, then unblock, but will not add another row into your model.
When pressing “Load more” at the bottom of the table it will block the ui, then unblock, but will not add another row into your model.
<skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="true" showheader="true">
<models>
<model id="Account" limit="1" query="true" createrowifnonefound="false" datasource="salesforce" sobject="Account">
<fields>
<field id="Id"/>
<field id="Name"/>
</fields>
<conditions>
<condition type="multiple" value="" field="Name" operator="in" enclosevalueinquotes="true">
<values>
<value>Banks</value>
<value>User Account</value>
</values>
</condition>
</conditions>
<actions/>
</model>
</models>
<components>
<buttonset model="Account" uniqueid="sk-3Yd8-245">
<buttons>
<button type="custom" label="Load All Accounts" uniqueid="sk-3Ydo-353" snippet="loadAllRemainingAccounts"/>
<button type="custom" label="Load Next Account" uniqueid="sk-3Yec-381" snippet="loadNextAccount"/>
</buttons>
</buttonset>
<skootable showconditions="true" showsavecancel="false" showerrorsinline="true" searchmethod="server" searchbox="false" showexportbuttons="false" hideheader="false" hidefooter="false" pagesize="10" alwaysresetpagination="false" createrecords="false" model="Account" buttonposition="" mode="readonly" allowcolumnreordering="false" responsive="true" uniqueid="sk-3YcA-107" emptysearchbehavior="query">
<fields>
<field id="Id" hideable="true" uniqueid="fi-3YcD-124"/>
<field id="Name" hideable="true" uniqueid="fi-3YcD-125"/>
</fields>
<rowactions/>
<massactions usefirstitemasdefault="true"/>
<views/>
<searchfields/>
</skootable>
</components>
<resources>
<labels/>
<javascript>
<jsitem location="inlinesnippet" name="loadAllRemainingAccounts" cachelocation="false">skuid.$.blockUI();
skuid.model.getModel('Account').loadAllRemainingRecords({
finishCallback : ()=&gt; skuid.$.unblockUI()
});</jsitem>
<jsitem location="inlinesnippet" name="loadNextAccount" cachelocation="false">skuid.$.blockUI();
skuid.model.getModel('Account').loadNextOffsetPage(
()=&gt; skuid.$.unblockUI()
);</jsitem>
</javascript>
<css/>
<actionsequences uniqueid="sk-3Yc7-103"/>
</resources>
<styles>
<styleitem type="background" bgtype="none"/>
</styles>
</skuidpage>