DimensionAttributeValue dimAttrValue;
DimensionAttribute mainAccountDimAttribute;
MainAccount mainaccount;
// If creating from template, then the DimensionAttributeValue datasource hasn't
// been initialized yet. Return value from the template instead
/*
if (!templateAppliedCompletely && mainAccountTemplate)
{
return mainAccountTemplate.IsBlockedForManualEntry;
}*/
select mainAccountDimAttribute
where mainAccountDimAttribute.Name == "MainAccount";
info(strFmt("%1", mainAccountDimAttribute.RecId));
select * from mainaccount
where mainaccount.MainAccountId == "1601001";
//&& mainaccount.dataAreaId == "psm";
Select forupdate dimAttrValue
where dimAttrValue.DimensionAttribute == mainAccountDimAttribute.RecId
&& dimAttrValue.EntityInstance ==mainaccount.RecId;
ttsBegin;
dimAttrValue.IsBlockedForManualEntry = NoYes::No;
dimAttrValue.update();
ttsCommit;
info("done");
Tidak ada komentar:
Posting Komentar