Hi!
I tried to refresh items on Dialog Closed using DA.
When
Event: Dialog Closed
Selection Type: Region
Region: region_name
True
Action: Refresh
Selection Type: Item(s)
Item(s): :PXX_ITEM, :PXX_ITEM2
When I change something and close the dialog all items are unchanged.
Thanks in advance!
I have the following questions for the above:
Are you opening the dialog from the region “region_name”? I mean, you have a button or link on this region to open that dialog.
Are the items (Pxx_ITEM, Pxx_ITEM2) exists on region “region_name”?
Is the region “region_name” is the form region (based on a table)? If not, then how are you getting the values for these items?
I open dialog by clicking on button which is on the region_name region.
Items are display only, and they shows data from table on region_name region.
Okay. Then you can notice on the parent page, which is based on a form, there you will find a process at Before Header level, which executes on page load.
So to refresh the form, you will have to reload the parent page on the close dialog.
To do this, remove the True action you created to refresh the items and create a new True action to execute JavaScript code, and add the following code in it:
Now after the dialog closes, the page will reload to display new values.
Please let me know for any further questions.
Thanks a lot, works now 🙂
Is possible to set the value without reloading the page?
Then you should not use the form region based on the table.
Just create the display fields and then you can create a True action to Set Value using the SQL query. Below is an example:
Items to Submit: px_item
Affected Items: Pxx_ITEM, Pxx_ITEM2