• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

getUserId() in beforelaunchapp in hook.js doesn't seem to work for mobile.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • getUserId() in beforelaunchapp in hook.js doesn't seem to work for mobile.

    Hi,
    When using the following code in hook.js I can use the logged in user in my SQL statements. But this does not seem to work in a mobile device.

    beforelaunchapp : function(app){
    var parmAdded = !Ext.isEmpty(app.get('params'));
    if (app.get('type') === '*URL') {return true;}
    if (!parmAdded){
    app.set('params','userId=' + Valence.login.config.Runtime.getUserId());
    app.commit();
    }
    },

    Some suggestion how to fix this?

    Kind regards,
    Theo

  • #2
    Hi Theo,

    In the upcoming Valence 5.2+ update, we will be adding a way for you to call an RPG program to get additional params for the NAB application. That way it works for both desktop & mobile.

    When the update is released you would just create an RPG program that your NAB application will call at startup to get whatever param/values you might need during the runtime of the application.

    Thanks

    Comment

    Working...
    X