Skip to main content

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 : ()=&amp;gt; skuid.$.unblockUI()
});</jsitem>
<jsitem location="inlinesnippet" name="loadNextAccount" cachelocation="false">skuid.$.blockUI();
skuid.model.getModel('Account').loadNextOffsetPage(
()=&amp;gt; skuid.$.unblockUI()
);</jsitem>
</javascript>
<css/>
<actionsequences uniqueid="sk-3Yc7-103"/>
</resources>
<styles>
<styleitem type="background" bgtype="none"/>
</styles>
</skuidpage>

Shmuel.  Sorry for taking a few days to get back to you.  We were seeing this on an internal page and remembered this post.  We seem to have worked around the problem when we add the Id field to the OrderBy property for the model.  

Its reminscient of long standing problems we’ve seen with the standard set controller.  See Ben’s discussion about that here:  https://community.skuid.com/t/table-rows-not-loading


Ordering by ID did not fix the problem!
Also, this issue wasn’t present before Spark!
Also, I need order by things other than the ID!

What do I do?


Rob, we are in a pretty tight spot here. Can someone from Skuid support help us out?


Shmuel, this is under investigation by our development team at the moment. I will update you as soon as I know more.
Thanks, Luzie


The issue “Records not being included in model when loading more records” has been resolved in 12.0.6 which is now available from the Skuid Releases page at https://www.skuid.com/releases/salesforce. As a reminder, Salesforce does NOT allow reverting back to prior versions of managed packages. Skuid always recommends installing new versions in a non-business critical sandbox environment to test all mission critical functionality before installing into a production environment. We also recommend that you update out of date themes after you upgraded.


This fixes the issue. Thank you.


Thank you for the feedback!


Reply