biuan SAP® BUSINESS ONE SDK
DTW Business Partners / Activity
API Contacts
Contacts Object

Description

Contacts is a business object that represents the activities with customers and vendors in the Business Partners module.

This object enables you to:

  • Add an activity.
  • Retrieve an activity by its key.
  • Update an activity.
  • Save the object in XML format.

Source table: OCLG.

Object Model

Remarks

Mandatory fields in SAP Business One: CardCode (only if the activity is not personal) and ContactPersonCode.

To display the form in the application:

  • Select Business Partners --> Activities.

Auto-complete of the Activity Schedule Properties (new for release 2005)

The schedule of the activity must be specified at the database level, therefore the system completes automatically the values of the properties that are related to the activity schedule. These properties include:

When adding or updating an activity, there are five scenarios for the auto-complete operation according to the specified values:

1. If no value is specified (when adding only), then the system sets the following default values:

  • Start time - the current time when adding the activity.
  • Duration - 15 minutes (0 minute when upgrading the system to release 2005).
  • End time - the system calculates the values as follows: End time = Start time + Duration.

2. If all three values are specified (when adding or updating), then the system checks their validity, and if there is an error the system issues an error message (-5002 - invalid object).

3. If two values are specified (or modified when updating), then the system calculates (or recalculates) the remaining value as follows:

  • Start time and End time are specified - the system calculates the Duration.
  • Start time and Duration are specified - the system calculates the End time.
  • Duration and End time are specified - when adding, the system sets Start time to default and recalculates the Duration. When updating, the Start time remains the same and the system recalculates the Duration.

4. If one value is specified (when adding only), then the system calculates the remaining values as follows:

  • Start time is specified - the system sets the Duration to default and calculates the End time.
  • Duration is specified - the system sets the Start time to default and calculates the End time.
  • End time is specified - the system sets the Start time to default and calculates the Duration.

5. If one value is modified (when updating only), then the system recalculates the remaining value as follows:

  • Start time is specified - the system recalculates the End time (for release 2005) or the Duration (for release 2004).
  • Duration is specified - the system recalculates the End time.
  • End time is specified - the system recalculates the Duration.

Example

See Also

SAP® B1 DI-API C# definition

public class ContactsClass : IContacts, Contacts { public virtual BoActivities Activity { get; set; } public virtual int ActivityType { get; set; } public virtual int AttachmentEntry { get; set; } public virtual SAPbobsCOM.Attachments Attachments { get; } public virtual DataBrowser Browser { get; } public virtual string CardCode { get; set; } public virtual string City { get; set; } public virtual BoYesNoEnum Closed { get; set; } public virtual DateTime CloseDate { get; set; } public virtual int ContactCode { get; } public virtual DateTime ContactDate { get; set; } public virtual int ContactPersonCode { get; set; } public virtual DateTime ContactTime { get; set; } public virtual string Country { get; set; } public virtual string Details { get; set; } public virtual string DocEntry { get; set; } public virtual string DocNum { get; } public virtual int DocType { get; set; } public virtual string DocTypeEx { get; set; } public virtual double Duration { get; set; } public virtual BoDurations DurationType { get; set; } public virtual DateTime EndDuedate { get; set; } public virtual DateTime EndTime { get; set; } public virtual string Fax { get; set; } public virtual int HandledBy { get; set; } public virtual BoYesNoEnum Inactiveflag { get; set; } public virtual int Location { get; set; } public virtual string Notes { get; set; } public virtual int ParentobjectId { get; } public virtual string Parentobjecttype { get; } public virtual BoYesNoEnum Personalflag { get; set; } public virtual string Phone { get; set; } public virtual int PreviousActivity { get; set; } public virtual BoMsgPriorities Priority { get; set; } public virtual DateTime Recontact { get; set; } public virtual BoYesNoEnum Reminder { get; set; } public virtual double ReminderPeriod { get; set; } public virtual BoDurations ReminderType { get; set; } public virtual string Room { get; set; } public virtual int SalesEmployee { get; set; } public virtual DateTime StartDate { get; set; } public virtual DateTime StartTime { get; set; } public virtual string State { get; set; } public virtual int Status { get; set; } public virtual string Street { get; set; } public virtual string Subject { get; set; } public virtual BoYesNoEnum Tentativeflag { get; set; } public virtual SAPbobsCOM.UserFields UserFields { get; } public extern ContactsClass(); public virtual extern int Add(); public virtual extern string GetAsXML(); public virtual extern bool GetByKey(int ContactCode); public virtual extern void SaveToFile( string FileName); public virtual extern void SaveXML( ref string FileName); public virtual extern int Update(); }

Related information


Bo Activities BoActivities Enumeration
Specifies the activity type with contacts (customers or vendors).
   Parent: Contacts Contacts Object· Table: OCLG

Attachments Attachments Collection
Attachments is a collection of one or more Attachment objects. From DI API version 2005, use the Attachments2 object.
   Parent: Contacts Contacts Object· Table: OCLG


SAP® Business One is the trademark(s) or registered trademark(s) of SAP AG in Germany and in several other countries. Contact
This website is not affiliated with, maintained, authorized, endorsed or sponsored by SAP AG or any of its affiliates