public void
setDimensionAttributeValue(DimensionAttribute _dimensionAttribute, recId
_dimAttrValueRecId, str _value)
{
// if(CollectorInformation_Branch.hasChanged())
// CollectorInformation.Branch = _value;
// else
CollectorInformationLine.City = _value;
}
public void
lookup(FormControl _formControl, str _filterStr)
{
// super(_formControl,
_filterStr);
Args e;
FormRun lookupFormRun;
DimensionAttribute dimAttr;
Object object;
FormStringControl formStringControl;
DimensionAttribute DimensionAttribute;
/* if
(ledgerAllocationBasisRuleSource.FieldSetting ==
LedgerAllocationAccountDimension::Account)
{
MainAccount::lookupMainAccount(_formControl,
LedgerPostingType::LedgerJournal, ledgerAllocationBasisRuleSource.Company);
}
else
{*/
formStringControl = _formControl as
FormStringControl;
// Construct arguments for the custom
lookup
e = new Args();
e.name(formStr(DimensionDefaultingLookup));
e.lookupValue(_filterStr);
e.caller(_formControl);
select DimensionAttribute where
DimensionAttribute.Name == "City_IC";
// Find the dimension attribute
associated with the string control which called this method
// dimAttr =
DimensionAttribute::find(ledgerAllocationBasisRuleSource.BasisDimensionAttribute);
dimAttr =
DimensionAttribute::find(DimensionAttribute.RecId);
e.lookupField(dimAttr.ValueAttribute);
e.record(dimAttr);
// Run the custom lookup and init the
lookup form
lookupFormRun =
classfactory.formRunClass(e);
lookupFormRun.init();
// Specify this is the callback on the
lookup form by casting the
// form to an object and late binding
the setResultCallback method
if
(SysFormRun::hasMethod(lookupFormRun, identifierStr(setResultCallback)))
{
object = lookupFormRun;
object.setResultCallback(element);
}
// Do the lookup
formStringControl.performFormLookup(lookupFormRun);
// }
No comments:
Post a Comment