Показать сообщение отдельно
Старый 30.08.2013, 11:28   #2  
smailik is offline
smailik
Участник
Аватар для smailik
 
250 / 70 (3) ++++
Регистрация: 10.04.2012
Адрес: Москва
блин, нет не проинициализирована
сейчас все заработало
окончательный вариант
X++:
public static void main(Args _args)
{
    SalesTable          salesTable;
    Common              record;
    Args                args = new Args();
    FormDataSource      recordDataSource;
    menuFunction menuFunction;
    int i;
    ;
    record            = _args.record();

    menuFunction = new menufunction(menuitemActionStr(PurchCreateFromSalesorderSales), menuitemtype::Action);

    if (record)
        recordDataSource  = _args.record().dataSource();
    for (salesTable = recordDataSource.getFirst(true) ? recordDataSource.getFirst(true) : _args.record();
         salesTable; salesTable = recordDataSource.getNext())
    {
        args.record(salesTable);
        args.menuItemName(menuFunction.name());
        args.menuItemType(menuFunction.type());
        menuFunction.run(args);
    }
}

Последний раз редактировалось smailik; 30.08.2013 в 11:31.