I have financial dimension which contact values like BuildingID and ContractID. When new building is created, dimension is properly filled with data. But, after that there is need for contract creation. When contract is created there is value in financial dimension field for contractID. But, when contract is saved, financial dimension for contract id disappear. When I check in DIMENSIONATTRIBUTEVALUESET table value for that ContractID dimension is null, there is only value for BuildingID. I have this method for init dimensions. Am I missing something?
void initDimensions() { DimensionDefault dimension; PMGOrgDimension orgDimension; CompanyId companyId; PMEGround ground; PMEBuilding building; switch(pmcContract.EstateType) { case PMCEstateType::Ground : ground = PMEGround::find(pmcContract.EstateId); dimension = PMEObjectLegalEntity::find(ground.TableId, ground.RecId).DefaultDimension; orgDimension = ground.OrgDimension; companyId = ground.CompanyId; break; case PMCEstateType::Building : building = PMEBuilding::find(pmcContract.EstateId); dimension = PMEObjectLegalEntity::find(building.TableId, building.RecId).DefaultDimension; orgDimension = building.OrgDimension; companyId = building.CompanyId; break; default : dimension = pmcContract.DefaultDimension; orgDimension = pmcContract.OrgDimension; companyId = pmcContract.CompanyId; break; } pmcContract.DefaultDimension = dimension; pmcContract.OrgDimension = orgDimension; pmcContract.CompanyId = companyId; }
*This post is locked for comments