Share via


AxdBase::fieldsInDataSourceSet Method [AX 2012]

Returns a set with the fields in a data source if the dynamic property for the fields in the data source is set to No.

Syntax

client server public static Set fieldsInDataSourceSet(QueryBuildDataSource _qbds)

Run On

ClientOrServer

Parameters

Return Value

Type: Set Class
The set of fields in the data source or a nullNothingnullptrunita null reference (Nothing in Visual Basic) set if the dynamic property for the fields is set to No for the data source.

Remarks

This method finds which parm methods are available in a specific table in the create scenarios for the Axd classes.

Examples

The following example shows how this method is used in the AxdBaseCreate.buildParmMethodsMap method:

protected Map buildParmMethodsMap(classId _classId,  
                                  QueryBuildDataSource _qbds) 
{ 
    Set             fieldsInQuerySet; 
    SetEnumerator   setEnumerator; 
    Map             parmMethodsMap; 
    identifiername  parmMethodName; 
    SysDictClass    sysDictClass; 
    #axd 
    fieldsInQuerySet = AxdBase::fieldsInDataSourceSet(_qbds); 
    if (fieldsInQuerySet) 
    { 
        sysDictClass   = new SysDictClass(_classId); 
        parmMethodsMap = new Map(Types::String,Types::Integer); 
        setEnumerator  = fieldsInQuerySet.getEnumerator(); 
 
        while (setEnumerator.moveNext()) 
        { 
            parmMethodName = #axdParmPrefix + 
   fieldid2name(tableId,setEnumerator.current()); 
            if (sysDictClass.isMethodActual(parmMethodName)) 
            { 
                parmMethodsMap.insert(parmMethodName,_classId); 
            } 
        } 
    } 
    else 
    { 
        parmMethodsMap = AxInternalBase::parmMethods(_classId); 
    } 
    return parmMethodsMap; 
}

See Also

Reference

AxdBase Class