Created
March 23, 2012 02:21
-
-
Save lonelydimple/2166251 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function strreplace(Byval src As String, Byval dest As String, Byval arg As String) As String | |
Dim pos As Integer | |
pos = Instr(arg, src) | |
While (pos > 0) | |
arg = Left(arg, pos - 1)+ dest + Mid(arg, pos + Len(src)) | |
pos = Instr(pos + Len(dest), arg, src) | |
Wend | |
strreplace = arg | |
End Function | |
Sub Initialize | |
Dim doc As NotesDocument | |
Dim session As New NotesSession | |
Dim db As NotesDatabase | |
Dim principal_doc As NotesDocument | |
Set doc = session.DocumentContext | |
Set db = session.CurrentDatabase | |
principal_id = Evaluate(|@Middle("| + doc.Query_String(0) + |";"idprin=";"&")|) | |
Set principal_doc = db.GetDocumentByUNID(principal_id(0)) | |
Call principal_doc.ReplaceItemValue("fromBondOrder", "") | |
Call principal_doc.ReplaceItemValue("formUNID", "") | |
Call principal_doc.save(False, False) | |
new_query_string = strreplace("OpenAgent", "OpenForm", doc.Query_String(0)) | |
Print ("[/bondsn.nsf/CommBondRatings?" + new_query_string + "]") | |
End Sub |
it "should not explode" do
DOMINO.should be_alive
end
subject { DOMINO }
it { should not_exist }
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Where are the accompanying unit tests? ;)