February 26, 2016

Error with Main account lookup: FormDataObject object does not have method 'resolveReference'

Hi Folks,

Recently I faced one issue with Main account lookup on a new table. While selecting value from lookup I am getting several different errors, (see snaps below).

Error message:

Error executing code: FormDataObject object does not have method 'resolveReference'.

Stack trace

(C)\Classes\FormDataObject\resolveReference
(C)\Classes\FormSegmentedEntryControl\resolveReference
(C)\Classes\FormSegmentedEntryControl\modified
(C)\Classes\FormSegmentedEntryControl\Leave
(C)\Classes\FormRun\task
(C)\Classes\SysSetupFormRun\task - line 20

Error Snaps:

clip_image001

clip_image002

clip_image003

Solution:

Try below steps to resolve this issue.

1. Create a normal relation in your table with DimensionAttributeValueCombination table like below

yourTable.LedgerDimension == DimensionAttributeValueCombination.RecId

2. On Form Data source, overwrite below method on LedgerDImension field

public Common resolveReference(FormReferenceControl _formReferenceControl)
{
    return revaluationAccountController.resolveReference();
}

3. Overwrite below methods on Design object control

clip_image004

Make sure you well defined your variable in class declaration and initiate them in form init method.

4. Compile your Form and insert a record.

Let me know if you need complete code for the same, I’ll share.

Thanks

Harry.