Hi,
I have a requirement to show a lookup of a custom field on a std form.
I have added the field in the custom form however the lookup shows as per the EDT properties of the field.
But I have below requirement
Form Name : CustFreeInvoice Add a reason code field which should show the same lookup as what is being shown in the form with edit method "editReasonCode" in the form "CustFreeInvoice ".
I need to add this field at the header level. Now I see that there is below the code written for the lookup field.
public void lookup()
{
LedgerJournalACType offsetacttype;
LedgerJournalACType acttype;
LedgerJournalACType ledgerAccountType;
boolean useLedgerAccount;
boolean useOffsetAccount;
boolean useMainAccount;
if (!custInvoiceLine.AssetId)
{
useOffsetAccount=false;
}
else
{
useOffsetAccount=true;
}
useMainAccount = true;
useLedgerAccount = true;
offsetacttype=LedgerJournalACType::FixedAssets;
acttype=LedgerJournalACType::Cust;
ledgerAccountType = LedgerJournalACType::Ledger;
ReasonFormTable::reasonCodeLookup(this,offsetacttype,acttype,useMainAccount,useOffsetAccount,ledgerAccountType,useLedgerAccount);
}
The thing that I would like to understand is how do I manage the same thing in the extension handler code for the lookup of the custom field being added at the header level.
Majorly I want to understand how extension/handler classes for lookup are being used to call the below methods like.
ReasonFormTable::reasonCodeLookup(this,offsetacttype,acttype,useMainAccount,useOffsetAccount,ledgerAccountType,useLedgerAccount);
I know the rest part and I can even replicate the logic in the event handler however i am curious to know if we can just use the same Table lookup method the way we call lookup method from multiple sources.
Thanks,
VK