clsImportBPContactPerson Class |
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.
Namespace: MARIInterface
The clsImportBPContactPerson type exposes the following members.
| Name | Description | |
|---|---|---|
| clsImportBPContactPerson | Initializes a new instance of the clsImportBPContactPerson class |
| Name | Description | |
|---|---|---|
| Address | Address | |
| BirthCity | BirthCity | |
| BirthDate | BirthDate | |
| BirthPlace | BirthPlace | |
| BirthState | BirthState | |
| BlockComm | BlockComm. Block Marketing Communication. Will be defined by BlockCommunicationEMail and/or BlockCommunicationFax. | |
| BlockCommunicationEMail | Block Marketing communication SELECT Select FROM CPRC CntctCode= AND CommMeanID=-1 | |
| BlockCommunicationFax | Block Marketing communication SELECT Select FROM CPRC CntctCode= AND CommMeanID=-2 | |
| CardCode | Reference to the business partner. This field is automatically set, by linking this instance to the clsImportBusinessPartner instance. | |
| Cellolar | Cellolar | |
| CntctCode | Internal Key. Number will be created automatically | |
| CtyCdCurYr | CtyCdCurYr | |
| CtyCdPrvsY | CtyCdPrvsY | |
| CtyCurYr | CtyCurYr | |
| CtyPrvsYr | CtyPrvsYr | |
| E_MailL | E_MailL | |
| EmlGrpCode | Link to the table SELECT EmlGrpCode FROM OEGP | |
| Fax | Fax | |
| FirstName | FirstName | |
| FiscalCode | FiscalCode | |
| Gender | Gender | |
| LastName | LastName | |
| MiddleName | MiddleName | |
| Name | Unique name of the contact person. This field is the key field in the list of contract person (of one business partner) | |
| NFeRcpn | NFeRcpn | |
| Notes1 | Notes1 | |
| Notes2 | Notes2 | |
| Pager | Pager | |
| Password | Password | |
| Position | Position | |
| Profession | Profession | |
| ResidCity | ResidCity | |
| ResidCntry | ResidCntry | |
| ResidState | ResidState | |
| SttCurYr | SttCurYr | |
| SttPrvsYr | SttPrvsYr | |
| Tel1 | Tel1 | |
| Tel2 | Tel2 | |
| Title | Title | |
| UseDefaultContactPerson | This Contact Person will become the mail contact person in the business partner |
| Name | Description | |
|---|---|---|
| bSaveRSToMDB | (Overrides clsImportBasebSaveRSToMDB(MPInterface, DataRow, DataTable).) | |
| bValidateAndRemove | (Overrides clsImportBasebValidateAndRemove(MPInterface).) |
| Name | Description | |
|---|---|---|
| SysMasterProperties |
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. |
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; } }