Thanks Santosh. It worked.
Parameter 'referencePage':'workOrderDetails' that you have used here, is critical.
Thank you very much.
Original Message:
Sent: Wed June 26, 2024 07:19 AM
From: Santosh Bade
Subject: Maxmo Mobile - Open Change Status Sliding Drawer from workOrderDetails page
Hi,
if I understood your requirement clearly, then this is what you need -
<dialog id="xxMsgDialog_startTimer" on-primary-action="onStartTimerYes" on-primary-action-arg="{{'item': woDetailResource.item, 'datasource': woDetailResource.datasource, 'worktype':'work','action': 'start'}}" on-secondary-action="onStartTimerNo" on-secondary-action-arg="{{'item': woDetailResource.item, 'datasource': 'woDetailResource', 'worktype':'work','action': 'start', 'page':page, 'referencePage':'workOrderDetails'}}" primary-action-text="Yes" secondary-action-text="No" title="Confirm Status Change">
<label label="Are you sure you want to start Timer?" wrap="true" id="a1_kkxe_"/>
onStartTimerNo(evt){
let woScheduleController = this.app.findPage("schedule").controllers[0];
woScheduleController.openChangeStatusDialog(evt);
}
------------------------------
Santosh Bade
Original Message:
Sent: Mon June 24, 2024 09:44 AM
From: maximo User
Subject: Maxmo Mobile - Open Change Status Sliding Drawer from workOrderDetails page
I have a requirement to open a custom confirmation dialog box when user taps on the Start Work button in Techmobile app. There are 2 options, Yes and No.
Tapping on Yes - will allow the user to start the work - which I have implemented.
Tapping on No - will close the confirmation dialog box and open the Change Status sliding drawer.
In my appCustomizations.js - I tried calling "openWoDtlChangeStatusDialog" from WorkOrderDetailsController.js as below. But, I received error "Cannot read properties of undefined (reading 'serviceaddress')"
noResponse(event) {
this.page.findDialog('dialog_ConfirmationOnStartWork')?.closeDialog();
//Call Status page
this.page.callController('openWoDtlChangeStatusDialog',event);
}
I then tried to call the "openChangeStatusDialog" method from the schedulePage controller but received other errors. I haven't received any success so far.
Could someone please guide on this?
Thanks.
------------------------------
maximo User
------------------------------