Wednesday, June 27, 2012

Render Kit

There are Five Types render kit:

HTML_BASIC
HTML_RCP
HTML_SAMETIME
HTML_NOTES
HTML_MOBILE

HTML_BASIC-used on the web

HTML_RCP-used on the notes

using render kit tag i show one label in a browser as a “BROWSER” and

same label in notes as a “NOTES”

Example source code given below. you just put this code between

<xp:view>…………………</xp:view>

Code:

<xp:label value="BROWSER" id="label1">

<xp:label.HTML_RCP value="NOTES"/>

</xp:label>
for well know about Render kit see following link
http://www-10.lotus.com/ldd/ddwiki.nsf/dx/XPages_configuration_file_format_page_5

Thursday, June 21, 2012

View entry not found in view index on Lotusscript error

Hi Today I had a simple problem but it wasted my little more time. Actually I am checking the documents one by one from a view.

See the code below:- [Code has been modified because of public]

Dim session As New NotesSession
    Dim db As NotesDatabase
    Dim view As notesview
    Dim doc As notesDocument
    Set db=session.CurrentDatabase
    Set view=db.GetView("vwFirst")
    Set doc=view.GetFirstDocument
    While Not doc Is Nothing
        If doc.field_Name(0)="User : 99999" Then
            Msgbox "Test"
            doc.field_Name="User : 99999"
            Call doc.Save(True,False)
        End If
        Set doc=view.GetNextDocument(doc)
    Wend

While executing the code, Whenever the document is saving, there I am getting the view entry not found error. After some heading with this code and view. I got a idea that why not the document collection have been affected after the document is being saved. Yes that is the solution. After saving the document the view's document has inter changed depends on their modification date.

Finally the solution is, Please add the view.autoUpdate=false This will solve the problem easily.

Wednesday, June 13, 2012

$Revisions - Features

In our notes replication is a great feature. Because of this we can easily synchronize the data from one to another. But we used to face some problem while replicating.

This is not a problem.

I had faced one situation that,I need to get the visitor's count of the document.
Don't say see the updatedBy field. That is unique(authors). So here we can not get the count. Finally I got a simple idea on revision field after discussing with my friend Mahe, Then I researched with that field, Follow this

The Revision field has  sequence number. But the document should be re-saved then only it revises the document.

But I do not know that how to get the sequence number from that field by programmatic-ally. I am searching... http://stackoverflow.com/questions/11009441/how-to-get-the-sequence-number-of-revisions-field




Thursday, June 7, 2012

Sequence number generation in Replication copies

Very very funny, familiared and important issue. Mostly everyone has faced this issue. The issue is that, I am having the employee database on main server. And I have a lot of replica copies in different location. I need a exact sequence unique long needed. If replication copy's same document is modified in more than one different location then replication conflict occurs. And also the sequence number will get spoiled.  And some people used to say that this is easy but now only I have familiared with this. Only the people who have already faced this issue, will tell that it can not be solved. We have to manually resolve this.

Yes exactly, Project should be done with the customer requirements. No customer does like the rework.

Okay I come to point...

Before heading this issue we need to know about the "Replication conflict", "Replication", "Document Locking", "Developer's Responsibility [kidding]" :)

We have a lot of tool for handling this. But we are  third party for customer. If we purchased tool from third party then we have a third party for our tool. so sixth party for customer :) . No customer needs that relationship. And also the license period and other things may conflict with our agreement.

Again we come with document locking. We need to enable the Allow document locking in database property. And we have to enable the master server in ACL of the database.These are features of document locking.,

if the document is not locked, the method places the lock and returns True
if the document is locked and the current user is one of the lock holders, the method returns True
if the document is locked and the current user is not one of the lock holders, the method returns False
if the document is modified by another user before the lock can be placed, the method raises an error


But the user does not want the hard reworking. So I analyze for the solution on this issue.

But still I have not clear idea about this. But complex way is there, That is, we have to check all the replication servers and while user tries to edit the document for new document or sequence number creation we do not do it in replication server. Try to write a schedule agent for this.That will be the great idea. or Try to make a common sequence number format, Like Date + Location + Number , etc.,

For creating sequence number, funny this is too easy. Once fresher or new notes person needed, then reply me back

Monday, June 4, 2012