PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Special case
  • Required permissions
  • Required application feature
  • Syntax that is using the Contact structure (before Android 2.0)
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Adds a contact:
  • WINDEVWEBDEV - Server codeReports and Queries into the address book of a Lotus Notes or Outlook messaging.
    Caution: This function cannot be used to add a contact into the address book of an Outlook Express messaging.
  • Versions 16 and later
    AndroidAndroid Widget iPhone/iPadUniversal Windows 10 App into the list of contacts on the device (Android, iPhone or iPad, Universal Windows).
    New in version 16
    AndroidAndroid Widget iPhone/iPadUniversal Windows 10 App into the list of contacts on the device (Android, iPhone or iPad, Universal Windows).
    AndroidAndroid Widget iPhone/iPadUniversal Windows 10 App into the list of contacts on the device (Android, iPhone or iPad, Universal Windows).
Versions 16 and later
Android This function is now available for the Android applications.
New in version 16
Android This function is now available for the Android applications.
Android This function is now available for the Android applications.
Versions 18 and later
Android Widget This function is now available in Android Widget mode.
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 18
Android Widget This function is now available in Android Widget mode.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Android Widget This function is now available in Android Widget mode.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Versions 22 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 22
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
WINDEVWEBDEV - Server codeReports and QueriesAjaxUser code (UMC)
// Initialize the variables of Contact structure
ContactReset()
// Fill the variables for the new contact
mContact.Name = "Smith"
mContact.FirstName = "Adriana"
mContact.Email = "adriana.smith@mycompany.com"
// Add the contact
IF ContactAdd(SessionID) = True THEN
Info("Contact added")
ELSE
Error("Error during the addition", ErrorInfo())
END
AndroidAndroid Widget iPhone/iPadUniversal Windows 10 App
// Local variables
tContact is Contact
tPhone is Phone

// Identity
tContact.Name = EDT_LastName
tContact.FirstName = EDT_FirstName

// Home phone numbers
IF EDT_HomePhone <> "" THEN
tPhone..PhoneNumber = EDT_HomePhone
tPhone..Type = phoneHome
Add(tContact.Phone, tPhone)
END

// Add
IF NOT ContactAdd(tContact, gSource) THEN
Error("Unable to create the contact.")
ELSE
WIN_TableContacts.RefreshContactList()
Close()
END
Syntax
WINDEVWEBDEV - Server codeReports and QueriesAjaxUser code (UMC)

Adding a contact into the Lotus Notes or Outlook messaging Hide the details

<Result> = ContactAdd(<Session Identifier>)
<Result>: Boolean
  • True if the addition was performed,
  • False otherwise. To find out the error details, use ErrorInfo associated with the errMessage constant.
<Session Identifier>: Integer
Identifier of session to use. This identifier is returned by EmailStartNotesSession, EmailStartOutlookSession, NotesOpenDatabase or OutlookStartSession.
Versions 17 and later
AndroidAndroid Widget iPhone/iPadUniversal Windows 10 App Caution: Syntax available from version 170069

Adding a contact into the list of contacts on the device (from Android 2.0, iPhone or iPad, Universal Windows) Hide the details

<Result> = ContactAdd(<Contact> [, <Source>])
<Result>: Boolean
  • True if the addition was performed,
  • False otherwise. To find out the error details, use ErrorInfo associated with the errMessage constant.
<Contact>: Contact variable
Name of Contact variable corresponding to the contact to add.
<Source>: Optional ContactSource variable
Name of ContactSource variable corresponding to the source or to the account into which the contact will be added. If this parameter is not specified, the contact will be associated with no account.
New in version 17
AndroidAndroid Widget iPhone/iPadUniversal Windows 10 App Caution: Syntax available from version 170069

Adding a contact into the list of contacts on the device (from Android 2.0, iPhone or iPad, Universal Windows) Hide the details

<Result> = ContactAdd(<Contact> [, <Source>])
<Result>: Boolean
  • True if the addition was performed,
  • False otherwise. To find out the error details, use ErrorInfo associated with the errMessage constant.
<Contact>: Contact variable
Name of Contact variable corresponding to the contact to add.
<Source>: Optional ContactSource variable
Name of ContactSource variable corresponding to the source or to the account into which the contact will be added. If this parameter is not specified, the contact will be associated with no account.
AndroidAndroid Widget iPhone/iPadUniversal Windows 10 App Caution: Syntax available from version 170069

Adding a contact into the list of contacts on the device (from Android 2.0, iPhone or iPad, Universal Windows) Hide the details

<Result> = ContactAdd(<Contact> [, <Source>])
<Result>: Boolean
  • True if the addition was performed,
  • False otherwise. To find out the error details, use ErrorInfo associated with the errMessage constant.
<Contact>: Contact variable
Name of Contact variable corresponding to the contact to add.
<Source>: Optional ContactSource variable
Name of ContactSource variable corresponding to the source or to the account into which the contact will be added. If this parameter is not specified, the contact will be associated with no account.
AndroidAndroid Widget iPhone/iPadUniversal Windows 10 App
Versions 16 and later
Warning
From version 17 (69), this syntax is kept for backward compatibility.
New in version 16
Warning
From version 17 (69), this syntax is kept for backward compatibility.
Warning
From version 17 (69), this syntax is kept for backward compatibility.

Adding a contact into the list of contacts on the device (before Android 2.0, iPhone or iPad, Universal Windows) Hide the details

<Result> = ContactAdd(<Type of Contact>)
<Result>: Boolean
  • True if the addition was performed,
  • False otherwise. To find out the error details, use ErrorInfo associated with the errMessage constant.
<Type of Contact>: Integer constant
Type of contact to add. By default, this parameter corresponds to the contactPhone constant.
Remarks
AndroidAndroid Widget iPhone/iPadUniversal Windows 10 App

Special case

To display the window for contact creation of native application for contact management found on the device, use ContactCreate.
Versions 16 and later
AndroidAndroid Widget

Required permissions

The call to this function modifies the permissions required by the application.
Required permission: WRITE_CONTACTS
This permission allows the application to write (without reading) the data of the user contacts.
New in version 16
AndroidAndroid Widget

Required permissions

The call to this function modifies the permissions required by the application.
Required permission: WRITE_CONTACTS
This permission allows the application to write (without reading) the data of the user contacts.
AndroidAndroid Widget

Required permissions

The call to this function modifies the permissions required by the application.
Required permission: WRITE_CONTACTS
This permission allows the application to write (without reading) the data of the user contacts.
Versions 22 and later
Universal Windows 10 App

Required application feature

The use of this function triggers the declaration of an application feature in the wizard for generating the application.
Required feature: Contacts
This feature allows the applications to access the contacts.
New in version 22
Universal Windows 10 App

Required application feature

The use of this function triggers the declaration of an application feature in the wizard for generating the application.
Required feature: Contacts
This feature allows the applications to access the contacts.
Universal Windows 10 App

Required application feature

The use of this function triggers the declaration of an application feature in the wizard for generating the application.
Required feature: Contacts
This feature allows the applications to access the contacts.
Versions 16 and later
AndroidAndroid Widget iPhone/iPadUniversal Windows 10 App

Syntax that is using the Contact structure (before Android 2.0)

Only the following members of the Contact structure will be taken into account when adding the contact:
  • mContact.Name
    The name of the contact on the device will be built from the mContact.Name and mContact.FirstName members.
  • mContact.FirstName
    The name of the contact on the device will be built from the mContact.Name and mContact.FirstName members.
  • mContact.Notes
  • mContact.HomeAddress
    The home address of the contact on the device will be built from the mContact.HomeAddress, mContact.HomeCity, mContact.HomeZip, mContact.HomeState and mContact.HomeCountry members.
  • mContact.HomeCity
  • mContact.HomeZipCode
  • mContact.HomeState
  • mContact.HomeCountry
  • mContact.HomePhone
  • mContact.HomeFax
  • mContact.MobilePhone
  • mContact.Company
  • mContact.Department
  • mContact.OfficeAddress
    The business address of the contact on the device will be built from the mContact.OfficeAddress, mContact.OfficeCity, mContact.OfficeZip, mContact.OfficeState and mContact.OfficeCountry members.
  • mContact.OfficeCity
  • mContact.OfficeZipCode
  • mContact.OfficeState
  • mContact.OfficeCountry
  • mContact.OfficePhone
  • mContact.OfficeFax
  • mContact.OfficeMobilePhone
  • mContact.OfficePager
  • mContact.Email
New in version 16
AndroidAndroid Widget iPhone/iPadUniversal Windows 10 App

Syntax that is using the Contact structure (before Android 2.0)

Only the following members of the Contact structure will be taken into account when adding the contact:
  • mContact.Name
    The name of the contact on the device will be built from the mContact.Name and mContact.FirstName members.
  • mContact.FirstName
    The name of the contact on the device will be built from the mContact.Name and mContact.FirstName members.
  • mContact.Notes
  • mContact.HomeAddress
    The home address of the contact on the device will be built from the mContact.HomeAddress, mContact.HomeCity, mContact.HomeZip, mContact.HomeState and mContact.HomeCountry members.
  • mContact.HomeCity
  • mContact.HomeZipCode
  • mContact.HomeState
  • mContact.HomeCountry
  • mContact.HomePhone
  • mContact.HomeFax
  • mContact.MobilePhone
  • mContact.Company
  • mContact.Department
  • mContact.OfficeAddress
    The business address of the contact on the device will be built from the mContact.OfficeAddress, mContact.OfficeCity, mContact.OfficeZip, mContact.OfficeState and mContact.OfficeCountry members.
  • mContact.OfficeCity
  • mContact.OfficeZipCode
  • mContact.OfficeState
  • mContact.OfficeCountry
  • mContact.OfficePhone
  • mContact.OfficeFax
  • mContact.OfficeMobilePhone
  • mContact.OfficePager
  • mContact.Email
AndroidAndroid Widget iPhone/iPadUniversal Windows 10 App

Syntax that is using the Contact structure (before Android 2.0)

Only the following members of the Contact structure will be taken into account when adding the contact:
  • mContact.Name
    The name of the contact on the device will be built from the mContact.Name and mContact.FirstName members.
  • mContact.FirstName
    The name of the contact on the device will be built from the mContact.Name and mContact.FirstName members.
  • mContact.Notes
  • mContact.HomeAddress
    The home address of the contact on the device will be built from the mContact.HomeAddress, mContact.HomeCity, mContact.HomeZip, mContact.HomeState and mContact.HomeCountry members.
  • mContact.HomeCity
  • mContact.HomeZipCode
  • mContact.HomeState
  • mContact.HomeCountry
  • mContact.HomePhone
  • mContact.HomeFax
  • mContact.MobilePhone
  • mContact.Company
  • mContact.Department
  • mContact.OfficeAddress
    The business address of the contact on the device will be built from the mContact.OfficeAddress, mContact.OfficeCity, mContact.OfficeZip, mContact.OfficeState and mContact.OfficeCountry members.
  • mContact.OfficeCity
  • mContact.OfficeZipCode
  • mContact.OfficeState
  • mContact.OfficeCountry
  • mContact.OfficePhone
  • mContact.OfficeFax
  • mContact.OfficeMobilePhone
  • mContact.OfficePager
  • mContact.Email
Related Examples:
WM Managing Contacts Cross-platform examples (WINDEV Mobile): WM Managing Contacts
[ + ] This example presents the management of contacts for Android et iOS.
It is used o:
- list the contacts found on the phone
- call the contacts
- send SMSs to the contacts
- ...
Components
WINDEVWEBDEV - Server codeReports and Queries wd230com.dll
Android wd230android.jar
Minimum required version
  • Version 11
This page is also available for…
Comments
Click [Add] to post a comment