Click or drag to resize

clsImportBPContactPerson Class

Contact Person to a business partner. Add Instances of this object to clsImportBusinessPartner.CollectionContactPerson collection.

Please make sure, that SAP Business One DI-API in 32 or 64 bit is installed according to the usage of this interface. The logon user in MARIProject has to have a corresponding user linked to the selected company database.

Inheritance Hierarchy
SystemObject
  MARIInterfaceclsImportBase
    MARIInterfaceclsImportBaseERP
      MARIInterfaceclsImportBPContactPerson

Namespace:  MARIInterface
Assembly:  MARIInterface (in MARIInterface.dll) Version: 8.0.0.100
Syntax
public class clsImportBPContactPerson : clsImportBaseERP

The clsImportBPContactPerson type exposes the following members.

Constructors
  NameDescription
Public methodclsImportBPContactPerson
Initializes a new instance of the clsImportBPContactPerson class
Top
Properties
  NameDescription
Public propertyAddress
Address
Public propertyBirthCity
BirthCity
Public propertyBirthDate
BirthDate
Public propertyBirthPlace
BirthPlace
Public propertyBirthState
BirthState
Public propertyBlockComm
BlockComm. Block Marketing Communication. Will be defined by BlockCommunicationEMail and/or BlockCommunicationFax.
Public propertyBlockCommunicationEMail
Block Marketing communication SELECT Select FROM CPRC CntctCode= AND CommMeanID=-1
Public propertyBlockCommunicationFax
Block Marketing communication SELECT Select FROM CPRC CntctCode= AND CommMeanID=-2
Public propertyCardCode
Reference to the business partner. This field is automatically set, by linking this instance to the clsImportBusinessPartner instance.
Public propertyCellolar
Cellolar
Public propertyCntctCode
Internal Key. Number will be created automatically
Public propertyCtyCdCurYr
CtyCdCurYr
Public propertyCtyCdPrvsY
CtyCdPrvsY
Public propertyCtyCurYr
CtyCurYr
Public propertyCtyPrvsYr
CtyPrvsYr
Public propertyE_MailL
E_MailL
Public propertyEmlGrpCode
Link to the table SELECT EmlGrpCode FROM OEGP
Public propertyFax
Fax
Public propertyFirstName
FirstName
Public propertyFiscalCode
FiscalCode
Public propertyGender
Gender
Public propertyLastName
LastName
Public propertyMiddleName
MiddleName
Public propertyName
Unique name of the contact person. This field is the key field in the list of contract person (of one business partner)
Public propertyNFeRcpn
NFeRcpn
Public propertyNotes1
Notes1
Public propertyNotes2
Notes2
Public propertyPager
Pager
Public propertyPassword
Password
Public propertyPosition
Position
Public propertyProfession
Profession
Public propertyResidCity
ResidCity
Public propertyResidCntry
ResidCntry
Public propertyResidState
ResidState
Public propertySttCurYr
SttCurYr
Public propertySttPrvsYr
SttPrvsYr
Public propertyTel1
Tel1
Public propertyTel2
Tel2
Public propertyTitle
Title
Public propertyUseDefaultContactPerson
This Contact Person will become the mail contact person in the business partner
Top
Methods
Fields
  NameDescription
Public fieldSysMasterProperties
Link this business partner contact person to one or many SysMaster Properties. Having the ID in the list means, that the property is true.

See the clsImportSysMasterProperties description to create new properites.

All selected properties must have a UsageFlag of ClassID002BPContactPerson.

Top
Remarks
Examples
Create new business partner (via DI-API)
public bool CreateBusinessPartner(string sNewCardCode, string sNewMatchcode) {

    clsImportBusinessPartner NewBP = new clsImportBusinessPartner();
    NewBP.CompanyID = 1; // First company linked to MARIProject
    NewBP.CardCode = sNewCardCode;
    NewBP.CardName = sNewMatchcode;
    NewBP.CardFName = sNewMatchcode;
    NewBP.GroupCode = 100;

    NewBP.CardType = clsImportBusinessPartner.eCardType.C; // SBO Code for customer
    NewBP.Billing_AdressID = "Billing Address";
    NewBP.Billing_Street = "Stolberger Str. 114a";
    NewBP.Billing_Name2 = "";
    NewBP.Billing_Name3 = "";
    NewBP.Billing_Block = "";
    NewBP.Billing_County = "";
    NewBP.Billing_State = "";
    NewBP.Billing_ZipCode = "50933";
    NewBP.Billing_City = "Cologne";
    NewBP.Billing_Country = "DE";
    NewBP.Phone1 = "+49 221 949058-0";
    NewBP.Phone2 = "+49 221 949058-30";
    NewBP.Fax = "+49 221 949058-8";
    NewBP.Cellular = "";
    NewBP.E_Mail = "ingo@maringo.de";
    NewBP.IntrntSite = "www.maringo.de";
    NewBP.Free_Text = "Import via MARIInterface";
    NewBP.SlpCode = 1; //SELECT SlpCode FROM OSLP
    NewBP.PaymentTerm = 4; //SELECT GroupNum FROM OCTG

    clsImportBPContactPerson oContactPerson;
    oContactPerson = new clsImportBPContactPerson();
    oContactPerson.Name = "Peter Smith";
    oContactPerson.FirstName = "Peter";
    oContactPerson.MiddleName = "F";
    oContactPerson.LastName = "Smith";
    oContactPerson.E_MailL = "peter.smith@company.com";
    oContactPerson.Title = "Phd.";
    oContactPerson.Profession = "General Manager";
    oContactPerson.Address = "Head Quaters";
    oContactPerson.Tel1 = "+49 221 949058-11";
    oContactPerson.Cellolar = "+49 172 2978199";
    oContactPerson.Notes1 = "This is the best";
    oContactPerson.Gender = clsImportBPContactPerson.eGender.Male;
    NewBP.CollectionContactPerson.Add(oContactPerson);
    oContactPerson = new clsImportBPContactPerson();
    oContactPerson.Name = "Karin Tounsend";
    oContactPerson.FirstName = "Karin";
    oContactPerson.LastName = "Tounsend";
    oContactPerson.E_MailL = "karin.Tounsend@company.com";
    oContactPerson.Profession = "CFO";
    oContactPerson.Address = "Head Quaters";
    oContactPerson.Tel1 = "+49 221 949058-14";
    oContactPerson.Notes1 = "This is the best";
    oContactPerson.Gender = clsImportBPContactPerson.eGender.Female;
    NewBP.CollectionContactPerson.Add(oContactPerson);

    if (oMPInterface.bImportBusinessPartner(NewBP, clsImportBase.eImportMode.ValidateAndImport)) {
        return true;
    } else {
        LogFail(oMPInterface.oErrors.PrintErrors());
        return false;
    }
}
See Also