Hello,
I have a record action which shows "Add comment" and after completing/adding the comment details the record action should get updated to database or record. But it is not refreshing dashboard or interface. Only after page refresh page only it's refreshing but not immediately after the action submission.
a!columnLayout( contents: { a!recordActionField( actions: a!recordActionItem( action: 'recordType!{6d2a7f52-9952-4737-bb95-d3f3a29c06ac}PIMS Project Details.actions.{4e341a40-54be-42c6-ac1e-7e52004c1fca}comment', identifier: ri!projectDetails['recordType!{6d2a7f52-9952-4737-bb95-d3f3a29c06ac}PIMS Project Details.fields.{dedeac6d-7da7-4635-82db-b4816e2daa36}projectId'] ), style: "SIDEBAR_PRIMARY", display: "LABEL" ), },
Thanks,
Chiranjeevi
Discussion posts and replies are publicly visible
Can you confirm if the process has activity chaining till the write records node?
Yes, I am using the activity changing as well as. still not refreshing the dashboard.
This looks correct - but we still need to see the relevant local variable definition(s) on your dashboard interface to see whether they're configured properly to refresh after a record action.
Hi Chiranjeevi Ghantasala , Your process model looks fine. You will have to provide us more detail on how your expression is configured within the dashboard Interface. We would need to see where your data is coming from. Also may be you can update the end node to terminate the process.
Konduru Chaitanya
Yes, I added the Expression is configured within the dashboard Interface
Mike Schmitt
Yes, Expression is configured within the dashboard Interface.
Can you share the code from interface where you are fetching the comments data in interface? If its a local variable, refresh variable or a rule input? If its a refresh variable have you added refreshAfter parameter as RECORD_ACTION ?
Harsha Sharma
I have got the data from the record type and storing into the local variables with refresh variables, Refresh after: "RECORD_ACTION ".
local!commentsHistory: a!refreshVariable( value: rule!xxxxx( projectId: ri!projectId, roleId: cons!xxx_PROJECT_ROLES[1], pagingInfo: a!pagingInfo( startIndex: 1, batchSize: 5000, sort: a!sortInfo( field: 'recordType!{02a27db2-7e89-498c-a3f9-4d645bbd9162}PIMS Project Comments.fields.{019ef13f-c369-4923-8b92-6dbae9a5d5b6}createdDatetime', ascending: false ) ) ).data, refreshAfter:"RECORD_ACTION" ),
So far it all look fine. There shouldnt be any issue. This same variable commentHistory is used to render the grid right? Are there any manipulations done to this further in your code somewhere?
Same variable I am using the further.
In that case, with the details we have so far I can't point what might be causing this refresh behaviour. Something between interface and process is causing this. To identify the cause, if I were you, I will call the rule directly on data of grid component or simplify the interface by commenting everything else except the field under investigation and then uncomment as works again! You can share with us interface structure if possible like is the record action and comment grid all in same UI, more code the better,
or else dissect your code line by line until you achieve the desired output. All the best!
Just to be sure, could you share how the variable commentHistory is being used?