Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 72043

Lookup field on DocuView form, form goes blank after lookup

$
0
0

I have added a new string field to the DocuView form with a lookup (as below). When I open the form I see all the existing data on the form. When I do the lookup it works as expected, however when the lookup returns the DocuView form is wiped of all data. When I exit and return into the DocuView I see the selection made on the lookup. I know I need to do something to "capture" and then return the DocuView but not sure what that is or how to accomplish it. Thanks for any help.


public void lookup()
{
sysTableLookup sysTableLookup;
Query Artquery = new Query();
QueryBuildDataSource qbds;
FormRun callerForm;


//super();
callerForm = element.args().caller();

// Instantiate sysTableLookup object using table which will provide the visible fields
sysTableLookup = SysTableLookup::newParameters(tableNum(ArtCustomerAdvocateV1), this);


// Create the query.
qbds= Artquery.addDataSource(tableNum(ArtCustomerAdvocateV1));

sysTableLookup.parmQuery(Artquery);

// Specify the fields to show in the form.
sysTableLookup.addLookupfield(fieldNum(ArtCustomerAdvocateV1, Name));

// Perform the lookup
sysTableLookup.performFormLookup();

}


Viewing all articles
Browse latest Browse all 72043

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>