Skip to content
Salzlechner
All notes

Development

Starting a specific view using a URL

Mar 4, 2016 · DataFlex WebApp

If you want to launch a specific view based on the url entered you can that by overriding GetDefaultView inside the oWebApp object

For example in the WebOrder project add the following code

Function GetDefaultView Returns Handle
        String sParameter
        Get UrlParameter "customer"to sParameter
 
        If (sParameter<>"") Function_Return (oCustomer)
        Else Begin
            Integer hoDefault
            Forward Get GetDefaultView to hoDefault
            Function_Return hoDefault
        End
        
    End_Function

This will check the url parameter 'customer' and if set to a value will automatically show the customer view

now if we navigate to the following url

http://localhost/WebOrder_18_2/Index.html?customer=1

the application will automatically show the customer view

specifically for DataFlex developers