Skip to main content

Posts

Showing posts from October, 2012

Duplication check in Lotusscript

CODE: Function IsDocumentDuplicate (db As NotesDatabase, viewName As String, _ keyColumnName As String, doc As NotesDocument, errorMsg As String) IsDocumentDuplicate = False Dim viewLookup As NotesView Dim docLookup As NotesDocument Dim errorString As String errorString = "Document already exists in the database!" Set viewLookup = db.GetView(viewName) If Not viewLookup Is Nothing Then Set docLookup = viewLookup.GetDocumentByKey(keyColumnName, True) If Not docLookup Is Nothing Then If doc.IsNewNote Then errorMsg = errorString Exit Function Else If doc.UniversalID <> docLookup.UniversalID Then errorMsg = errorString Exit Function End If End If Else errorMsg = "Error getting doc object for lookup document!" Exit Function End If Else errorMsg = "Error getting view object for lookup document!" Exit Function End If IsDocumentDuplicate = True End Function

Common web based questions in lotus Notes.

1. Which server task is used for Lotus Notes web applications? 2. What are the commands to load and quit the HTTP server task? load http tell http quit restart task http 3. What are the programming language used for web applications? 4. What is pass - thru HTML, how to use it ? Notes rich-text has a feature called 'Pass-thru HTML.' This is text that the Domino server will NOT attempt to format for the web, it will just 'pass it through'. If you create content with a Notes client that gets published to the web, you may wish to use this so you can 'hand-code' your HTML for special effects or some other purpose. 5. What is the difference between pass - thru html and Render pass thru html in Notes ? Check "Render pass through HTML in Notes" in the Form or Page Properties box to have the Notes client process the HTML. If you do not check "Render pass through HTML in Notes," the HTML appears as plain text. 6. What changes are to be done for a Form ...

Remote Service in Xpages

Remote Service: communicating from client side to server side json remote procedure call Can create ssjs methods in remote service gettting the inputbox value through ssjs for refreshing. Method initiating the ssjs and fetch the values from the input box control return the value generated from the ssjs and v can use it in csjs. service name in the Remote service: myRPC method name should be given next step is to create the ssjs in the remote service do not write the ssjs in the computed value of the script property. whatever the value obtained from the ssjs stored in the myResult variable

$$ Return in Lotus Notes web

viewName:=@Subset(@ViewTitle;-1); @If (Action=6;"[/"+DbReferer +"/"+viewName+"/"+@Text (@DocumentUniqueID ) + "?EditDocument]";Prj_IsNewDoc=1 | viewName = "lkupAllProjects"; "[/"+DbReferer +"/vwMyAllDocuments?OpenView&restricttocategory=" + CurrentUser + "]"; viewName="vwAllMyDrafts" | viewName="vwAllWaitingMyApproval" | viewName="vwMyAllDocuments"; "[/"+ DbReferer +"/" + viewName + "?OpenView&restricttocategory=" + CurrentUser + "]"; "[/"+ DbReferer +"/" + viewName + "?OpenView]")

Xpages Tips

Tips Solution Themes in OneUI Layout: 1) Oneuiv2.1 2) Oneuiv2.1_blue 3) Oneuiv2.1_gen1 4) Oneuiv2.1_gold 5) Oneuiv2.1_green 6) Oneuiv2.1_onyx 7) Oneuiv2.1_orange 8) Oneuiv2.1_pink SSJS @Adjust on Javascript Dates: The following code will generate results that you may not expect: Eg : var myDate = new Date(2010,2,15); //this is MARCH 15th, months for JSDate is zero based myDate = @Adjust(myDate,0,-1,0,0,0,0); //--> expected date 2/15/2010 The key is to specify the "[InLocalTime]" keyword to the @Adjust function, so the correct call would be: @Adjust(myDate,0,-1,0,0,0,0,"[InLocalTime]") Open Links in Own window in Ext Lib App Layout: To open the link in its own window, you will use a simple JavaScript Function: window.open(“http://www.mydomain.com”, “_blank”); Now, if you try to add this to the href property, it will not work, because it would be regarded as a link and not a JavaScript Function. So, t...

Xpages issues and Solutions

Issue List Solution For opening a '<a href>' in Xpage in new window, pls use this code: docID:=@Text(@DocumentUniqueID); database := @Subset(@DbName; -1); databasename:=@ReplaceSubstring(database;"\\";"/"); server :=@ServerName; servername:=@Name([Abbreviate];server); xspfrm:=@If(form="FormA";"XpageA.xsp"; form="FormB";"XPageB.xsp";"XPageC.xsp"); "<a href='/"+databasename+"/"+xspfrm+"?databaseName="+servername+"!!"+databasename+"&documentId="+docID+"&action=openDocument' target=_new>"+Open Document+"</a>" Redirecting one Xpage to another Xpage: If Redirecting One Xpage to another Xpage is done by using “redirectToPage” function available in SSJS @DbColumn in SSJS: var viewHandle:NotesView=database.getView(viewName) return viewHandle.getColumnValues(...