ISProfileForm.GetContact

Description

This function returns the contact linked to the CEF form.

Syntax

object.GetContact()

Part Attribute Type Description
object Required
The object always implements the ISProfileForm interface

Return Value

ISContact

Returns the contact linked to the CEF form.

Example

Display some information about the CEF form and the contact linked to it.

Dim aForm
Dim aFormInfo
Dim aContact

Set aForm = Profile.Form
aFormInfo =_
  "Form Short Name: " & aForm.ShortName & vbNewLine &_ 
  "Form Type Name: " & aForm.TypeName & vbNewLine 
set aContact = aForm.GetContact
if not aContact is nothing then
  aFormInfo = aFormInfo &_
    "Contact Date: " & aContact.Date & vbNewLine &_ 
    "Contact Pos Code: " & aContact.PosCode
else    
  aFormInfo = aFormInfo & "No contact linked to the form"
end if
  
Profile.MsgBox(aFormInfo)  
Note: This macro should be executed in any event handler of the form control.

Version information

Added in v7.8.0