Monday, April 29, 2013

Lotus Notes C API's for fetching Agent properties

Hi All,

I have created a tool for monitoring the scheduled agents. I have found an API's which help us to fetch the agent properties. This is not my own code, i found this API's in IBM website. Please refer the below code.
Note : 
1. While running, you have to check target and source database should have full acess, otherwise your server or lotus notes client will crash.
2. Dont Schedule it, try to run this API manually.

Call this API as with paramenter - GetAssistInfo db, a$, info


Sub GetAssistInfo(db As NotesDatabase, agent As String, info As AssistInfo)
np$ = Space(1024)
OSPathNetConstruct 0, db.Server, db.FilePath, np$

Dim hDB As Long
NSFDbOpen np$, hDB
If hDB = 0 Then
Messagebox "Can't open database", 16
Exit Sub
End If

pt& = Instr(agent, "|")
If pt& = 0 Then ti$ = Trim$(agent) Else ti$ = Trim$(Left$(agent, pt& - 1))

Dim nID As Long
NIFFindDesignNote hDB, ti$, NOTE_CLASS_FILTER, nID
If nID = 0 Then
Messagebox "Can't find agent " & ti$, 16
Exit Sub
End If

If Instr(db.GetDocumentByID(Hex$(nID)).~$Flags(0), "f") = 0 Then
Messagebox ti$ & " is not an agent", 16
Exit Sub
End If

Dim hNT As Long
NSFNoteOpen hDB, nID, 0, hNT

Dim iB As BlockID, vB As BlockID
NSFItemInfo hNT&, "$AssistInfo", 11, iB, dt%, vB, nv&
If Not vB.hPool = 0 Then
p& = OSLockObject(vB.hPool) + vB.Block
Peek info.Version, p& + 2, 2
Peek info.TriggerType, p& + 4, 2
Peek info.SearchType, p& + 6, 2
Peek info.IntervalType, p& + 8, 2
Peek info.Interval, p& + 10, 2
Peek v&, p& + 12, 4
If v& <= 31 Then info.Time1 = v& Else info.Time1 = Cdat(v&/100/60/60/24)
Peek v&, p& + 16, 4
If v& <= 31 Then info.Time2 = v& Else info.Time2 = Cdat(v&/100/60/60/24)
t$ = Space(81)
ConvertTIMEDATEToText 0, 0, p& + 20, t$, 80, nt%
If Not nt% = 0 Then info.StartTime = Cdat(Left$(t$, nt%))
t$ = Space(81)
ConvertTIMEDATEToText 0, 0, p& + 28, t$, 80, nt%
If Not nt% = 0 Then info.EndTime = Cdat(Left$(t$, nt%))
Peek info.Flags, p& + 36, 4
OSUnlockObject vB.hPool
End If

NSFNoteClose hNT
NSFDbClose hDB
End Sub



Exporting PDF from Lotus notes documents

Hi All,

I have developed a tool called PDF generation , it will generate the PDF from notes documents which contains sub documents present in a notes embedded view.

I have used "Domino Java and  ITEXT library for generating the PDF from lotus notes documents, if any wants to generate the PDF, let me know, i can help you.

Download the ITEXT Jar file from http://itextpdf.com/, and enjoy to learn and implement Domino Java.


Cache.NDK in Lotus notes

HI All,

Issue  : User has recently changed his access from Author to Manager, but whenever user trying to open the database, still he have author access and he is not able to see the some buttons , somehow he was not getting Manager access,

Investigation : I have checked the replication in Domino Directory, and Database ,and confirmed that everything is fine.
         
Solution : I have deleted the Cache  file from the users lotus notes machine,and try to reopen the lotus notes file and open the database , and confirmed that now user has manager access on that database.

Friday, April 26, 2013

Learning : For editing the document, we have a way to use encryption key in Lotus notes

Issue :  A person is not able to edit document, but he/she is able to see the document, and open the document. While clilcking the edit button on the document, it is not in edit mode.

Investigation : I checked the user access, she/he has editor access, and there is no reader and author fields in that document. I am quite surprising how this scenario is working. Later i have noticed that there is an field called "SecretEncryptionKeys", and started to learn about that.

Solution : Finally ,I have reached to person who are keep editing those documents, and requested that user to send the secret key via email to another person, and attach the secret key in her lotus notes, then she is able to edit the document

Tuesday, April 23, 2013

My achievements in TCS from 2012 March to 2013 March

1. I have created 4 Lotus notes tool, which helps to reducing the manual activity.

        - Schedule agent Monitoring tool (using Domino C API's, and Lotus script, Formula language)
        -  PDF Generation from Lotus notes documents (using Domino Java, ITEXT library)
        -  Centralised search tool from all the lotus notes database (JQuery, CSS, HTML, Lotusscript)
        -  Application Repository for storing all the lotus notes database details (Using Angular JS, Bootstrap css, Jquery)


2. STAR OF THE QUARTER - TCS GEMS AWARD

3. My article got selected up to semifinal in TCS level

4. Participated TATA Innovista, and waiting for result.

5. completed Six Sigma green belt

6. Completed PI story from tcs level

7. Particpated in HITECH TCS cricket mactch and we won the cup

Domino Server Crash because of Domino C API's

Recently, we have done the upgrade of Domino 8.5(fix pack), and faced an strange issue, and finally we  have identified the issue and fixed it.

Issue:  Whenever, C API's is trying to execute (declare dbopen), the server is keep crashing.

Solution : actually, source databse is keep connecting to target database, but signer id does not have enough access for accessing target databse, and there is no handle for checking access for the sighner id in the backendcode, so APIs got failed to access target database and it caused server crash.