AnsweredAssumed Answered

Retrieve product information

Question asked by Axel Flores on Apr 12, 2016

Hello,

We're working with Revenue Line Items module, and we want to retrieve some information from the product selected.

In this case we need the following information:

*Category

*Type

*Manufacture

 

To retrieve that information we modified the vardef "sugarfield_product_template_name.php" adding the Type field.

<?php
$dictionary['RevenueLineItem']['fields']['product_template_name'] = array(
            'name' => 'product_template_name',
            'rname' => 'name',
            'id_name' => 'product_template_id',
            'vname' => 'LBL_PRODUCT',
            'join_name' => 'templates',
            'type' => 'relate',
            'link' => 'rli_templates_link',
            'table' => 'product_templates',
            'isnull' => 'true',
            'module' => 'ProductTemplates',
            'dbType' => 'varchar',
            'len' => '255',
            'source' => 'non-db',
            'studio' => array('editview' => false, 'detailview' => false, 'quickcreate' => false),
            'auto_populate' => true,
            'populate_list' => array(
                'category_id' => 'category_id',
                'category_name' => 'category_name',
                'type_id' => 'type_id',
                'type_name' => 'type_name',
                'mft_part_num' => 'mft_part_num',
                'list_price' => 'list_price',
                'cost_price' => 'cost_price',
                'discount_price' => 'discount_price',
                'list_usdollar' => 'list_usdollar',
                'cost_usdollar' => 'cost_usdollar',
                'discount_usdollar' => 'discount_usdollar',
                'currency_id' => 'currency_id',
                'base_rate' => 'base_rate',
                'tax_class' => 'tax_class',
                'weight' => 'weight',
                'currency_id' => 'currency_id',
                'base_rate' => 'base_rate',
                'manufacturer_id' => 'manufacturer_id',
                'manufacturer_name' => 'manufacturer_name',
            ),
);
?>

 

Doing this action the functionality works correctly in the web version but in the mobile app only gets the Category.

Does anybody know if this is a limiting in the mobile app, or if is necessary to do an additional action?

 

Thanks and regards

Axel Flores

Outcomes