Skip to main content
February 23, 2024
Question

Need help in Page Refresh

  • February 23, 2024
  • 5 replies
  • 0 views

Hi All ,

I am having following code ..calling start process model .. i want page to be refreshed after process model is complete. What will be the best way to implement.

a!buttonWidget(
label: cons!OCO_TXT_USER_ACTION_SUBMIT,
saveInto: {
a!save(
ri!userAction,
cons!OCO_TXT_USER_ACTION_SUBMIT
),
a!save(local!data,
a!startProcessLink(
processModel: cons!OPS_PM_UPDATE_SETUP_DETAILS,
processParameters: {

interactionDetails: a!update(
data: local!interationDetail,
index: {
OPS Interaction.fields.interactionId',
OPS Interaction.fields.isActive',
OPS Interaction.fields.createdBy',
OPS Interaction.fields.createdDt',
OPS Interaction.fields.updatedBy',
OPS Interaction.fields.updatedDt'
},
value: {
ri!InteractionId,
true(),
loggedInUser(),
now(),
loggedInUser(),
now()
}
),
npiDetails: local!npiDetails,
tinDetails: local!tinDetails,


},

))
},
submit: true,
style: "SOLID",
showWhen: local!currentStep = rule!OCO_nullSafeLength(local!formSteps),
validate: true
)

5 replies

davidj137213
Brainy
February 23, 2024

Remember that start Process is asynchornous..... And if you want to refresh the page you should use refreshVariables.

You should use activity chaning, recover some process variable from you interface after refresh, and update the contents if needed...

February 23, 2024

Hi harmanjots9955,
as my understanding startprocesslink() not work fine on the button.you can replace it by startprocess(),

but if you want to do it with  the startprocesslink() then try using a card layout(with rich text inside) and applying the start process link over the card layout With the recent padding customizations added to the card layout, we can try to make it look like a button.

or you can make use of the record action field - by adding your process as a related action to a record and showing the actions as per the style


try to apply end-to-end activity chaining throughout the process, the data that is getting updated will be refreshed in the interface if the data is coming from a query.
if you want to refresh the data that is not related to the process link data or the data that has not come from the query then we can use the refreshVariable function.

venkatrea696188
February 23, 2024
a!startProcessLink(

You are using startprocesslink on a button? is it working fine??

Just like david suggested saving back an variable and using refresh will do it. 

konduruc733182
February 23, 2024

Hello [mention:758d997946044cbaa0aa50c910825078:e9ed411860ed4f2ba0265705b8793d05] 

1. You cannot use Start Process Link in a button widget. Instead you can use Start Process in a button.
2. Assuming that you are not having any interface in the process you can use the a!startProcess().
3. If you have a user input task (Interface), then use a card layout as suggested by others above and use a startProcessLink to show the form and get things done.
4. I would personally recommend the use of Related Actions to execute such things as it would make everything simpler.



mathieud0001
Brainy
February 23, 2024