Code displayed in browser, but errors in IBM Notes client

I have two calculated fields and want to update them. It works fine in the browser, but the IBM Notes client gives an error.

Here is the code:

var Admin = @DbColumn("", "GoreAdmins", 1); var AdminBackup = @DbColumn("", "GoreAdmins", 2); if (Admin && typeof Admin == "string") Admin = new Array(Admin); if (AdminBackup && typeof AdminBackup == "string") AdminBackup = new Array(AdminBackup); if (document1.isNewNote()) { document1.setValue("Admin", Admin); document1.setValue("AdminBackup", AdminBackup); }; 

I get an error on this line:
document1.setValue("Admin", Admin);

+6
source share
1 answer

The first parameter for @DbColumn() and @DbLookup should be the database, the simplest with @DbName() . The empty string transfer method will not work in XPiNC. It is standard for Notes Notes development, works for XPages in a browser, but for this reason is bad practice.

+7
source

All Articles