DMFDefinitionGroupEntity addEntity;
if (DMFQuickImportExportFormHelper::validateEntity(_entityName, _sourceName, DMFOperationType::Export))
{
ttsbegin;
addEntity.clear();
addEntity.initValue();
addEntity.DefaultRefreshType = DMFRefreshType::IncrementalPush;
addEntity.DefinitionGroup = _definitionGroup;
addEntity.Entity = _entityName;
addEntity.EntityXMLName = _targetEntity;
addEntity.SkipStaging = NoYes::Yes;
addEntity.source = _sourceName;
addEntity.validationStatus = NoYesError::Yes;
addEntity.ExecutionUnit = NoYes::Yes;
addEntity.LevelInExecutionUnit = NoYes::Yes;
addEntity.insert();
//Generate mapping
DMFXmlGeneration::generateMappingV2(addEntity);
ttscommit;
}
Variables -
if (DMFQuickImportExportFormHelper::validateEntity(_entityName, _sourceName, DMFOperationType::Export))
{
ttsbegin;
addEntity.clear();
addEntity.initValue();
addEntity.DefaultRefreshType = DMFRefreshType::IncrementalPush;
addEntity.DefinitionGroup = _definitionGroup;
addEntity.Entity = _entityName;
addEntity.EntityXMLName = _targetEntity;
addEntity.SkipStaging = NoYes::Yes;
addEntity.source = _sourceName;
addEntity.validationStatus = NoYesError::Yes;
addEntity.ExecutionUnit = NoYes::Yes;
addEntity.LevelInExecutionUnit = NoYes::Yes;
addEntity.insert();
//Generate mapping
DMFXmlGeneration::generateMappingV2(addEntity);
ttscommit;
}
Variables -
- _entityName - Name of the Entity
- _SourceName - Source Data Format (like BYOD, Excel)
- _definitionGroup - Definition Group Name (or Data Project Name)
#DataEntities #X++ #D365F&O #DMF