clsImportSysMasterProperties Class |
Properties can be used for SBO Contact Person, Employees, Event paritipants and also for events and service tasks.
This class imports the property master. They can be linked to the other dimensions with. The link is managed by clsImportSysMasterPropertyLink.
Import for table MARISysMasterProperties/MPSysMasterProperties: Property Settings for master data. (ClassID.SysMasterProperty=564)
Namespace: MARIInterface
The clsImportSysMasterProperties type exposes the following members.
| Name | Description | |
|---|---|---|
| clsImportSysMasterProperties | Initializes a new instance of the clsImportSysMasterProperties class |
| Name | Description | |
|---|---|---|
| ChildSelectionMode | False: all childs can be selected: True: only on child in the hierarchy below can be selected | |
| Indent | Hierarchy identifier (Standard=0). Using Indent>0 must provide a ParentPropertyID or ParentPropertyName to automatically find the parent in the hierarchy | |
| Memo | Memo | |
| ParentPropertyID |
Help Variable for Properties with Indent > 1. Mandatory to find the parent. Alternativly parent is searched by ParentPropertyName.
| |
| ParentPropertyName |
Help variable to find the parent property. Only used, wenn Indent > 1 and ParentPropertyID =0
| |
| Position | Order of the properties. If not set, it will be computed automatically. If set the import tries to insert the new property at this position. | |
| PropertyComment | Property Comment to show the user in the property screen. | |
| PropertyID | Internal Id for the property. This is a readonly Id. Referenced by MPSysMasterPropertyLink | |
| PropertyName | PropertyName Visible property name | |
| PropertyStack | Link to a stack of properties. See table MPSysMasterPropertyStack. If emtry, the standard Stack(=1) for business partner, contact person, event ... is used. | |
| PropertyTag | Extra information to find the property | |
| UsageFlag | Flagg to identify the apearance in selected master data dimensions. See clsImportSysMasterPropertieseSysMasterPropertyUsageDimensionFlag for desctiptions. | |
| UsageType | Type of the property (Branch or Leave). See clsImportSysMasterPropertieseSysMasterPropertyUsageType. |
private void CreateSampleProperties() { clsImportSysMasterProperties oParentProp = CreateNewPropertyHeader("[Parent]"); if (SaveProperty(oParentProp)) { clsImportSysMasterProperties oProp = CreateNewProperty("MARI Newsletter", clsImportSysMasterProperties.eSysMasterPropertyUsageDimensionFlag.ClassID002BPContactPerson | clsImportSysMasterProperties.eSysMasterPropertyUsageDimensionFlag.ClassID033Employee | clsImportSysMasterProperties.eSysMasterPropertyUsageDimensionFlag.ClassID492WorkItemTrainingCourse, oParentProp); SaveProperty(oProp); } } private clsImportSysMasterProperties CreateNewPropertyHeader(string sHeaderName) { clsImportSysMasterProperties oParentProp = new clsImportSysMasterProperties(); oParentProp.PropertyName = sHeaderName; oParentProp.UsageType = clsImportSysMasterProperties.eSysMasterPropertyUsageType.UsageTypeHeader; oParentProp.Indent = 0; return oParentProp; } private clsImportSysMasterProperties CreateNewProperty(string sPropertyName, clsImportSysMasterProperties.eSysMasterPropertyUsageDimensionFlag lFlags, clsImportSysMasterProperties oParent = null) { clsImportSysMasterProperties oProp = new clsImportSysMasterProperties(); oProp.PropertyName = sPropertyName; oProp.UsageFlag = lFlags; if (oParent != null) { oProp.Indent = 1; oProp.UsageType = clsImportSysMasterProperties.eSysMasterPropertyUsageType.UsageTypeHeader; oProp.ParentPropertyID = oParent.PropertyID; } return oProp; } private bool SaveProperty(clsImportSysMasterProperties oProp) { if (!oMPInterface.bImportSysMasterProperty(oProp, clsImportBase.eImportMode.ValidateAndImport)) { throw new Exception(oMPInterface.oErrors.PrintErrors()); } return true; }