How would one go about creating a link to a record in my 18.2 Mobile WebApp?
In Email:
[COLOR=#0000ff][U]Note# 2345[/U][/COLOR] <-- click on note to go to record on oZoomView in WebApp.
Ben
Printable View
How would one go about creating a link to a record in my 18.2 Mobile WebApp?
In Email:
[COLOR=#0000ff][U]Note# 2345[/U][/COLOR] <-- click on note to go to record on oZoomView in WebApp.
Ben
A good start should be "GetDefaultView" in your oWebApp. In there you can ask for the url parameters with "UrlParameter" and then react acording to what you get.
[code]
Function GetDefaultView Returns Handle
String sMagic
Get UrlParameter "q" to sMagic[/code]
Hi Ben,
19.1 has 'Meaningful URLs and History Management' (see What's New in the doc). You may want to wait to upgrade (if possible) since this should drastically improve your ability to do so.
Previously, I have tried this in the OnLoad procedure of an Windows WebApp and it worked.
On the Mobile WebApp it is somehow not working.
In my oWebApp I created the GetDefailtView Function like this:
[CODE]
Function GetDefaultView Returns Handle Handle hoView
Get phoDefaultView to hoView
Boolean bOk bWebHost
String sResult sNoteIdno sRepId sJobId sItemId sBrowser
Get UrlParameter "NoteId" to sNoteIdno
//Move "3434" to sNoteIdno
If (sNoteIdno > "") Begin
Move (oZoomCallCenterNotes) to hoView
WebSet psNoteId to sNoteIdno
End
Else Begin
Move (oDashboard) to hoView
End
Function_Return hoView
End_Function[/CODE]
Somehow (debugging w/ breakpoint on "Get UrlParameter") the URL shows without the parameters supplied in the link.
When forcing the NoteId manually through the code after "Get UrlParameter" [CODE]Move "3434" to sNoteIdno[/CODE] the process works as expected.
So somehow the URL is being re-written?
Any idea why?
Ben
here is how to do it but as dennis said in 19.1 there will be a better way to do this
[URL="http://salzlechner.com/dev/2016/03/04/starting-a-specific-view-using-a-url/"]
http://salzlechner.com/dev/2016/03/04/starting-a-specific-view-using-a-url/[/URL]
Thank you for your reply. I know this works in the WindowsWebApp. I can't seem to make this work in the Mobile framework.
[QUOTE=Benjamin;338561]Thank you for your reply. I know this works in the WindowsWebApp. I can't seem to make this work in the Mobile framework.[/QUOTE]
seems to work in the mobile framework as well
just added the code to WebOrderMobile and it works
[CODE]
Function GetDefaultView Returns Handle
String sParameter
Get UrlParameter "demo" to sParameter
If (sParameter<>"") Function_Return (oDemoDialogs)
Else Begin
Integer hoDefault
Forward Get GetDefaultView to hoDefault
Function_Return hoDefault
End
End_Function
[/CODE]
[QUOTE=Benjamin;338481]Previously, I have tried this in the OnLoad procedure of an Windows WebApp and it worked.
On the Mobile WebApp it is somehow not working.
In my oWebApp I created the GetDefailtView Function like this:
[CODE]
Function GetDefaultView Returns Handle Handle hoView
Get phoDefaultView to hoView
Boolean bOk bWebHost
String sResult sNoteIdno sRepId sJobId sItemId sBrowser
Get UrlParameter "NoteId" to sNoteIdno
//Move "3434" to sNoteIdno
If (sNoteIdno > "") Begin
Move (oZoomCallCenterNotes) to hoView
WebSet psNoteId to sNoteIdno
End
Else Begin
Move (oDashboard) to hoView
End
Function_Return hoView
End_Function[/CODE]
Somehow (debugging w/ breakpoint on "Get UrlParameter") the URL shows without the parameters supplied in the link.
When forcing the NoteId manually through the code after "Get UrlParameter" [CODE]Move "3434" to sNoteIdno[/CODE] the process works as expected.
So somehow the URL is being re-written?
Any idea why?
Ben[/QUOTE]
that may be an issue with your IIS setup
do you have any url rewrite rules or allow https only settings or something like that?
I did have a url rewrite rule in place to force https. However, no signs of improvement after removing this.
When debugging w/ breakpoint on "Get UrlParameter", the URL still shows without the parameters supplied in the link.
Could there be another IIS setting?
[QUOTE=Benjamin;338569]I did have a url rewrite rule in place to force https. However, no signs of improvement after removing this.
When debugging w/ breakpoint on "Get UrlParameter", the URL still shows without the parameters supplied in the link.
Could there be another IIS setting?[/QUOTE]
on the https force rewrite there is a checkbox to force it to send the url parameters. other than that and if you do not use the rewrite i cant think of anything right now