Skip to content

Instantly share code, notes, and snippets.

@gsherman
Last active December 25, 2015 05:19
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save gsherman/6923266 to your computer and use it in GitHub Desktop.
'420.cbs
Option Explicit
Private originalOfficeId As String
Sub Form_Load()
Me.DoDefault
If Me.ReadOnly Then
txt_office_id.Enabled =True
ddl_custom.Enabled =True
me.EnableControlsDeep "RESPPRTY"
Save.Enabled = TRUE
Me.Caption = Me.Caption + " : [Some fields have been enabled for editing]"
End If
End Sub
Sub Form_Save1(bs As BulkSave)
Dim elmList As New List
Dim recElm As Record
Dim i As Integer
Dim recCase As Record
Dim officeId As String
If bs.CountByType("case") > 0 Then
Set recCase = bs.GetRecordByIndex(0, "case")
officeId = txt_office_id.Value
If originalOfficeId <> officeId Then
recCase.SetField "x_office_id", officeId
originalOfficeId = officeId
End If
App.GetListValues "Response Priority Code", elmList
i = elmList.FindFirstIndex (Cobj_RESPPRTY_CHOICE.Contents, "title")
If i > 0 Then
Set recElm = elmList.ItemByIndex(i)
bs.RelateRecords recCase, recElm, "respprty2gbst_elm"
End If
End If
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment