Skip to main content

Posts

Showing posts from December, 2012

Commom Interview Questions for a Domino Developer

1. To find if a particular item exists in lost of items what commands are there in formula lang and lotusscript? Ans : Formula : @Contains; @IsMember Script : Instring 2. Difference between @UserRoles and @UserNamesList Ans : @UserRoles - Roles in the ACL which the user has @UserNamesList - Groups in the ACL to which the user belongs to 3. If there are multiple commands to be executed on a click of a button in formula lang, how will you do it And : @Do(@Command1;@Command2.....) 4. What is the difference between @DBColumn adn @DBLookup. Where will each of them be used? 5. File upload using Formula language? And : The field to which the file is uploaded should be a Rich Text Field. Command is @@Do(@PostedCommand([EditGotoField]; "Field Name");@PostedCommand([EditInsertFileAttachment])) 6. On click on a button in the left frame, open a view in the right frame. Ans : @SetTargetFrame("FRAMERIGHT"); @Command([OpenView];...

What is the difference between soft locking and document locking (sometimes called hard locking) in Lotus Notes®, and when are these locking features are enabled?

Document Locking: In Notes/Domino 6.x, a database property feature called "Allow document locking" was introduced. When this property is enabled, any user with Author access or above can lock a document across all replicas . This prevents two or more users from making changes to the same document and then replicating - which would create replication conflict documents. To enable this feature, you can select the database property "Allow document locking" in the basics tab. Soft Locking: Soft locking was also a new feature in Notes/Domino 6, but it was not documented as clearly as document locking. Soft locks are in-memory locks that are enabled when documents are in memory, and are not persistent. The editor takes out a soft lock on a document when it is opened in edit mode, and then unlocks it when the document is closed. During the period of time when it is soft locked, no one else can edit that document but it only affects the current repl...

Make Sure Your Stylesheets Have the Right Content Type

Why a Domino-based website lost all its CSS styling when viewed over the internet, whereas it worked fine when viewed via the local intranet. The browser in question was Internet Explorer and almost instinctively. It's when stylesheets are sent to the browser with the wrong content-type, like with this Page: Make sure you use "other" and enter "text/css", like so: Some browsers let you off with this mistake. Some don't (Firefox). IE only allows the wrong content type until viewed with "Internet" settings.

During application development, you may find that you are dealing with a database that contains numerous Profile Documents. Individual Profile Documents can be modified or deleted using the GetProfileDocument method, but this is a time-consuming process if there are thousands of Profile Documents. How can multiple Profile Documents be processed or deleted simultaneously?

For example, the following returns all profiles named "Profile-Name" from the current database: Dim s as New NotesSession Dim db as NotesDatabase Dim col as NotesDocumentCollection Set db = s.currentdatabase Set col = db.GetProfileDocCollection("Profile-Name") Call col.RemoveAll(True) In Notes/Domino 8.0 and later, the following agent script example would return and delete all profiles within the current database: Sub Initialize Dim s As New NotesSession Dim db As NotesDatabase Dim col As NotesDocumentCollection Set db = s.currentdatabase Set col = db.GetProfileDocCollection Call col.RemoveAll(True) Messagebox"All Profiles Document Deleted" End Sub Note: In the Agent properties > Runtime section, the Target should specify None.

Using LotusScript in Lotus Notes®/Lotus Domino®, how can you get a handle to selected documents in an embedded view? How can you set a form or view so that documents can be selected?

Dim s As New notessession Dim db As notesdatabase Dim col As notesdocumentcollection Dim doc As notesdocument Set db=s.CurrentDatabase Set col=db.UnprocessedDocuments Print "Collection size: " & col.count Set doc=col.getfirstdocument While Not doc Is Nothing 'Perform desired operations Set doc=col.GetNextDocument(doc) Wend

JavaScript Errors - Throw and Try to Catch

The try statement allows you to define a block of code to be tested for errors while it is being executed. The catch statement allows you to define a block of code to be executed, if an error occurs in the try block. The JavaScript statements try and catch come in pairs. Syntax try   {   //Run some code here   } catch(err)   {   //Handle errors here   }

Notes DOM