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–
-
I dragged the edt DimensionDynamicAccount to the table InventJournalTable and i put the relation with the table DimensionAttributeValueCombination.
-
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));
}
- Override the following methods on the Segmented Entry control instance in the form design.
jumpRef, loadAutoCompleteData, segmentValueChanged, loadSegments, validate, lookup methods
public void lookup()
{
switch (InventJournalTable.AccountType)
{
case LedgerJournalACType::Cust:
CustTable::lookupCustomer(this,curext());
break;
case LedgerJournalACType::Vend:
VendTable::lookupVendor(this, curext());
break;
case LedgerJournalACType:
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();
}
}
- Override the resolveReference method on the data source field that backs the Segmented Entry control.
– Anyone please how to fix this issue…
Thanks,
Krishna.