Thursday, 20 February 2014

Use of Memo field in full text index in ax 2012

static void FullTextIndex(Args _args)
{
    TableName tableName;
    Query query;
    QueryBuildDataSource queryBDSource;
    QueryBuildRange queryBRange;
    QueryRun queryRun;
    query = new Query();
    queryBDSource = query.addDataSource(tableNum(TableName ));
    queryBRange = queryBDSource.addRange(fieldnum(TableName ,MemoFieldName),1,QueryRangeType::FullText);
    queryBRange.value("Company");
    queryRun = new QueryRun(query);
    while (queryRun.next())
    {
        tableName = queryRun.get(tableNum(TableName ));
        info(tableName.MemoFieldName);
    }
}

No comments:

Post a Comment