186
Views
3
Comments
Getservername in P10 mobile
Question

So from some experimenting it looks like getservername just returns a blank string in mobile.  So I made an action on a web application, made it public and then referenced it from the mobile app.  Apparently even calling it from a mobile app causes getservername on the server action to return blank.  So we have stuff where it has to have the server name to build a url.  How do you get that to work in a mobile app in P10?

2016-05-04 16-40-03
Carlos Xavier
Staff

Hi Jason,

For client actions try the GetBookmarkableURL built-in function. You may get the server name from there.

For server actions, try the GetRequestDomain action from the HTTPRequestHandler extension. I think it returns exactly the server name.

2017-08-09 12-12-29
Jason Herrington

Going to try this this morning!!

UserImage.jpg
Paul Davies

GetBookmarkableURL works a charm.  Some simple string trimming and you are good to go.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.