intacct / intacct-sdk-php

Official repository of the Sage Intacct SDK for PHP
https://developer.intacct.com/tools/sdk-php/
Apache License 2.0
25 stars 33 forks source link

Cannot get the WAREHOUSEINFO of ITEM object when get list Items using GetByQuery. #134

Closed suoinguyen closed 6 years ago

suoinguyen commented 6 years ago

The query:

$query = new ReadByQuery();
$query->setObjectName('ITEM');
$query->setPageSize(1);
$response = $client->execute($query);
$result = $response->getResult();

The results:

SimpleXMLElement Object
(
    [RECORDNO] => 2391
    [ITEMID] => TSOFFER11323
    [STATUS] => active
    [MRR] => false
    [NAME] => test offer
    [EXTENDED_DESCRIPTION] => SimpleXMLElement Object
        (
        )

    [PODESCRIPTION] => SimpleXMLElement Object
        (
        )

    [SODESCRIPTION] => SimpleXMLElement Object
        (
        )

    [PRODUCTLINEID] => SimpleXMLElement Object
        (
        )

    [CYCLE] => SimpleXMLElement Object
        (
        )

    [CNBILLINGTEMPLKEY] => SimpleXMLElement Object
        (
        )

    [CNREVENUETEMPLKEY] => SimpleXMLElement Object
        (
        )

    [CNREVENUE2TEMPLKEY] => SimpleXMLElement Object
        (
        )

    [CNEXPENSETEMPLKEY] => SimpleXMLElement Object
        (
        )

    [CNEXPENSE2TEMPLKEY] => SimpleXMLElement Object
        (
        )

    [CNBILLINGTEMPLATENAME] => SimpleXMLElement Object
        (
        )

    [CNREVENUETEMPLATENAME] => SimpleXMLElement Object
        (
        )

    [CNREVENUE2TEMPLATENAME] => SimpleXMLElement Object
        (
        )

    [CNEXPENSETEMPLATENAME] => SimpleXMLElement Object
        (
        )

    [CNEXPENSE2TEMPLATENAME] => SimpleXMLElement Object
        (
        )

    [CNDEFAULTBUNDLE] => false
    [CNMEACATEGORYKEY] => SimpleXMLElement Object
        (
        )

    [CNMEACATEGORYNAME] => SimpleXMLElement Object
        (
        )

    [PRODUCTTYPE] => Item for Resale
    [SUBSTITUTEID] => SimpleXMLElement Object
        (
        )

    [SHIP_WEIGHT] => SimpleXMLElement Object
        (
        )

    [WHENLASTSOLD] => SimpleXMLElement Object
        (
        )

    [WHENLASTRECEIVED] => SimpleXMLElement Object
        (
        )

    [INCOMEACCTKEY] => SimpleXMLElement Object
        (
        )

    [EXPENSEACCTKEY] => SimpleXMLElement Object
        (
        )

    [INVACCTKEY] => SimpleXMLElement Object
        (
        )

    [COGSACCTKEY] => SimpleXMLElement Object
        (
        )

    [OFFSETOEGLACCOUNTKEY] => SimpleXMLElement Object
        (
        )

    [OFFSETPOGLACCOUNTKEY] => SimpleXMLElement Object
        (
        )

    [DEFERREDREVACCTKEY] => SimpleXMLElement Object
        (
        )

    [DEFAULTREVRECTEMPLKEY] => SimpleXMLElement Object
        (
        )

    [ALLOW_BACKORDER] => true
    [TAXABLE] => true
    [TAXGROUP.NAME] => SimpleXMLElement Object
        (
        )

    [TAXCODE] => SimpleXMLElement Object
        (
        )

    [COST_METHOD] => Standard
    [STANDARD_COST] => SimpleXMLElement Object
        (
        )

    [UOMGRP] => Each
    [UOM.INVUOMDETAIL.UNIT] => Each
    [UOM.POUOMDETAIL.UNIT] => Each
    [UOM.POUOMDETAIL.CONVFACTOR] => 1
    [UOM.SOUOMDETAIL.UNIT] => Each
    [UOM.SOUOMDETAIL.CONVFACTOR] => 1
    [DEFAULT_WAREHOUSE] => SimpleXMLElement Object
        (
        )

    [GLGROUP] => SimpleXMLElement Object
        (
        )

    [NOTE] => SimpleXMLElement Object
        (
        )

    [INV_PRECISION] => SimpleXMLElement Object
        (
        )

    [PO_PRECISION] => SimpleXMLElement Object
        (
        )

    [SO_PRECISION] => SimpleXMLElement Object
        (
        )

    [ITEMTYPE] => Non-Inventory
    [ENABLE_SERIALNO] => SimpleXMLElement Object
        (
        )

    [SERIAL_MASKKEY] => SimpleXMLElement Object
        (
        )

    [ENABLE_LOT_CATEGORY] => SimpleXMLElement Object
        (
        )

    [LOT_CATEGORYKEY] => SimpleXMLElement Object
        (
        )

    [ENABLE_BINS] => SimpleXMLElement Object
        (
        )

    [ENABLE_EXPIRATION] => SimpleXMLElement Object
        (
        )

    [UPC] => SimpleXMLElement Object
        (
        )

    [REVPOSTING] => SimpleXMLElement Object
        (
        )

    [REVPRINTING] => Kit
    [VSOECATEGORY] => Product - Specified
    [VSOEDLVRSTATUS] => Delivered
    [VSOEREVDEFSTATUS] => Defer until item is delivered
    [HASSTARTENDDATES] => false
    [TERMPERIOD] => SimpleXMLElement Object
        (
        )

    [TOTALPERIODS] => SimpleXMLElement Object
        (
        )

    [COMPUTEFORSHORTTERM] => false
    [RENEWALMACROID] => SimpleXMLElement Object
        (
        )

    [RENEWALMACROKEY] => SimpleXMLElement Object
        (
        )

    [ITEMGLGROUP.INCOMEACCOUNT.ACCTNO] => SimpleXMLElement Object
        (
        )

    [ITEMGLGROUP.EXPENSEACCOUNT.ACCTNO] => SimpleXMLElement Object
        (
        )

    [ITEMGLGROUP.INVENTORYACCOUNT.ACCTNO] => SimpleXMLElement Object
        (
        )

    [ITEMGLGROUP.COGSACCOUNT.ACCTNO] => SimpleXMLElement Object
        (
        )

    [ITEMGLGROUP.DEFRRGLACCOUNT.ACCTNO] => SimpleXMLElement Object
        (
        )

    [ITEMGLGROUP.OEGLACCOUNT.ACCTNO] => SimpleXMLElement Object
        (
        )

    [ITEMGLGROUP.POGLACCOUNT.ACCTNO] => SimpleXMLElement Object
        (
        )

    [WHENCREATED] => 04/16/2018 09:11:52
    [WHENMODIFIED] => 04/16/2018 11:01:40
    [CREATEDBY] => 31
    [MODIFIEDBY] => 31
    [IONORDER] => SimpleXMLElement Object
        (
        )

    [IONHAND] => SimpleXMLElement Object
        (
        )

    [IONHOLD] => SimpleXMLElement Object
        (
        )

    [GLGRPKEY] => SimpleXMLElement Object
        (
        )

    [UOMGRPKEY] => 20
    [TAXGROUPKEY] => SimpleXMLElement Object
        (
        )

    [DROPSHIP] => false
    [BASEPRICE] => 0
    [MEGAENTITYKEY] => SimpleXMLElement Object
        (
        )

    [MEGAENTITYID] => SimpleXMLElement Object
        (
        )

    [MEGAENTITYNAME] => SimpleXMLElement Object
        (
        )

)

The result not return the WAREHOUSEINFO. How to get the WAREHOUSEINFO when get list item? If get 1 record using \Intacct\Functions\Common\Read(), i can get the WAREHOUSEINFO.

jimmymcpeter commented 6 years ago

This is not an issue with the SDK. You can try using ReadByQuery on itemwarehouseinfo, but you'll need to contact customer support to inquire if this is even supported.

suoinguyen commented 6 years ago

I have the permission to access Intacct Server, but i dont know how to setup get the "WAREHOUSEINFO" when use ReadByQuery. Can you support to me? Thanks!

jimmymcpeter commented 6 years ago

I would start with this example here which is outlined here