I believe that a reference data source is just a normal data source added automatically by AX at design time. If you’re building a form at runtime, you would have to do it by yourself by calling addDataSource().
But why do you need it at all? Just add a reference group and AX will deal the rest. An example: