Adds a non-inventory item, which is any material or part that a business buys but does not keep on hand as inventory. There are two types of non-inventory items:
Request
Response
XMLOps
VB.NET
C#
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 | <?xml version="1.0" encoding="utf-8"?> <?qbxml version="16.0"?> <QBXML> <QBXMLMsgsRq onError="stopOnError"> <ItemNonInventoryAddRq> <ItemNonInventoryAdd> <!-- required --> <Name >STRTYPE</Name> <!-- required --> <BarCode> <!-- optional --> <BarCodeValue >STRTYPE</BarCodeValue> <!-- optional --> <AssignEvenIfUsed >BOOLTYPE</AssignEvenIfUsed> <!-- optional --> <AllowOverride >BOOLTYPE</AllowOverride> <!-- optional --> </BarCode> <IsActive >BOOLTYPE</IsActive> <!-- optional --> <ParentRef> <!-- optional --> <ListID >IDTYPE</ListID> <!-- optional --> <FullName >STRTYPE</FullName> <!-- optional --> </ParentRef> <ClassRef> <!-- optional --> <ListID >IDTYPE</ListID> <!-- optional --> <FullName >STRTYPE</FullName> <!-- optional --> </ClassRef> <ManufacturerPartNumber >STRTYPE</ManufacturerPartNumber> <!-- optional --> <UnitOfMeasureSetRef> <!-- optional --> <ListID >IDTYPE</ListID> <!-- optional --> <FullName >STRTYPE</FullName> <!-- optional --> </UnitOfMeasureSetRef> <IsTaxIncluded >BOOLTYPE</IsTaxIncluded> <!-- optional --> <SalesTaxCodeRef> <!-- optional --> <ListID >IDTYPE</ListID> <!-- optional --> <FullName >STRTYPE</FullName> <!-- optional --> </SalesTaxCodeRef> <!-- BEGIN OR --> <SalesOrPurchase> <!-- optional --> <Desc >STRTYPE</Desc> <!-- optional --> <!-- BEGIN OR --> <Price >PRICETYPE</Price> <!-- optional --> <!-- OR --> <PricePercent >PERCENTTYPE</PricePercent> <!-- optional --> <!-- END OR --> <AccountRef> <!-- optional --> <ListID >IDTYPE</ListID> <!-- optional --> <FullName >STRTYPE</FullName> <!-- optional --> </AccountRef> </SalesOrPurchase> <!-- OR --> <SalesAndPurchase> <!-- optional --> <SalesDesc >STRTYPE</SalesDesc> <!-- optional --> <SalesPrice >PRICETYPE</SalesPrice> <!-- optional --> <IncomeAccountRef> <!-- optional --> <ListID >IDTYPE</ListID> <!-- optional --> <FullName >STRTYPE</FullName> <!-- optional --> </IncomeAccountRef> <PurchaseDesc >STRTYPE</PurchaseDesc> <!-- optional --> <PurchaseCost >PRICETYPE</PurchaseCost> <!-- optional --> <PurchaseTaxCodeRef> <!-- optional --> <ListID >IDTYPE</ListID> <!-- optional --> <FullName >STRTYPE</FullName> <!-- optional --> </PurchaseTaxCodeRef> <ExpenseAccountRef> <!-- optional --> <ListID >IDTYPE</ListID> <!-- optional --> <FullName >STRTYPE</FullName> <!-- optional --> </ExpenseAccountRef> <PrefVendorRef> <!-- optional --> <ListID >IDTYPE</ListID> <!-- optional --> <FullName >STRTYPE</FullName> <!-- optional --> </PrefVendorRef> </SalesAndPurchase> <!-- END OR --> <ExternalGUID >GUIDTYPE</ExternalGUID> <!-- optional --> </ItemNonInventoryAdd> <IncludeRetElement >STRTYPE</IncludeRetElement> <!-- optional, may repeat --> </ItemNonInventoryAddRq> <ItemNonInventoryAddRs statusCode="INTTYPE" statusSeverity="STRTYPE" statusMessage="STRTYPE"> <ItemNonInventoryRet> <!-- optional --> <ListID >IDTYPE</ListID> <!-- required --> <TimeCreated >DATETIMETYPE</TimeCreated> <!-- required --> <TimeModified >DATETIMETYPE</TimeModified> <!-- required --> <EditSequence >STRTYPE</EditSequence> <!-- required --> <Name >STRTYPE</Name> <!-- required --> <FullName >STRTYPE</FullName> <!-- required --> <BarCodeValue >STRTYPE</BarCodeValue> <!-- optional --> <IsActive >BOOLTYPE</IsActive> <!-- optional --> <ClassRef> <!-- optional --> <ListID >IDTYPE</ListID> <!-- optional --> <FullName >STRTYPE</FullName> <!-- optional --> </ClassRef> <ParentRef> <!-- optional --> <ListID >IDTYPE</ListID> <!-- optional --> <FullName >STRTYPE</FullName> <!-- optional --> </ParentRef> <Sublevel >INTTYPE</Sublevel> <!-- required --> <ManufacturerPartNumber >STRTYPE</ManufacturerPartNumber> <!-- optional --> <UnitOfMeasureSetRef> <!-- optional --> <ListID >IDTYPE</ListID> <!-- optional --> <FullName >STRTYPE</FullName> <!-- optional --> </UnitOfMeasureSetRef> <IsTaxIncluded >BOOLTYPE</IsTaxIncluded> <!-- optional --> <SalesTaxCodeRef> <!-- optional --> <ListID >IDTYPE</ListID> <!-- optional --> <FullName >STRTYPE</FullName> <!-- optional --> </SalesTaxCodeRef> <!-- BEGIN OR --> <SalesOrPurchase> <!-- optional --> <Desc >STRTYPE</Desc> <!-- optional --> <!-- BEGIN OR --> <Price >PRICETYPE</Price> <!-- optional --> <!-- OR --> <PricePercent >PERCENTTYPE</PricePercent> <!-- optional --> <!-- END OR --> <AccountRef> <!-- optional --> <ListID >IDTYPE</ListID> <!-- optional --> <FullName >STRTYPE</FullName> <!-- optional --> </AccountRef> </SalesOrPurchase> <!-- OR --> <SalesAndPurchase> <!-- optional --> <SalesDesc >STRTYPE</SalesDesc> <!-- optional --> <SalesPrice >PRICETYPE</SalesPrice> <!-- optional --> <IncomeAccountRef> <!-- optional --> <ListID >IDTYPE</ListID> <!-- optional --> <FullName >STRTYPE</FullName> <!-- optional --> </IncomeAccountRef> <PurchaseDesc >STRTYPE</PurchaseDesc> <!-- optional --> <PurchaseCost >PRICETYPE</PurchaseCost> <!-- optional --> <PurchaseTaxCodeRef> <!-- optional --> <ListID >IDTYPE</ListID> <!-- optional --> <FullName >STRTYPE</FullName> <!-- optional --> </PurchaseTaxCodeRef> <ExpenseAccountRef> <!-- optional --> <ListID >IDTYPE</ListID> <!-- optional --> <FullName >STRTYPE</FullName> <!-- optional --> </ExpenseAccountRef> <PrefVendorRef> <!-- optional --> <ListID >IDTYPE</ListID> <!-- optional --> <FullName >STRTYPE</FullName> <!-- optional --> </PrefVendorRef> </SalesAndPurchase> <!-- END OR --> <ExternalGUID >GUIDTYPE</ExternalGUID> <!-- optional --> <DataExtRet> <!-- optional, may repeat --> <OwnerID >GUIDTYPE</OwnerID> <!-- optional --> <DataExtName >STRTYPE</DataExtName> <!-- required --> <!-- DataExtType may have one of the following values: AMTTYPE, DATETIMETYPE, INTTYPE, PERCENTTYPE, PRICETYPE, QUANTYPE, STR1024TYPE, STR255TYPE --> <DataExtType >ENUMTYPE</DataExtType> <!-- required --> <DataExtValue >STRTYPE</DataExtValue> <!-- required --> </DataExtRet> </ItemNonInventoryRet> <ErrorRecovery> <!-- optional --> <!-- BEGIN OR --> <ListID >IDTYPE</ListID> <!-- optional --> <!-- OR --> <OwnerID >GUIDTYPE</OwnerID> <!-- optional --> <!-- OR --> <TxnID >IDTYPE</TxnID> <!-- optional --> <!-- END OR --> <TxnNumber >INTTYPE</TxnNumber> <!-- optional --> <EditSequence >STRTYPE</EditSequence> <!-- optional --> <ExternalGUID >GUIDTYPE</ExternalGUID> <!-- optional --> </ErrorRecovery> </ItemNonInventoryAddRs> </QBXMLMsgsRq> </QBXML> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 | 'The following sample code is generated as an illustration of 'Creating requests and parsing responses ONLY 'This code is NOT intended to show best practices or ideal code 'Use at your most careful discretion imports System imports System.Net imports System.Drawing imports System.Collections imports System.ComponentModel imports System.Windows.Forms imports System.Data imports System.IO imports Interop.QBFC16 Module com.intuit.idn.samples Public Class Sample Public Sub DoItemNonInventoryAdd() Dim sessionBegun as Boolean sessionBegun = False Dim connectionOpen as Boolean connectionOpen = False Dim sessionManager as QBSessionManager sessionManager = nothing Try 'Create the session Manager object sessionManager = new QBSessionManager 'Create the message set request object to hold our request Dim requestMsgSet as IMsgSetRequest requestMsgSet = sessionManager.CreateMsgSetRequest("US",16,0) requestMsgSet.Attributes.OnError = ENRqOnError.roeContinue BuildItemNonInventoryAddRq(requestMsgSet) 'Connect to QuickBooks and begin a session sessionManager.OpenConnection("","Sample Code from OSR") connectionOpen = True sessionManager.BeginSession("", ENOpenMode.omDontCare) sessionBegun = True 'Send the request and get the response from QuickBooks Dim responseMsgSet as IMsgSetResponse responseMsgSet = sessionManager.DoRequests(requestMsgSet) 'End the session and close the connection to QuickBooks sessionManager.EndSession() sessionBegun = False sessionManager.CloseConnection() connectionOpen = False WalkItemNonInventoryAddRs(responseMsgSet) Catch e as Exception MessageBox.Show(e.Message, "Error") if (sessionBegun) then sessionManager.EndSession() End If if (connectionOpen) then sessionManager.CloseConnection() End If End Try End Sub Public Sub BuildItemNonInventoryAddRq(requestMsgSet as IMsgSetRequest) Dim ItemNonInventoryAddRq as IItemNonInventoryAdd ItemNonInventoryAddRq= requestMsgSet.AppendItemNonInventoryAddRq() 'Set field value for Name ItemNonInventoryAddRq.Name.SetValue("ab") 'Set field value for BarCodeValue ItemNonInventoryAddRq.BarCode.BarCodeValue.SetValue("ab") 'Set field value for AssignEvenIfUsed ItemNonInventoryAddRq.BarCode.AssignEvenIfUsed.SetValue(True) 'Set field value for AllowOverride ItemNonInventoryAddRq.BarCode.AllowOverride.SetValue(True) 'Set field value for IsActive ItemNonInventoryAddRq.IsActive.SetValue(True) 'Set field value for ListID ItemNonInventoryAddRq.ParentRef.ListID.SetValue("200000-1011023419") 'Set field value for FullName ItemNonInventoryAddRq.ParentRef.FullName.SetValue("ab") 'Set field value for ListID ItemNonInventoryAddRq.ClassRef.ListID.SetValue("200000-1011023419") 'Set field value for FullName ItemNonInventoryAddRq.ClassRef.FullName.SetValue("ab") 'Set field value for ManufacturerPartNumber ItemNonInventoryAddRq.ManufacturerPartNumber.SetValue("ab") 'Set field value for ListID ItemNonInventoryAddRq.UnitOfMeasureSetRef.ListID.SetValue("200000-1011023419") 'Set field value for FullName ItemNonInventoryAddRq.UnitOfMeasureSetRef.FullName.SetValue("ab") 'Set field value for IsTaxIncluded ItemNonInventoryAddRq.IsTaxIncluded.SetValue(True) 'Set field value for ListID ItemNonInventoryAddRq.SalesTaxCodeRef.ListID.SetValue("200000-1011023419") 'Set field value for FullName ItemNonInventoryAddRq.SalesTaxCodeRef.FullName.SetValue("ab") Dim ORSalesPurchaseElementType13415 as String ORSalesPurchaseElementType13415 = "SalesOrPurchase" if (ORSalesPurchaseElementType13415 == "SalesOrPurchase") then 'Set field value for Desc ItemNonInventoryAddRq.ORSalesPurchase.SalesOrPurchase.Desc.SetValue("ab") Dim ORPriceElementType13416 as String ORPriceElementType13416 = "Price" if (ORPriceElementType13416 == "Price") then 'Set field value for Price ItemNonInventoryAddRq.ORSalesPurchase.SalesOrPurchase.ORPrice.Price.SetValue(15.65) End If if (ORPriceElementType13416 == "PricePercent") then 'Set field value for PricePercent ItemNonInventoryAddRq.ORSalesPurchase.SalesOrPurchase.ORPrice.PricePercent.SetValue(20.00) End If 'Set field value for ListID ItemNonInventoryAddRq.ORSalesPurchase.SalesOrPurchase.AccountRef.ListID.SetValue("200000-1011023419") 'Set field value for FullName ItemNonInventoryAddRq.ORSalesPurchase.SalesOrPurchase.AccountRef.FullName.SetValue("ab") End If if (ORSalesPurchaseElementType13415 == "SalesAndPurchase") then 'Set field value for SalesDesc ItemNonInventoryAddRq.ORSalesPurchase.SalesAndPurchase.SalesDesc.SetValue("ab") 'Set field value for SalesPrice ItemNonInventoryAddRq.ORSalesPurchase.SalesAndPurchase.SalesPrice.SetValue(15.65) 'Set field value for ListID ItemNonInventoryAddRq.ORSalesPurchase.SalesAndPurchase.IncomeAccountRef.ListID.SetValue("200000-1011023419") 'Set field value for FullName ItemNonInventoryAddRq.ORSalesPurchase.SalesAndPurchase.IncomeAccountRef.FullName.SetValue("ab") 'Set field value for PurchaseDesc ItemNonInventoryAddRq.ORSalesPurchase.SalesAndPurchase.PurchaseDesc.SetValue("ab") 'Set field value for PurchaseCost ItemNonInventoryAddRq.ORSalesPurchase.SalesAndPurchase.PurchaseCost.SetValue(15.65) 'Set field value for ListID ItemNonInventoryAddRq.ORSalesPurchase.SalesAndPurchase.PurchaseTaxCodeRef.ListID.SetValue("200000-1011023419") 'Set field value for FullName ItemNonInventoryAddRq.ORSalesPurchase.SalesAndPurchase.PurchaseTaxCodeRef.FullName.SetValue("ab") 'Set field value for ListID ItemNonInventoryAddRq.ORSalesPurchase.SalesAndPurchase.ExpenseAccountRef.ListID.SetValue("200000-1011023419") 'Set field value for FullName ItemNonInventoryAddRq.ORSalesPurchase.SalesAndPurchase.ExpenseAccountRef.FullName.SetValue("ab") 'Set field value for ListID ItemNonInventoryAddRq.ORSalesPurchase.SalesAndPurchase.PrefVendorRef.ListID.SetValue("200000-1011023419") 'Set field value for FullName ItemNonInventoryAddRq.ORSalesPurchase.SalesAndPurchase.PrefVendorRef.FullName.SetValue("ab") End If 'Set field value for ExternalGUID ItemNonInventoryAddRq.ExternalGUID.SetValue(System.Guid.NewGuid().ToString()) 'Set field value for IncludeRetElementList 'May create more than one of these if needed ItemNonInventoryAddRq.IncludeRetElementList.Add("ab") End Sub Public Sub WalkItemNonInventoryAddRs( responseMsgSet as IMsgSetResponse) if (responseMsgSet is nothing) then Exit Sub End If Dim responseList as IResponseList responseList = responseMsgSet.ResponseList if (responseList is nothing) then Exit Sub End If 'if we sent only one request, there is only one response, we'll walk the list for this sample for j=0 to responseList.Count-1 Dim response as IResponse response = responseList.GetAt(j) 'check the status code of the response, 0=ok, >0 is warning if (response.StatusCode >= 0) then 'the request-specific response is in the details, make sure we have some if (not response.Detail is nothing) then 'make sure the response is the type we're expecting Dim responseType as ENResponseType responseType = CType(response.Type.GetValue(),ENResponseType) if (responseType == ENResponseType.rtItemNonInventoryAddRs) then 'upcast to more specific type here, this is safe because we checked with response.Type check above Dim ItemNonInventoryRet as IItemNonInventoryRet ItemNonInventoryRet = CType(response.Detail,IItemNonInventoryRet) WalkItemNonInventoryRet(ItemNonInventoryRet) End If End If End If Next j End Sub Public Sub WalkItemNonInventoryRet(ItemNonInventoryRet as IItemNonInventoryRet) if (ItemNonInventoryRet is nothing) then Exit Sub End If 'Go through all the elements of IItemNonInventoryRet 'Get value of ListID Dim ListID13417 as String ListID13417 = ItemNonInventoryRet.ListID.GetValue() 'Get value of TimeCreated Dim TimeCreated13418 as DateTime TimeCreated13418 = ItemNonInventoryRet.TimeCreated.GetValue() 'Get value of TimeModified Dim TimeModified13419 as DateTime TimeModified13419 = ItemNonInventoryRet.TimeModified.GetValue() 'Get value of EditSequence Dim EditSequence13420 as String EditSequence13420 = ItemNonInventoryRet.EditSequence.GetValue() 'Get value of Name Dim Name13421 as String Name13421 = ItemNonInventoryRet.Name.GetValue() 'Get value of FullName Dim FullName13422 as String FullName13422 = ItemNonInventoryRet.FullName.GetValue() 'Get value of BarCodeValue if ( not ItemNonInventoryRet.BarCodeValue is nothing) then Dim BarCodeValue13423 as String BarCodeValue13423 = ItemNonInventoryRet.BarCodeValue.GetValue() End If 'Get value of IsActive if ( not ItemNonInventoryRet.IsActive is nothing) then Dim IsActive13424 as Boolean IsActive13424 = ItemNonInventoryRet.IsActive.GetValue() End If if (not ItemNonInventoryRet.ClassRef. is nothing) then 'Get value of ListID if ( not ItemNonInventoryRet.ClassRef.ListID is nothing) then Dim ListID13425 as String ListID13425 = ItemNonInventoryRet.ClassRef.ListID.GetValue() End If 'Get value of FullName if ( not ItemNonInventoryRet.ClassRef.FullName is nothing) then Dim FullName13426 as String FullName13426 = ItemNonInventoryRet.ClassRef.FullName.GetValue() End If End If if (not ItemNonInventoryRet.ParentRef. is nothing) then 'Get value of ListID if ( not ItemNonInventoryRet.ParentRef.ListID is nothing) then Dim ListID13427 as String ListID13427 = ItemNonInventoryRet.ParentRef.ListID.GetValue() End If 'Get value of FullName if ( not ItemNonInventoryRet.ParentRef.FullName is nothing) then Dim FullName13428 as String FullName13428 = ItemNonInventoryRet.ParentRef.FullName.GetValue() End If End If 'Get value of Sublevel Dim Sublevel13429 as Integer Sublevel13429 = ItemNonInventoryRet.Sublevel.GetValue() 'Get value of ManufacturerPartNumber if ( not ItemNonInventoryRet.ManufacturerPartNumber is nothing) then Dim ManufacturerPartNumber13430 as String ManufacturerPartNumber13430 = ItemNonInventoryRet.ManufacturerPartNumber.GetValue() End If if (not ItemNonInventoryRet.UnitOfMeasureSetRef. is nothing) then 'Get value of ListID if ( not ItemNonInventoryRet.UnitOfMeasureSetRef.ListID is nothing) then Dim ListID13431 as String ListID13431 = ItemNonInventoryRet.UnitOfMeasureSetRef.ListID.GetValue() End If 'Get value of FullName if ( not ItemNonInventoryRet.UnitOfMeasureSetRef.FullName is nothing) then Dim FullName13432 as String FullName13432 = ItemNonInventoryRet.UnitOfMeasureSetRef.FullName.GetValue() End If End If 'Get value of IsTaxIncluded if ( not ItemNonInventoryRet.IsTaxIncluded is nothing) then Dim IsTaxIncluded13433 as Boolean IsTaxIncluded13433 = ItemNonInventoryRet.IsTaxIncluded.GetValue() End If if (not ItemNonInventoryRet.SalesTaxCodeRef. is nothing) then 'Get value of ListID if ( not ItemNonInventoryRet.SalesTaxCodeRef.ListID is nothing) then Dim ListID13434 as String ListID13434 = ItemNonInventoryRet.SalesTaxCodeRef.ListID.GetValue() End If 'Get value of FullName if ( not ItemNonInventoryRet.SalesTaxCodeRef.FullName is nothing) then Dim FullName13435 as String FullName13435 = ItemNonInventoryRet.SalesTaxCodeRef.FullName.GetValue() End If End If if (not ItemNonInventoryRet.ORSalesPurchase is nothing) then if (not ItemNonInventoryRet.ORSalesPurchase.SalesOrPurchase is nothing) then if (not ItemNonInventoryRet.ORSalesPurchase.SalesOrPurchase. is nothing) then 'Get value of Desc if ( not ItemNonInventoryRet.ORSalesPurchase.SalesOrPurchase.Desc is nothing) then Dim Desc13437 as String Desc13437 = ItemNonInventoryRet.ORSalesPurchase.SalesOrPurchase.Desc.GetValue() End If if (not ItemNonInventoryRet.ORSalesPurchase.SalesOrPurchase.ORPrice is nothing) then if (not ItemNonInventoryRet.ORSalesPurchase.SalesOrPurchase.ORPrice.Price is nothing) then 'Get value of Price if ( not ItemNonInventoryRet.ORSalesPurchase.SalesOrPurchase.ORPrice.Price is nothing) then Dim Price13439 as Double Price13439 = ItemNonInventoryRet.ORSalesPurchase.SalesOrPurchase.ORPrice.Price.GetValue() End If End If if (not ItemNonInventoryRet.ORSalesPurchase.SalesOrPurchase.ORPrice.PricePercent is nothing) then 'Get value of PricePercent if ( not ItemNonInventoryRet.ORSalesPurchase.SalesOrPurchase.ORPrice.PricePercent is nothing) then Dim PricePercent13440 as Double PricePercent13440 = ItemNonInventoryRet.ORSalesPurchase.SalesOrPurchase.ORPrice.PricePercent.GetValue() End If End If End If if (not ItemNonInventoryRet.ORSalesPurchase.SalesOrPurchase.AccountRef. is nothing) then 'Get value of ListID if ( not ItemNonInventoryRet.ORSalesPurchase.SalesOrPurchase.AccountRef.ListID is nothing) then Dim ListID13441 as String ListID13441 = ItemNonInventoryRet.ORSalesPurchase.SalesOrPurchase.AccountRef.ListID.GetValue() End If 'Get value of FullName if ( not ItemNonInventoryRet.ORSalesPurchase.SalesOrPurchase.AccountRef.FullName is nothing) then Dim FullName13442 as String FullName13442 = ItemNonInventoryRet.ORSalesPurchase.SalesOrPurchase.AccountRef.FullName.GetValue() End If End If End If End If if (not ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase is nothing) then if (not ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase. is nothing) then 'Get value of SalesDesc if ( not ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.SalesDesc is nothing) then Dim SalesDesc13443 as String SalesDesc13443 = ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.SalesDesc.GetValue() End If 'Get value of SalesPrice if ( not ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.SalesPrice is nothing) then Dim SalesPrice13444 as Double SalesPrice13444 = ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.SalesPrice.GetValue() End If if (not ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.IncomeAccountRef. is nothing) then 'Get value of ListID if ( not ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.IncomeAccountRef.ListID is nothing) then Dim ListID13445 as String ListID13445 = ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.IncomeAccountRef.ListID.GetValue() End If 'Get value of FullName if ( not ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.IncomeAccountRef.FullName is nothing) then Dim FullName13446 as String FullName13446 = ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.IncomeAccountRef.FullName.GetValue() End If End If 'Get value of PurchaseDesc if ( not ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.PurchaseDesc is nothing) then Dim PurchaseDesc13447 as String PurchaseDesc13447 = ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.PurchaseDesc.GetValue() End If 'Get value of PurchaseCost if ( not ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.PurchaseCost is nothing) then Dim PurchaseCost13448 as Double PurchaseCost13448 = ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.PurchaseCost.GetValue() End If if (not ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.PurchaseTaxCodeRef. is nothing) then 'Get value of ListID if ( not ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.PurchaseTaxCodeRef.ListID is nothing) then Dim ListID13449 as String ListID13449 = ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.PurchaseTaxCodeRef.ListID.GetValue() End If 'Get value of FullName if ( not ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.PurchaseTaxCodeRef.FullName is nothing) then Dim FullName13450 as String FullName13450 = ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.PurchaseTaxCodeRef.FullName.GetValue() End If End If if (not ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.ExpenseAccountRef. is nothing) then 'Get value of ListID if ( not ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.ExpenseAccountRef.ListID is nothing) then Dim ListID13451 as String ListID13451 = ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.ExpenseAccountRef.ListID.GetValue() End If 'Get value of FullName if ( not ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.ExpenseAccountRef.FullName is nothing) then Dim FullName13452 as String FullName13452 = ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.ExpenseAccountRef.FullName.GetValue() End If End If if (not ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.PrefVendorRef. is nothing) then 'Get value of ListID if ( not ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.PrefVendorRef.ListID is nothing) then Dim ListID13453 as String ListID13453 = ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.PrefVendorRef.ListID.GetValue() End If 'Get value of FullName if ( not ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.PrefVendorRef.FullName is nothing) then Dim FullName13454 as String FullName13454 = ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.PrefVendorRef.FullName.GetValue() End If End If End If End If End If 'Get value of ExternalGUID if ( not ItemNonInventoryRet.ExternalGUID is nothing) then Dim ExternalGUID13455 as String ExternalGUID13455 = ItemNonInventoryRet.ExternalGUID.GetValue() End If if (not ItemNonInventoryRet.DataExtRetList is nothing) Dim i13456 as Integer for i13456 = 0 to ItemNonInventoryRet.DataExtRetList.Count - 1 Dim DataExtRet as IDataExtRet DataExtRet = ItemNonInventoryRet.DataExtRetList.GetAt(i13456) 'Get value of OwnerID if ( not DataExtRetOwnerID is nothing) then Dim OwnerID13457 as String OwnerID13457 = DataExtRetOwnerID.GetValue() End If 'Get value of DataExtName Dim DataExtName13458 as String DataExtName13458 = DataExtRetDataExtName.GetValue() 'Get value of DataExtType Dim DataExtType13459 as ENDataExtType DataExtType13459 = DataExtRetDataExtType.GetValue() 'Get value of DataExtValue Dim DataExtValue13460 as String DataExtValue13460 = DataExtRetDataExtValue.GetValue() Next i13456 End If End Sub End Class End Module |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 | //The following sample code is generated as an illustration of //Creating requests and parsing responses ONLY //This code is NOT intended to show best practices or ideal code //Use at your most careful discretion using System; using System.Net; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; using System.IO; using Interop.QBFC16; namespace com.intuit.idn.samples { public class Sample { public void DoItemNonInventoryAdd() { bool sessionBegun = false; bool connectionOpen = false; QBSessionManager sessionManager = null; try { //Create the session Manager object sessionManager = new QBSessionManager(); //Create the message set request object to hold our request IMsgSetRequest requestMsgSet = sessionManager.CreateMsgSetRequest("US",16,0); requestMsgSet.Attributes.OnError = ENRqOnError.roeContinue; BuildItemNonInventoryAddRq(requestMsgSet); //Connect to QuickBooks and begin a session sessionManager.OpenConnection("","Sample Code from OSR"); connectionOpen = true; sessionManager.BeginSession("", ENOpenMode.omDontCare); sessionBegun = true; //Send the request and get the response from QuickBooks IMsgSetResponse responseMsgSet = sessionManager.DoRequests(requestMsgSet); //End the session and close the connection to QuickBooks sessionManager.EndSession(); sessionBegun = false; sessionManager.CloseConnection(); connectionOpen = false; WalkItemNonInventoryAddRs(responseMsgSet); } catch (Exception e) { MessageBox.Show(e.Message, "Error"); if (sessionBegun) { sessionManager.EndSession(); } if (connectionOpen) { sessionManager.CloseConnection(); } } } void BuildItemNonInventoryAddRq(IMsgSetRequest requestMsgSet) { IItemNonInventoryAdd ItemNonInventoryAddRq= requestMsgSet.AppendItemNonInventoryAddRq(); //Set field value for Name ItemNonInventoryAddRq.Name.SetValue("ab"); //Set field value for BarCodeValue ItemNonInventoryAddRq.BarCode.BarCodeValue.SetValue("ab"); //Set field value for AssignEvenIfUsed ItemNonInventoryAddRq.BarCode.AssignEvenIfUsed.SetValue(true); //Set field value for AllowOverride ItemNonInventoryAddRq.BarCode.AllowOverride.SetValue(true); //Set field value for IsActive ItemNonInventoryAddRq.IsActive.SetValue(true); //Set field value for ListID ItemNonInventoryAddRq.ParentRef.ListID.SetValue("200000-1011023419"); //Set field value for FullName ItemNonInventoryAddRq.ParentRef.FullName.SetValue("ab"); //Set field value for ListID ItemNonInventoryAddRq.ClassRef.ListID.SetValue("200000-1011023419"); //Set field value for FullName ItemNonInventoryAddRq.ClassRef.FullName.SetValue("ab"); //Set field value for ManufacturerPartNumber ItemNonInventoryAddRq.ManufacturerPartNumber.SetValue("ab"); //Set field value for ListID ItemNonInventoryAddRq.UnitOfMeasureSetRef.ListID.SetValue("200000-1011023419"); //Set field value for FullName ItemNonInventoryAddRq.UnitOfMeasureSetRef.FullName.SetValue("ab"); //Set field value for IsTaxIncluded ItemNonInventoryAddRq.IsTaxIncluded.SetValue(true); //Set field value for ListID ItemNonInventoryAddRq.SalesTaxCodeRef.ListID.SetValue("200000-1011023419"); //Set field value for FullName ItemNonInventoryAddRq.SalesTaxCodeRef.FullName.SetValue("ab"); string ORSalesPurchaseElementType13369 = "SalesOrPurchase"; if (ORSalesPurchaseElementType13369 == "SalesOrPurchase") { //Set field value for Desc ItemNonInventoryAddRq.ORSalesPurchase.SalesOrPurchase.Desc.SetValue("ab"); string ORPriceElementType13370 = "Price"; if (ORPriceElementType13370 == "Price") { //Set field value for Price ItemNonInventoryAddRq.ORSalesPurchase.SalesOrPurchase.ORPrice.Price.SetValue(15.65); } if (ORPriceElementType13370 == "PricePercent") { //Set field value for PricePercent ItemNonInventoryAddRq.ORSalesPurchase.SalesOrPurchase.ORPrice.PricePercent.SetValue(20.00); } //Set field value for ListID ItemNonInventoryAddRq.ORSalesPurchase.SalesOrPurchase.AccountRef.ListID.SetValue("200000-1011023419"); //Set field value for FullName ItemNonInventoryAddRq.ORSalesPurchase.SalesOrPurchase.AccountRef.FullName.SetValue("ab"); } if (ORSalesPurchaseElementType13369 == "SalesAndPurchase") { //Set field value for SalesDesc ItemNonInventoryAddRq.ORSalesPurchase.SalesAndPurchase.SalesDesc.SetValue("ab"); //Set field value for SalesPrice ItemNonInventoryAddRq.ORSalesPurchase.SalesAndPurchase.SalesPrice.SetValue(15.65); //Set field value for ListID ItemNonInventoryAddRq.ORSalesPurchase.SalesAndPurchase.IncomeAccountRef.ListID.SetValue("200000-1011023419"); //Set field value for FullName ItemNonInventoryAddRq.ORSalesPurchase.SalesAndPurchase.IncomeAccountRef.FullName.SetValue("ab"); //Set field value for PurchaseDesc ItemNonInventoryAddRq.ORSalesPurchase.SalesAndPurchase.PurchaseDesc.SetValue("ab"); //Set field value for PurchaseCost ItemNonInventoryAddRq.ORSalesPurchase.SalesAndPurchase.PurchaseCost.SetValue(15.65); //Set field value for ListID ItemNonInventoryAddRq.ORSalesPurchase.SalesAndPurchase.PurchaseTaxCodeRef.ListID.SetValue("200000-1011023419"); //Set field value for FullName ItemNonInventoryAddRq.ORSalesPurchase.SalesAndPurchase.PurchaseTaxCodeRef.FullName.SetValue("ab"); //Set field value for ListID ItemNonInventoryAddRq.ORSalesPurchase.SalesAndPurchase.ExpenseAccountRef.ListID.SetValue("200000-1011023419"); //Set field value for FullName ItemNonInventoryAddRq.ORSalesPurchase.SalesAndPurchase.ExpenseAccountRef.FullName.SetValue("ab"); //Set field value for ListID ItemNonInventoryAddRq.ORSalesPurchase.SalesAndPurchase.PrefVendorRef.ListID.SetValue("200000-1011023419"); //Set field value for FullName ItemNonInventoryAddRq.ORSalesPurchase.SalesAndPurchase.PrefVendorRef.FullName.SetValue("ab"); } //Set field value for ExternalGUID ItemNonInventoryAddRq.ExternalGUID.SetValue(Guid.NewGuid().ToString()); //Set field value for IncludeRetElementList //May create more than one of these if needed ItemNonInventoryAddRq.IncludeRetElementList.Add("ab"); } void WalkItemNonInventoryAddRs(IMsgSetResponse responseMsgSet) { if (responseMsgSet == null) return; IResponseList responseList = responseMsgSet.ResponseList; if (responseList == null) return; //if we sent only one request, there is only one response, we'll walk the list for this sample for(int i=0; i < responseList.Count; i++) { IResponse response = responseList.GetAt(i); //check the status code of the response, 0=ok, >0 is warning if (response.StatusCode >= 0) { //the request-specific response is in the details, make sure we have some if (response.Detail != null) { //make sure the response is the type we're expecting ENResponseType responseType = (ENResponseType)response.Type.GetValue(); if (responseType == ENResponseType.rtItemNonInventoryAddRs) { //upcast to more specific type here, this is safe because we checked with response.Type check above IItemNonInventoryRet ItemNonInventoryRet = (IItemNonInventoryRet)response.Detail; WalkItemNonInventoryRet(ItemNonInventoryRet); } } } } } void WalkItemNonInventoryRet(IItemNonInventoryRet ItemNonInventoryRet) { if (ItemNonInventoryRet == null) return; //Go through all the elements of IItemNonInventoryRet //Get value of ListID string ListID13371 = (string)ItemNonInventoryRet.ListID.GetValue(); //Get value of TimeCreated DateTime TimeCreated13372 = (DateTime)ItemNonInventoryRet.TimeCreated.GetValue(); //Get value of TimeModified DateTime TimeModified13373 = (DateTime)ItemNonInventoryRet.TimeModified.GetValue(); //Get value of EditSequence string EditSequence13374 = (string)ItemNonInventoryRet.EditSequence.GetValue(); //Get value of Name string Name13375 = (string)ItemNonInventoryRet.Name.GetValue(); //Get value of FullName string FullName13376 = (string)ItemNonInventoryRet.FullName.GetValue(); //Get value of BarCodeValue if (ItemNonInventoryRet.BarCodeValue != null) { string BarCodeValue13377 = (string)ItemNonInventoryRet.BarCodeValue.GetValue(); } //Get value of IsActive if (ItemNonInventoryRet.IsActive != null) { bool IsActive13378 = (bool)ItemNonInventoryRet.IsActive.GetValue(); } if (ItemNonInventoryRet.ClassRef != null) { //Get value of ListID if (ItemNonInventoryRet.ClassRef.ListID != null) { string ListID13379 = (string)ItemNonInventoryRet.ClassRef.ListID.GetValue(); } //Get value of FullName if (ItemNonInventoryRet.ClassRef.FullName != null) { string FullName13380 = (string)ItemNonInventoryRet.ClassRef.FullName.GetValue(); } } if (ItemNonInventoryRet.ParentRef != null) { //Get value of ListID if (ItemNonInventoryRet.ParentRef.ListID != null) { string ListID13381 = (string)ItemNonInventoryRet.ParentRef.ListID.GetValue(); } //Get value of FullName if (ItemNonInventoryRet.ParentRef.FullName != null) { string FullName13382 = (string)ItemNonInventoryRet.ParentRef.FullName.GetValue(); } } //Get value of Sublevel int Sublevel13383 = (int)ItemNonInventoryRet.Sublevel.GetValue(); //Get value of ManufacturerPartNumber if (ItemNonInventoryRet.ManufacturerPartNumber != null) { string ManufacturerPartNumber13384 = (string)ItemNonInventoryRet.ManufacturerPartNumber.GetValue(); } if (ItemNonInventoryRet.UnitOfMeasureSetRef != null) { //Get value of ListID if (ItemNonInventoryRet.UnitOfMeasureSetRef.ListID != null) { string ListID13385 = (string)ItemNonInventoryRet.UnitOfMeasureSetRef.ListID.GetValue(); } //Get value of FullName if (ItemNonInventoryRet.UnitOfMeasureSetRef.FullName != null) { string FullName13386 = (string)ItemNonInventoryRet.UnitOfMeasureSetRef.FullName.GetValue(); } } //Get value of IsTaxIncluded if (ItemNonInventoryRet.IsTaxIncluded != null) { bool IsTaxIncluded13387 = (bool)ItemNonInventoryRet.IsTaxIncluded.GetValue(); } if (ItemNonInventoryRet.SalesTaxCodeRef != null) { //Get value of ListID if (ItemNonInventoryRet.SalesTaxCodeRef.ListID != null) { string ListID13388 = (string)ItemNonInventoryRet.SalesTaxCodeRef.ListID.GetValue(); } //Get value of FullName if (ItemNonInventoryRet.SalesTaxCodeRef.FullName != null) { string FullName13389 = (string)ItemNonInventoryRet.SalesTaxCodeRef.FullName.GetValue(); } } if (ItemNonInventoryRet.ORSalesPurchase != null) { if (ItemNonInventoryRet.ORSalesPurchase.SalesOrPurchase != null) { if (ItemNonInventoryRet.ORSalesPurchase.SalesOrPurchase != null) { //Get value of Desc if (ItemNonInventoryRet.ORSalesPurchase.SalesOrPurchase.Desc != null) { string Desc13391 = (string)ItemNonInventoryRet.ORSalesPurchase.SalesOrPurchase.Desc.GetValue(); } if (ItemNonInventoryRet.ORSalesPurchase.SalesOrPurchase.ORPrice != null) { if (ItemNonInventoryRet.ORSalesPurchase.SalesOrPurchase.ORPrice.Price != null) { //Get value of Price if (ItemNonInventoryRet.ORSalesPurchase.SalesOrPurchase.ORPrice.Price != null) { double Price13393 = (double)ItemNonInventoryRet.ORSalesPurchase.SalesOrPurchase.ORPrice.Price.GetValue(); } } if (ItemNonInventoryRet.ORSalesPurchase.SalesOrPurchase.ORPrice.PricePercent != null) { //Get value of PricePercent if (ItemNonInventoryRet.ORSalesPurchase.SalesOrPurchase.ORPrice.PricePercent != null) { double PricePercent13394 = (double)ItemNonInventoryRet.ORSalesPurchase.SalesOrPurchase.ORPrice.PricePercent.GetValue(); } } } if (ItemNonInventoryRet.ORSalesPurchase.SalesOrPurchase.AccountRef != null) { //Get value of ListID if (ItemNonInventoryRet.ORSalesPurchase.SalesOrPurchase.AccountRef.ListID != null) { string ListID13395 = (string)ItemNonInventoryRet.ORSalesPurchase.SalesOrPurchase.AccountRef.ListID.GetValue(); } //Get value of FullName if (ItemNonInventoryRet.ORSalesPurchase.SalesOrPurchase.AccountRef.FullName != null) { string FullName13396 = (string)ItemNonInventoryRet.ORSalesPurchase.SalesOrPurchase.AccountRef.FullName.GetValue(); } } } } if (ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase != null) { if (ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase != null) { //Get value of SalesDesc if (ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.SalesDesc != null) { string SalesDesc13397 = (string)ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.SalesDesc.GetValue(); } //Get value of SalesPrice if (ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.SalesPrice != null) { double SalesPrice13398 = (double)ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.SalesPrice.GetValue(); } if (ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.IncomeAccountRef != null) { //Get value of ListID if (ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.IncomeAccountRef.ListID != null) { string ListID13399 = (string)ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.IncomeAccountRef.ListID.GetValue(); } //Get value of FullName if (ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.IncomeAccountRef.FullName != null) { string FullName13400 = (string)ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.IncomeAccountRef.FullName.GetValue(); } } //Get value of PurchaseDesc if (ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.PurchaseDesc != null) { string PurchaseDesc13401 = (string)ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.PurchaseDesc.GetValue(); } //Get value of PurchaseCost if (ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.PurchaseCost != null) { double PurchaseCost13402 = (double)ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.PurchaseCost.GetValue(); } if (ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.PurchaseTaxCodeRef != null) { //Get value of ListID if (ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.PurchaseTaxCodeRef.ListID != null) { string ListID13403 = (string)ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.PurchaseTaxCodeRef.ListID.GetValue(); } //Get value of FullName if (ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.PurchaseTaxCodeRef.FullName != null) { string FullName13404 = (string)ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.PurchaseTaxCodeRef.FullName.GetValue(); } } if (ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.ExpenseAccountRef != null) { //Get value of ListID if (ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.ExpenseAccountRef.ListID != null) { string ListID13405 = (string)ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.ExpenseAccountRef.ListID.GetValue(); } //Get value of FullName if (ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.ExpenseAccountRef.FullName != null) { string FullName13406 = (string)ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.ExpenseAccountRef.FullName.GetValue(); } } if (ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.PrefVendorRef != null) { //Get value of ListID if (ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.PrefVendorRef.ListID != null) { string ListID13407 = (string)ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.PrefVendorRef.ListID.GetValue(); } //Get value of FullName if (ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.PrefVendorRef.FullName != null) { string FullName13408 = (string)ItemNonInventoryRet.ORSalesPurchase.SalesAndPurchase.PrefVendorRef.FullName.GetValue(); } } } } } //Get value of ExternalGUID if (ItemNonInventoryRet.ExternalGUID != null) { string ExternalGUID13409 = (string)ItemNonInventoryRet.ExternalGUID.GetValue(); } if (ItemNonInventoryRet.DataExtRetList != null) { for (int i13410 = 0; i13410 < ItemNonInventoryRet.DataExtRetList.Count; i13410++) { IDataExtRet DataExtRet = ItemNonInventoryRet.DataExtRetList.GetAt(i13410); //Get value of OwnerID if (DataExtRet.OwnerID != null) { string OwnerID13411 = (string)DataExtRet.OwnerID.GetValue(); } //Get value of DataExtName string DataExtName13412 = (string)DataExtRet.DataExtName.GetValue(); //Get value of DataExtType ENDataExtType DataExtType13413 = (ENDataExtType)DataExtRet.DataExtType.GetValue(); //Get value of DataExtValue string DataExtValue13414 = (string)DataExtRet.DataExtValue.GetValue(); } } } } } |