{"id":255,"date":"2016-03-04T10:11:39","date_gmt":"2016-03-04T15:11:39","guid":{"rendered":"http:\/\/salzlechner.com\/dev\/?p=255"},"modified":"2016-03-11T06:45:31","modified_gmt":"2016-03-11T11:45:31","slug":"starting-a-specific-view-using-a-url","status":"publish","type":"post","link":"http:\/\/salzlechner.com\/dev\/2016\/03\/04\/starting-a-specific-view-using-a-url\/","title":{"rendered":"Starting a specific view using a URL"},"content":{"rendered":"<p>If you want to launch a specific view based on the url entered you can that by overriding GetDefaultView inside the oWebApp object<\/p>\n<p>For example in the WebOrder project add the following code<\/p>\n<pre class=\"lang:default decode:true\">    Function GetDefaultView Returns Handle\r\n        String sParameter\r\n        Get UrlParameter \"customer\"to sParameter\r\n \r\n        If (sParameter&lt;&gt;\"\") Function_Return (oCustomer)\r\n        Else Begin\r\n            Integer hoDefault\r\n            Forward Get GetDefaultView to hoDefault\r\n            Function_Return hoDefault\r\n        End\r\n        \r\n    End_Function<\/pre>\n<p>This will check the url parameter &#8216;customer&#8217; and if set to a value will automatically show the customer view<\/p>\n<p>now if we navigate to the following url<\/p>\n<pre class=\"lang:default decode:true \">http:\/\/localhost\/WebOrder_18_2\/Index.html?customer=1<\/pre>\n<p>the application will automatically show the customer view<\/p>\n\n\t\t<div class='author-shortcodes'>\n\t\t\t<div class='author-inner'>\n\t\t\t\t<div class='author-image'>\n\t\t\t<img src='http:\/\/salzlechner.com\/dev\/wp-content\/uploads\/sites\/2\/2016\/02\/mike5crop-566174_60x60.jpg' alt='' \/>\n\t\t\t<div class='author-overlay'><\/div>\n\t\t<\/div> \n\t\t<div class='author-info'>\n\t\t\tMichael Salzlechner is the CEO of StarZen Technologies, Inc.<\/p>\n<p>He was part of the Windows Team at Data Access Worldwide that created the DataFlex for Windows Product before joining <a href=\"http:\/\/starzen.com\">StarZen Technologies<\/a>. StarZen Technologies provides consulting services as well as custom Application development and third party products specifically for DataFlex developers<\/p>\n\t\t<\/div>\n\t\t\t<\/div>\n\t\t<\/div>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Want to know how to start a specific view from a URL in your WebApp. Check this post to see how you can do that with a small amount of code<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","ngg_post_thumbnail":0,"footnotes":""},"categories":[27],"tags":[],"class_list":["post-255","post","type-post","status-publish","format-standard","hentry","category-dataflex-webapp"],"_links":{"self":[{"href":"http:\/\/salzlechner.com\/dev\/wp-json\/wp\/v2\/posts\/255","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/salzlechner.com\/dev\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/salzlechner.com\/dev\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/salzlechner.com\/dev\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/salzlechner.com\/dev\/wp-json\/wp\/v2\/comments?post=255"}],"version-history":[{"count":2,"href":"http:\/\/salzlechner.com\/dev\/wp-json\/wp\/v2\/posts\/255\/revisions"}],"predecessor-version":[{"id":261,"href":"http:\/\/salzlechner.com\/dev\/wp-json\/wp\/v2\/posts\/255\/revisions\/261"}],"wp:attachment":[{"href":"http:\/\/salzlechner.com\/dev\/wp-json\/wp\/v2\/media?parent=255"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/salzlechner.com\/dev\/wp-json\/wp\/v2\/categories?post=255"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/salzlechner.com\/dev\/wp-json\/wp\/v2\/tags?post=255"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}