Pagination issue on click next button

Certified Associate Developer

I am using a grid to show record list where i have added pagination, when the list is loading first time and i am clicking on arrow button to go to next page in not working but when i am clicking the same button next time then it is working fine

Here i am using the refresh variable and using the refreshAlways set to true, when i am changing it to false is working fine, below code i am using in list page.

a!localVariables(
local!jobId:null,
local!localeDetails:rule!SDL_getLoggedInUserLocale(),
local!labels: rule!JT_getTranslation(
locale: local!localeDetails,
labelId: {
"jobId1",
cons!JT_LABEL_JOB_NAME2,
cons!JT_LABEL_EXTERNAL_JOB_ID,
cons!JT_LABEL_CLIENT_DIVISION,
cons!JT_LABEL_CLIENT_NAME,
"createdOn1",
"initiatingPm1",
"status2",
"phase2"
}
),
{
a!gridField(
label: "Jobs",
labelPosition: "ABOVE",
data: a!recordData(
recordType: 'recordType!{d495f140-8079-4d18-a9ff-667d19dacd59}Job',
filters: a!queryLogicalExpression(
operator: "AND",
filters: {
a!queryFilter(
field: 'recordType!{d495f140-8079-4d18-a9ff-667d19dacd59}Job.fields.{JOB_ID}JOB_ID',
operator: "=",
value: local!jobId
)
},
ignoreFiltersWithEmptyValues: true
)
),
columns: {
a!gridColumn(
label: rule!JT_getTranslatedLabel(labels: local!labels, labelId:"jobId1"),
sortField: 'recordType!{d495f140-8079-4d18-a9ff-667d19dacd59}Job.fields.{JOB_ID}JOB_ID',
value: a!linkField(
links: {
a!recordLink(
label: fv!row['recordType!{d495f140-8079-4d18-a9ff-667d19dacd59}Job.fields.{JOB_ID}JOB_ID'],
recordtype: 'recordType!{d495f140-8079-4d18-a9ff-667d19dacd59}Job',
identifier: /*rp!id*/fv!row['recordType!{d495f140-8079-4d18-a9ff-667d19dacd59}Job.fields.{JOB_ID}JOB_ID'])
}
),
width: "1X"
),
a!gridColumn(
label: rule!JT_getTranslatedLabel(labels: local!labels, labelId:cons!JT_LABEL_JOB_NAME2),
sortField: 'recordType!{d495f140-8079-4d18-a9ff-667d19dacd59}Job.fields.{JOB_NAME}JOB_NAME',
value: fv!row['recordType!{d495f140-8079-4d18-a9ff-667d19dacd59}Job.fields.{JOB_NAME}JOB_NAME'],
width: "1X"
),
a!gridColumn(
label: "",
value: a!richTextDisplayField(
value: {
a!richTextIcon(
icon: "tasks",
link:
a!recordLink(
label: fv!row['recordType!{d495f140-8079-4d18-a9ff-667d19dacd59}Job.fields.{JOB_ID}JOB_ID'],
recordtype: 'recordType!{d495f140-8079-4d18-a9ff-667d19dacd59}Job',
identifier: /*rp!id*/fv!row['recordType!{d495f140-8079-4d18-a9ff-667d19dacd59}Job.fields.{JOB_ID}JOB_ID'],
dashboard: cons!JT_URLstubForTaskViewInJobRecord,
openLinkIn: "SAME_TAB"
),
linkstyle: "STANDALONE",
size:"MEDIUM_PLUS"
)
}
),
align: "CENTER",
width: "ICON"
),
a!gridColumn(
label: rule!JT_getTranslatedLabel(labels: local!labels, labelId:cons!JT_LABEL_EXTERNAL_JOB_ID),
sortField: 'recordType!{d495f140-8079-4d18-a9ff-667d19dacd59}Job.fields.{EXTERNAL_JOB_ID}EXTERNAL_JOB_ID',
value: rule!JT_limitCharactersForAlphanumericString(
string: fv!row['recordType!{d495f140-8079-4d18-a9ff-667d19dacd59}Job.fields.{EXTERNAL_JOB_ID}EXTERNAL_JOB_ID']
),
width: "1X"
),
a!gridColumn(
label: rule!JT_getTranslatedLabel(labels: local!labels, labelId:cons!JT_LABEL_CLIENT_DIVISION),
sortField: 'recordType!{d495f140-8079-4d18-a9ff-667d19dacd59}Job.fields.{CLIENT_NAME}CLIENT_NAME',
value: fv!row['recordType!{d495f140-8079-4d18-a9ff-667d19dacd59}Job.fields.{CLIENT_NAME}CLIENT_NAME'],
width: "1X"
),
a!gridColumn(
label: rule!JT_getTranslatedLabel(labels: local!labels, labelId:cons!JT_LABEL_CLIENT_NAME),
sortField: 'recordType!{d495f140-8079-4d18-a9ff-667d19dacd59}Job.fields.{CLIENT_DIVISION}CLIENT_DIVISION',
value: fv!row['recordType!{d495f140-8079-4d18-a9ff-667d19dacd59}Job.fields.{CLIENT_DIVISION}CLIENT_DIVISION'],
width: "1X"
),
a!gridColumn(
label: rule!JT_getTranslatedLabel(labels: local!labels, labelId: "phase2"),
sortField: 'recordType!{d495f140-8079-4d18-a9ff-667d19dacd59}Job.fields.{PHASE_TEXT}PHASE_TEXT',
value: fv!row['recordType!{d495f140-8079-4d18-a9ff-667d19dacd59}Job.fields.{PHASE_TEXT}PHASE_TEXT'],
width: "1X"
),
a!gridColumn(
label: rule!JT_getTranslatedLabel(labels: local!labels, labelId: "status2"),
sortField: 'recordType!{d495f140-8079-4d18-a9ff-667d19dacd59}Job.fields.{STATUS_TEXT}STATUS_TEXT',
value: fv!row['recordType!{d495f140-8079-4d18-a9ff-667d19dacd59}Job.fields.{STATUS_TEXT}STATUS_TEXT'],
width: "1X"
),
a!gridColumn(
label: rule!JT_getTranslatedLabel(labels: local!labels, labelId:"initiatingPm1"),
sortField: 'recordType!{d495f140-8079-4d18-a9ff-667d19dacd59}Job.fields.{PRIMARY_PM}PRIMARY_PM',
value: rule!JT_displayUser(fv!row['recordType!{d495f140-8079-4d18-a9ff-667d19dacd59}Job.fields.{PRIMARY_PM}PRIMARY_PM']),
width: "1X"
),
a!gridColumn(
label: concat(rule!JT_getTranslatedLabel(labels: local!labels, labelId:"createdOn1")," ",
stripwith(
text(
now(),
"(Z)"
),
" "
)),
sortField: 'recordType!{d495f140-8079-4d18-a9ff-667d19dacd59}Job.fields.{CREATED_ON}CREATED_ON',
value: rule!JT_formFormatedTime(fv!row['recordType!{d495f140-8079-4d18-a9ff-667d19dacd59}Job.fields.{CREATED_ON}CREATED_ON']),
width: "1X"
)
},
pageSize: cons!JT_QUERY_THREAD_BATCH_SIZE,
initialSorts: {
a!sortInfo(
field: 'recordType!{d495f140-8079-4d18-a9ff-667d19dacd59}Job.fields.{JOB_ID}JOB_ID'
)
},
validations: {},
spacing: "DENSE",
refreshAlways: true,
refreshAfter: "RECORD_ACTION",
userFilters: {
'recordType!{d495f140-8079-4d18-a9ff-667d19dacd59}Job.filters.{04ea2237-315c-47a7-a09b-d689b869cbf7}Client',
'recordType!{d495f140-8079-4d18-a9ff-667d19dacd59}Job.filters.{a1860007-7ce2-4728-87e7-be2c0f2fba86}Client Division',
'recordType!{d495f140-8079-4d18-a9ff-667d19dacd59}Job.filters.{42e649c6-b096-438a-b0b3-cf32a9be54dc}Created On',
'recordType!{d495f140-8079-4d18-a9ff-667d19dacd59}Job.filters.{6e2f0802-07b2-4594-9133-3e9d4ac738f2}GP_Client',
'recordType!{d495f140-8079-4d18-a9ff-667d19dacd59}Job.filters.{1f03b406-760c-4088-a7ab-5ac9f5fba1ec}Has TD',
'recordType!{d495f140-8079-4d18-a9ff-667d19dacd59}Job.filters.{1143edca-aeec-420c-af5f-3099b0b8a464}Status',
'recordType!{d495f140-8079-4d18-a9ff-667d19dacd59}Job.filters.{e419510c-3945-4199-9b75-0f9e76a829e6}Show Archived'
},
showSearchBox: true,
showRefreshButton: true,
recordActions: {a!recordActionItem(action:'recordType!{d495f140-8079-4d18-a9ff-667d19dacd59}Job.actions.{da87a40c-c123-4fc8-ab59-1c6be32787b5}createNewJob')},
openActionsIn:"SAME_TAB",
actionsDisplay: "LABEL"
)
}

)

  Discussion posts and replies are publicly visible