Thursday 28 November 2013

Lookup method

Lookup method



public void lookup()
{
    QueryBuildDataSource    queryBuildDataSource;
    SysTableLookup          lookup;
    QueryBuildRange         queryBuildRange;
    Query                   query;

    query = new Query();

    // Add the first data source to the query
    queryBuildDataSource = query.addDataSource(tableNum(JournalizingDefinition));

    // Add the range to this first data source
    queryBuildRange = queryBuildDataSource.addRange(fieldNum(JournalizingDefinition, JournalizingDefinitionModuleValue));

    // Set the range
    queryBuildRange.value(enum2str(JournalizingDefinitionModuleId::GeneralLedger));

    lookup = SysTableLookup::newParameters(tableNum(JournalizingDefinition), this, true);
    lookup.parmQuery(query);

    // Add the fields to be shown in the lookup form.
    lookup.addLookupfield(fieldNum(JournalizingDefinition, JournalizingDefinitionCode));
    lookup.addLookupfield(fieldNum(JournalizingDefinition, JournalizingDefinitionDesc));
    lookup.addLookupfield(fieldNum(JournalizingDefinition, JournalizingDefinitionModuleValue));

    // Perform the lookup.
    lookup.performFormLookup();

}



Note : Lookup can be created by
1) By Relations
2) By Method
3) By EDT
4) By AutoLookup
5) By TitleField1 and TitleField2


No comments:

Post a Comment

SQL/SSRS Interview questions I thought of blogging some SQL/SSRS interview questions.

Below are some. I will add more, when I complete the compilation 1. What is OLTP(Online Transaction Processing)? OLTP stands ...