Subject: oh, man … 
OK. Sorry this is so big and messy.
It starts with formula, then calls a LS agent.
Formula code:
REM {If in read mode, attempt to change to edit mode.};
@If(@IsDocBeingEdited;@Success;@Command([EditDocument]));
@If(!@IsValid; @Do(
@SetField(“StatusRefresh”; “”);
@Return(“”)); @Success);
REM {Attempt to save. If successful, continue.};
@If(!@Command([FileSave]); @Do(
@SetField(“StatusRefresh”; “”);
@Return(“”)); @Success);
@If(@Prompt([YesNo]; “Continue?”; “This will change the status of this request to Cancelled/Withdrawn. No more work will be done on this change request. Please click Yes to confiirm.”);“”;@Return(“”));
@SetField(“CancellationReason”;@Prompt([OkCancelEdit]; “Cancel/Withdraw Reason”; “Please type your reason below.”; “”));
@SetField(“Status”;“Cancelled/Withdrawn”);
@SetField(“EmailSubjectLine”;"CR " + CRNumber + " - " + BriefChangeDesc + “: Cancelled/Withdrawn”);
@SetField(“AssignedTo”;“”);
@SetField(“NextStep”;“None. This request will not move forward from this point.”);
@SetField(“SendToGroup”; ITDirector:Requestor);
@SetField(“ccGroup”;USBLApprover:CMApprover);
@SetField(“StatusRefresh”; “”);
@SetField(“NextDocAuthors”; “”);
@SetField(“CancelledDate”;@Now);
@SetField(“PastComments”;PastComments : LastComment);
@SetField(“LastComment”;@Text(@Now;“D0T1Z2S2”) + " - " + @Name([CN];@UserName) + " has marked this request as Cancelled/Withdrawn.");
@SetField(“MsgPromptTitle”;“Cancelled/Withdrawn”);
@SetField(“MsgPrompt”;“This request has been marked as Cancelled/Withdrawn.”);
@Command([FileSave]);
FIELD SaveOptions := “0”;
@Command([ToolsRunMacro]; “(CancelCR)”)
Lotuscript agent:
Sub Initialize
'CLIENT: Notes
'PURPOSE: Notify Project Participants that a CR has been cancelled
'This agent is called from an action button, whch has already checked for required fields and updated several fields.
'This agent sends the notification message.
Dim session As New NotesSession
Dim db As NotesDatabase
'Dim doc As NotesDocument
Dim maildoc As NotesDocument
Dim rtItem As NotesRichTextItem
On Error Goto ErrorHandler
Dim uiw As New notesuiworkspace
Dim uidoc As notesuidocument
Set uidoc = uiw.currentdocument
Set db = session.CurrentDatabase
Set doc = uidoc.document
Call uidoc.save
Call uidoc.close
Call doc.RemoveItem( "SaveOptions" )
'Update document security
doc.DocAuthorsVariable = doc.NextDocAuthors
Call doc.Save(False,False)
'Create and send email notification message
Set maildoc = New NotesDocument(db)
maildoc.Form = "Memo"
maildoc.Subject = "CR " & doc.CRNumber(0) & " Cancelled/Withdrawn"
'maildoc.~_ViewIcon = 117
Set rtitem = New NotesRichTextItem(maildoc,"body")
Call RTItem.AppendStyle(PlainDkBlueText)
Call rtitem.appendtext("A Change request has been marked as Cancelled/Withdrawn.")
Call rtitem.appendtext("This change has been cancelled/withdrawn.")
Call rtitem.addnewline(2)
Call rtitem.appendtext("Change Type:" & Chr(9) & Chr(9))
Call RTItem.AppendStyle(BoldText)
Call rtitem.appendtext(doc.CRType(0))
Call rtitem.addnewline(1)
Call RTItem.AppendStyle(PlainDkBlueText)
Call rtitem.appendtext("CR #:" & Chr(9) & Chr(9) & Chr(9))
Call RTItem.AppendStyle(BoldText)
Call rtitem.appendtext(doc.CRNumber(0))
Call rtitem.addnewline(1)
Call RTItem.AppendStyle(PlainDkBlueText)
If doc.CRType(0) = "Break/Fix" Then
Call rtitem.appendtext("HEAT Ticket #:" & Chr(9) & Chr(9))
Call RTItem.AppendStyle(BoldText)
Call rtitem.appendtext(doc.HeatTicket(0))
Else
Call rtitem.appendtext("IT Project #:" & Chr(9) & Chr(9))
Call RTItem.AppendStyle(BoldText)
Call rtitem.appendtext(doc.ProjectNumber(0))
End If
Call rtitem.addnewline(1)
Call RTItem.AppendStyle(PlainDkBlueText)
Call rtitem.appendtext("Brief Description:" & Chr(9))
Call RTItem.AppendStyle(BoldText)
Call rtitem.appendtext(doc.BriefChangeDesc(0))
Call rtitem.addnewline(1)
Call RTItem.AppendStyle(PlainDkBlueText)
Call rtitem.appendtext("Implementation Date:" & Chr(9))
Call RTItem.AppendStyle(BoldText)
Call rtitem.appendtext(doc.ImplementDate(0))
Call rtitem.addnewline(2)
Call RTItem.AppendStyle(PlainDkBlueText)
Call rtitem.appendtext("Requestor:" & Chr(9) & Chr(9))
Call RTItem.AppendStyle(BoldText)
Call rtitem.appendtext(doc.RequestorCN(0))
Call rtitem.addnewline(2)
Call RTItem.AppendStyle(PlainRedText)
Call rtitem.appendtext("Cancellation Reason:")
Call rtitem.addnewline(1)
Call RTItem.AppendStyle(BoldRedText)
Call rtitem.appendtext(doc.CancellationReason(0))
Call rtitem.addnewline(2)
Call RTItem.AppendStyle(PlainDkBlueText)
Call rtitem.appendtext("Action Required:"& Chr(9))
Call rtitem.appendtext(doc.NextStep(0))
Call RTItem.AppendStyle(SmallBlueText)
Call rtitem.addnewline(2)
Call rtitem.appendtext("Link to the Change Request document --> ")
Call rtitem.appenddoclink(doc,"")
'Populate SendTo field with multivalues:
vST = doc.GetItemValue("SendToGroup")
Forall st In vST
iArrayCount = iArrayCount + 1
Redim Preserve XSendTo(iArrayCount)
XSendTo(iArrayCount-1) = st
End Forall
maildoc.sendto = XSendTo()
'Populate CopyTo field with multivalues:
vCT = doc.GetItemValue("ccGroup")
Forall ct In vCT
iArrayCount = iArrayCount + 1
Redim Preserve XCopyTo(iArrayCount)
XCopyTo(iArrayCount-1) = ct
End Forall
maildoc.copyto = XCopyTo()
'Blind copy Russ during system testing
maildoc.blindcopyto = "Russ McBride"
maildoc.From = session.username
maildoc.Principal = session.username
On Error 4294 Goto AddressDeliveryError 'Error 4292 - Unable to send mail, no match found in Name & Address Book(s)
On Error 4000 Goto AddressDeliveryError 'Error 4000 - Unable to send mail, no match found in Name & Address Book(s)
Call maildoc.send (False)
Msgbox doc.MsgPrompt(0),0,doc.MsgPromptTitle(0)
'Call uidoc.save
'Call uidoc.close
Exit Sub
AddressDeliveryError:
If Err = 4294 Or Err = 4000 Then 'Unable to send mail, no match found in Name & Address Book(s)
Err = 0 'Clear the Error for additional processing
Set maildoc = New NotesDocument(db)
maildoc.Form = "Memo"
maildoc.Subject = "Address Delivery Error: SDLC, ProjectApproved"
maildoc.SendTo = "Russ McBride"
Set rtItem=New NotesRichTextItem(maildoc,"body")
Call rtItem.AppendText( "Unable to send mail, no match found in Name & Address Book(s). See Project " & doc.ProjectNumandName(0))
maildoc.Send False
End If
Print "[/" & db.FilePath & "/Thank+You+Redirect+Form?OpenForm&AddressDeliveryError&" & doc.UniversalID & "]"
Exit Sub
ErrorHandler:
Print "<br> Error#:" & Str(Err) & "<br>" & "Error Description:" & Error$ & "<br>" & "Line#: " & Cstr(Erl) & "<br><br>" & sDebugBuffer
Resume Next
End Sub