#7161
Support 1
Participant

quote:


What did you mean by:

This assumes the custom field “TableLinens” has been defined for the GroupWise account.


I gather from your earlier message that the above is implied by ‘I have already created “user-defined” fields with the GW view designer.’

Regarding the GroupWise Object API, custom fields can be defined at least at the levels of Account object and Folder object, viz.

GroupWise.Account.FieldDefinitions

In order to retrieve a specific custom field value in a message, you can use the Object API in the following way:

const CUSTOM_FIELD_ID = "TableLinens"

  .
  .
  .

  dim iText
  dim oField
  dim oMsg

  set oMsg = nothing
  set oMsg = Client.ClientState.CommandMessage
  if not (oMsg is nothing) then
    set oField = oMsg.Fields.Item(CUSTOM_FIELD_ID, fgwString)
    if oField is nothing then
      iText = "Field " & CUSTOM_FIELD_ID & " not found"
    else
      iText = "Field value: " & oField.Value
    end if

    MsgBox iText
  end if

Can you confirm that the ‘user-defined’ fields you created with the GW view designer are equivalent to the custom fields in the Object API?

I hope this information is helpful.

Regards,
Advansys Support