Hi all,
Hope you are doing well.
For our business need we copied the form InventJournalTable (InventoryAndWarehouseManagement\Journals\Item transactions\Movement) and customized the form..
We newly added two fields AccountType,DimensionDynamicAccount in InventJournalTable.
Now we are facing issue with lookup for the newly added field DimensionDynamicAccount when AccountType is ledger.
For the accounType of ledger lookUp for DimensionDynamicAccount field is empty. its populating lookup in DimensionDynamicAccount field properly except Ledger(AccountType).
i.e Account type DimensionDynamicAccount lookup
Customer customer accounts
Vendor vendor accounts
Ledger lookup is empty
Here is what i did--
1) I dragged the edt DimensionDynamicAccount to the table InventJournalTable and i put the relation with the table DimensionAttributeValueCombination.
2) In the form
a) class declaration: form
public class FormRun extends ObjectRun
{
LedgerDimensionDefaultAccountController offsetLedgerDimensionAccountController;
DimensionDynamicAccountController dimAccountController;//newly added
}
b) init (for the form):
public void init()
{
super();
dimAccountController = DimensionDynamicAccountController::construct(
InventJournalTable_ds,
fieldstr(InventJournalTable, DimensionDynamicAccount),
fieldstr(InventJournalTable, AccountType));
}
2. Override the following methods on the Segmented Entry control instance in the form design.
a) public void jumpRef()
{
dimAccountController.jumpRef();
}
b) public void loadAutoCompleteData(LoadAutoCompleteDataEventArgs _e)
{
super(_e);
dimAccountController.loadAutoCompleteData(_e);
}
c) public void segmentValueChanged(SegmentValueChangedEventArgs _e)
{
super(_e);
dimAccountController.segmentValueChanged(_e);
}
d) public void loadSegments()
{
super();
dimAccountController.parmControl(this);
dimAccountController.loadSegments();
}
e) public boolean validate()
{
boolean isValid;
isValid = super();
isValid = dimAccountController.validate() && isValid;
return isValid;
}
f) public void lookup()
{
switch (InventJournalTable.AccountType)
{
case LedgerJournalACType::Cust:
CustTable::lookupCustomer(this,curext());
break;
case LedgerJournalACType::Vend:
VendTable::lookupVendor(this, curext());
break;
case LedgerJournalACType::Bank:
BankAccountTable::lookupBankAccount(this, curext());
break;
case LedgerJournalACType::FixedAssets:
AssetTable::lookupAccountNum(this, curext());
break;
case LedgerJournalACType::Project:
ProjTable::lookupProjId(this, InventJournalTable);
break;
case LedgerJournalACType::RCash:
RCashTable::lookupAccountNum(this, curext());
break;
case LedgerJournalACType::Employee_RU:
EmployeeTable_RU::lookupAdvHolder(this, curext());
break;
default:
super();
}
}
3. Override the following methods on the data source field that backs the Segmented Entry control.
a) public Common resolveReference(FormReferenceControl _formReferenceControl)
{
return dimAccountController.resolveReference();
}
-- Anyone please let me know what is the cause for not showing lookup for AccountType of ledger.
Thanks,
Krishna.