a month ago - last edited a month ago
Hi,
I have a problem when trying to transfer binding from Action to Page.
When I click on object table row and afterwards navigate directly to a Page, all works fine, the fields on that page show the binding informations.
If i click on the same Object Table but i navigate on a Popup(choose an operation(buttons) that affects the target page) and from Popop to the Page, the Page does not receive the binding from the first action:
Object Table -> OnPress(NavToPopup) -> Press Button on Popup -> OnPress(Initialize and Fetch data) -> NavToShowSalesOrderPage
I tried to use rules in the OnPress event of Popup Buttons but I was unable to transfer the binding.
OnPress Event of Pupup Button(Initialize)
let pageProxy = clientAPI.getPageProxy(); clientAPI.showActivityIndicator(clientAPI.localizeText('Loading')); clientAPI.executeAction("/App/Actions/ClosePage.action"); pageProxy.setActionBinding(pageProxy.getBindingObject()); return clientAPI.executeAction("/App/Rules/CreateSalesOrder/FetchSalesOrder.js");
export default async function FetchSalesOrder(clientAPI) { let pageProxy = clientAPI.getPageProxy(); //get action binding var binding = pageProxy.getActionBinding(); //get client data let appClientData = pageProxy.getAppClientData();
....Fetch Operations...
clientAPI.dismissActivityIndicator(); return clientAPI.executeAction("/App/Actions/ShowSalesOrderActions/NavToShowSalesOrder.action"); }
How I can transfer the binding ?
Thank you.
Request clarification before answering.
Without the full project I can't say for sure why. However, I did a test with the following setup.
Data Table -> OnPress -> Navigation Action -> Modal Page
On the Modal page I have a button and a Key Value control to confirm the default binding for the page is the selected row from the data table. In the OnPress of the button I call the first rule
Button -> OnPress -> Rule 1 -> SetActionBinding -> Rule 2 -> Navigation -> Detail Page
I checked via the debugger that in both Rule 1 and Rule 2 the ClientAPI.binding was still set to the selected Row from the Data Table. On the Detail Page there are default bindings to the data from the selected row and they are populated as expected confirming the binding was passed from the Data Table row to the detail page.
Since there is stuff in your Rule 2 I don't see I can't say if that impacts anything or not but it looks like you should be good to go assuming your detail page is trying to bind to the row properties from the Data Table.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
30 | |
10 | |
8 | |
8 | |
7 | |
6 | |
6 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.