Index: AXimpl/Admin/CHUI/TerminalNavigationService.cls.xml =================================================================== diff -u -r48535 -r49026 --- AXimpl/Admin/CHUI/TerminalNavigationService.cls.xml (.../TerminalNavigationService.cls.xml) (revision 48535) +++ AXimpl/Admin/CHUI/TerminalNavigationService.cls.xml (.../TerminalNavigationService.cls.xml) (revision 49026) @@ -48,7 +48,20 @@ #dim ComputerNaam as %String = WorkstationName _ ".vanhoecke.be" #dim GebruikerId As %String = ..GebruikerLookup.GeefGebruikerId(AxGebruiker) Do ##class(TECH.Context.RuntimeContext).Instance().ZetGebruikerID(GebruikerId) - Do ..TerminalNavigatieService.RaadpleegOrderOpKlantScherm(GebruikerId, ComputerNaam, ..OrderLookup.GeefOrderIdVanBevestigdOrder(AxSalesId)) + + #Dim OrderID as %String = "" + #Dim KlantNr as %String = "" + try { + Set OrderID = ..OrderLookup.GeefOrderIdVanBevestigdOrder(AxSalesId) + Do ..TerminalNavigatieService.RaadpleegOrderOpKlantScherm(GebruikerId, ComputerNaam, OrderID) + } catch { + #dim Exception As TECH.Exceptions.Exception = ##class(TECH.ExceptionHandler).Catch(##class(AXimpl.Admin.DatabaseOutOfSyncException).%ClassName(1)) + If Exception.GeefExtraInfo() = "Minstens 2 bevestigde orders met dezelfde Ax SalesId gevonden" { + Do ##class(TECH.ExceptionHandler).Throw(Exception) + } + Set KlantNr = ..OrderLookup.GeefLaatstBekendeKlantNummerVoorAXSalesId(AxSalesId) + Do ..TerminalNavigatieService.RaadpleegKlant(GebruikerId,ComputerNaam,KlantNr,##class(APPS.CHUI.enu.KlantRaadpleegScherm).Order()) + } ]]>