This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal


Dec 9, 2013, 1:18 PM
1 Posts

Adding menu functionality to Inotes depending on profile document entries

  • Category: iNotes
  • Platform: All Platforms
  • Release: 9.0
  • Role:
  • Tags: Inotes,Extension,Profiles
  • Replies: 1

I am trying to add some functionality to Inotes using the Formsxx_9.ntf.

I have succeeded in adding some menu entries which will start agents in the users mail application.

What i am trying to do now is to switch the menu entries on or off depending on etries in a specific profile document in the application.

What i understood from studying Forms_9.ntf and the available documentation (Redbook) is that INotes gives me access to profile documents using this code. @DbCommand("haiku";"h_GetProfileField";"calendarprofile";"Owner")

so i tried the following in the Custom_JS_Lite subform in Forms9_x.nsf

 in this function

function Custom_Scene_Actions_Lite(s_MenuID)

...

 // Fetch myProfile document values
    var myAction = {@DbCommand("Haiku";"h_GetProfileField";"myProfile";"myAction")};
    alert("myAction var: " + myAction);

... Before i add the menu items to the menu.

But i am obviously missing something here. Because loading this code results in having a blank Inotes Screen.

So what am i missing?

And it ist not the alert that is giving me trouble. If i remove this line and add only the first one the result is the same.

Thank you in advance for anserring this question.

Dec 16, 2013, 2:43 PM
8 Posts
Try this
You shouldn't put user-specific data in Custom_JS_Lite, because that subform is cached on the server.  Instead, user-specific data should be in SessionInfo.  You can add data to SessionInfo with the Custom_SessionInfo subform.  Remove the <NotesComment> tags around the contents and insert your code there.  

Try something like this:

// Example code that sets mail view as the only area
function com_ibm_dwa_haiku_Custom(){
//        this.sAreas='010000';
this.myAction  = '<dwa:getprofilefield profilename="iNotesProfile" fieldname="MailSort" jsdata="yes" />';

       
}
(function() {
        var haiku_lite = com_ibm_dwa_haiku;
        com_ibm_dwa_haiku = function() {
                haiku_lite.apply(this, arguments);
                com_ibm_dwa_haiku_Custom.apply(this, arguments);
        };
        com_ibm_dwa_haiku.prototype = haiku_lite.prototype;
})();


Then, in Custom_Scene_Actions_Lite, you can check the value of haiku.myAction.

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal