A PreferencesQueryRq request message returns information about many of the preferences that the QuickBooks user has set in the company file. Preferences cannot be modified through the SDK, only through the QuickBooks user interface. Note: If you include an explicit end tag in a PreferencesQueryRq request, you will receive an error if there is any space between the opening tag and the end tag. The following table shows valid and invalid ways of constructing this request:
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 | <?xml version="1.0" encoding="utf-8"?> <?qbxml version="16.0"?> <QBXML> <QBXMLMsgsRq onError="stopOnError"> <PreferencesQueryRq> <IncludeRetElement >STRTYPE</IncludeRetElement> <!-- optional, may repeat --> </PreferencesQueryRq> <PreferencesQueryRs statusCode="INTTYPE" statusSeverity="STRTYPE" statusMessage="STRTYPE"> <PreferencesRet> <!-- optional --> <AccountingPreferences> <!-- required --> <IsUsingAccountNumbers >BOOLTYPE</IsUsingAccountNumbers> <!-- required --> <IsRequiringAccounts >BOOLTYPE</IsRequiringAccounts> <!-- required --> <IsUsingClassTracking >BOOLTYPE</IsUsingClassTracking> <!-- required --> <!-- AssignClassesTo may have one of the following values: None [DEFAULT], Accounts, Items, Names --> <AssignClassesTo >ENUMTYPE</AssignClassesTo> <!-- optional --> <IsUsingAuditTrail >BOOLTYPE</IsUsingAuditTrail> <!-- required --> <IsAssigningJournalEntryNumbers >BOOLTYPE</IsAssigningJournalEntryNumbers> <!-- required --> <ClosingDate >DATETYPE</ClosingDate> <!-- optional --> </AccountingPreferences> <FinanceChargePreferences> <!-- required --> <AnnualInterestRate >PERCENTTYPE</AnnualInterestRate> <!-- optional --> <MinFinanceCharge >AMTTYPE</MinFinanceCharge> <!-- optional --> <GracePeriod >INTTYPE</GracePeriod> <!-- required --> <FinanceChargeAccountRef> <!-- optional --> <ListID >IDTYPE</ListID> <!-- optional --> <FullName >STRTYPE</FullName> <!-- optional --> </FinanceChargeAccountRef> <IsAssessingForOverdueCharges >BOOLTYPE</IsAssessingForOverdueCharges> <!-- required --> <!-- CalculateChargesFrom may have one of the following values: DueDate, InvoiceOrBilledDate --> <CalculateChargesFrom >ENUMTYPE</CalculateChargesFrom> <!-- required --> <IsMarkedToBePrinted >BOOLTYPE</IsMarkedToBePrinted> <!-- required --> </FinanceChargePreferences> <JobsAndEstimatesPreferences> <!-- required --> <IsUsingEstimates >BOOLTYPE</IsUsingEstimates> <!-- required --> <IsUsingProgressInvoicing >BOOLTYPE</IsUsingProgressInvoicing> <!-- required --> <IsPrintingItemsWithZeroAmounts >BOOLTYPE</IsPrintingItemsWithZeroAmounts> <!-- required --> </JobsAndEstimatesPreferences> <MultiCurrencyPreferences> <!-- optional --> <IsMultiCurrencyOn >BOOLTYPE</IsMultiCurrencyOn> <!-- optional --> <HomeCurrencyRef> <!-- optional --> <ListID >IDTYPE</ListID> <!-- optional --> <FullName >STRTYPE</FullName> <!-- optional --> </HomeCurrencyRef> </MultiCurrencyPreferences> <MultiLocationInventoryPreferences> <!-- optional --> <IsMultiLocationInventoryAvailable >BOOLTYPE</IsMultiLocationInventoryAvailable> <!-- optional --> <IsMultiLocationInventoryEnabled >BOOLTYPE</IsMultiLocationInventoryEnabled> <!-- optional --> </MultiLocationInventoryPreferences> <PurchasesAndVendorsPreferences> <!-- required --> <IsUsingInventory >BOOLTYPE</IsUsingInventory> <!-- required --> <DaysBillsAreDue >INTTYPE</DaysBillsAreDue> <!-- required --> <IsAutomaticallyUsingDiscounts >BOOLTYPE</IsAutomaticallyUsingDiscounts> <!-- required --> <DefaultDiscountAccountRef> <!-- optional --> <ListID >IDTYPE</ListID> <!-- optional --> <FullName >STRTYPE</FullName> <!-- optional --> </DefaultDiscountAccountRef> </PurchasesAndVendorsPreferences> <ReportsPreferences> <!-- required --> <!-- AgingReportBasis may have one of the following values: AgeFromDueDate, AgeFromTransactionDate --> <AgingReportBasis >ENUMTYPE</AgingReportBasis> <!-- required --> <!-- SummaryReportBasis may have one of the following values: Accrual, Cash --> <SummaryReportBasis >ENUMTYPE</SummaryReportBasis> <!-- required --> </ReportsPreferences> <SalesAndCustomersPreferences> <!-- required --> <DefaultShipMethodRef> <!-- optional --> <ListID >IDTYPE</ListID> <!-- optional --> <FullName >STRTYPE</FullName> <!-- optional --> </DefaultShipMethodRef> <DefaultFOB >STRTYPE</DefaultFOB> <!-- optional --> <DefaultMarkup >PERCENTTYPE</DefaultMarkup> <!-- optional --> <IsTrackingReimbursedExpensesAsIncome >BOOLTYPE</IsTrackingReimbursedExpensesAsIncome> <!-- required --> <IsAutoApplyingPayments >BOOLTYPE</IsAutoApplyingPayments> <!-- required --> <PriceLevels> <!-- optional --> <IsUsingPriceLevels >BOOLTYPE</IsUsingPriceLevels> <!-- required --> <IsRoundingSalesPriceUp >BOOLTYPE</IsRoundingSalesPriceUp> <!-- optional --> </PriceLevels> </SalesAndCustomersPreferences> <SalesTaxPreferences> <!-- optional --> <DefaultItemSalesTaxRef> <!-- required --> <ListID >IDTYPE</ListID> <!-- optional --> <FullName >STRTYPE</FullName> <!-- optional --> </DefaultItemSalesTaxRef> <!-- PaySalesTax may have one of the following values: Monthly, Quarterly, Annually --> <PaySalesTax >ENUMTYPE</PaySalesTax> <!-- required --> <DefaultTaxableSalesTaxCodeRef> <!-- required --> <ListID >IDTYPE</ListID> <!-- optional --> <FullName >STRTYPE</FullName> <!-- optional --> </DefaultTaxableSalesTaxCodeRef> <DefaultNonTaxableSalesTaxCodeRef> <!-- required --> <ListID >IDTYPE</ListID> <!-- optional --> <FullName >STRTYPE</FullName> <!-- optional --> </DefaultNonTaxableSalesTaxCodeRef> <IsUsingVendorTaxCode >BOOLTYPE</IsUsingVendorTaxCode> <!-- optional --> <IsUsingCustomerTaxCode >BOOLTYPE</IsUsingCustomerTaxCode> <!-- optional --> <IsUsingAmountsIncludeTax >BOOLTYPE</IsUsingAmountsIncludeTax> <!-- optional --> </SalesTaxPreferences> <TimeTrackingPreferences> <!-- optional --> <!-- FirstDayOfWeek may have one of the following values: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday --> <FirstDayOfWeek >ENUMTYPE</FirstDayOfWeek> <!-- required --> </TimeTrackingPreferences> <CurrentAppAccessRights> <!-- required --> <IsAutomaticLoginAllowed >BOOLTYPE</IsAutomaticLoginAllowed> <!-- required --> <AutomaticLoginUserName >STRTYPE</AutomaticLoginUserName> <!-- optional --> <IsPersonalDataAccessAllowed >BOOLTYPE</IsPersonalDataAccessAllowed> <!-- required --> </CurrentAppAccessRights> <ItemsAndInventoryPreferences> <!-- optional --> <EnhancedInventoryReceivingEnabled >BOOLTYPE</EnhancedInventoryReceivingEnabled> <!-- optional --> <!-- IsTrackingSerialOrLotNumber may have one of the following values: None [DEFAULT], SerialNumber, LotNumber --> <IsTrackingSerialOrLotNumber >ENUMTYPE</IsTrackingSerialOrLotNumber> <!-- optional --> <IsInventoryExpirationDateEnabled >BOOLTYPE</IsInventoryExpirationDateEnabled> <!-- optional --> <isTrackingOnSalesTransactionsEnabled >BOOLTYPE</isTrackingOnSalesTransactionsEnabled> <!-- optional --> <isTrackingOnPurchaseTransactionsEnabled >BOOLTYPE</isTrackingOnPurchaseTransactionsEnabled> <!-- optional --> <isTrackingOnInventoryAdjustmentEnabled >BOOLTYPE</isTrackingOnInventoryAdjustmentEnabled> <!-- optional --> <isTrackingOnBuildAssemblyEnabled >BOOLTYPE</isTrackingOnBuildAssemblyEnabled> <!-- optional --> <FIFOEnabled >BOOLTYPE</FIFOEnabled> <!-- optional --> <FIFOEffectiveDate >DATETYPE</FIFOEffectiveDate> <!-- optional --> <IsRSBEnabled >BOOLTYPE</IsRSBEnabled> <!-- optional --> <IsBarcodeEnabled >BOOLTYPE</IsBarcodeEnabled> <!-- optional --> </ItemsAndInventoryPreferences> </PreferencesRet> </PreferencesQueryRs> </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 | '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 DoPreferencesQuery() 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 BuildPreferencesQueryRq(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 WalkPreferencesQueryRs(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 BuildPreferencesQueryRq(requestMsgSet as IMsgSetRequest) Dim PreferencesQueryRq as IPreferencesQuery PreferencesQueryRq= requestMsgSet.AppendPreferencesQueryRq() 'Set field value for IncludeRetElementList 'May create more than one of these if needed PreferencesQueryRq.IncludeRetElementList.Add("ab") End Sub Public Sub WalkPreferencesQueryRs( 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.rtPreferencesQueryRs) then 'upcast to more specific type here, this is safe because we checked with response.Type check above Dim PreferencesRet as IPreferencesRet PreferencesRet = CType(response.Detail,IPreferencesRet) WalkPreferencesRet(PreferencesRet) End If End If End If Next j End Sub Public Sub WalkPreferencesRet(PreferencesRet as IPreferencesRet) if (PreferencesRet is nothing) then Exit Sub End If 'Go through all the elements of IPreferencesRet 'Get value of IsUsingAccountNumbers Dim IsUsingAccountNumbers17389 as Boolean IsUsingAccountNumbers17389 = PreferencesRet.AccountingPreferences.IsUsingAccountNumbers.GetValue() 'Get value of IsRequiringAccounts Dim IsRequiringAccounts17390 as Boolean IsRequiringAccounts17390 = PreferencesRet.AccountingPreferences.IsRequiringAccounts.GetValue() 'Get value of IsUsingClassTracking Dim IsUsingClassTracking17391 as Boolean IsUsingClassTracking17391 = PreferencesRet.AccountingPreferences.IsUsingClassTracking.GetValue() 'Get value of AssignClassesTo if ( not PreferencesRet.AccountingPreferences.AssignClassesTo is nothing) then Dim AssignClassesTo17392 as ENAssignClassesTo AssignClassesTo17392 = PreferencesRet.AccountingPreferences.AssignClassesTo.GetValue() End If 'Get value of IsUsingAuditTrail Dim IsUsingAuditTrail17393 as Boolean IsUsingAuditTrail17393 = PreferencesRet.AccountingPreferences.IsUsingAuditTrail.GetValue() 'Get value of IsAssigningJournalEntryNumbers Dim IsAssigningJournalEntryNumbers17394 as Boolean IsAssigningJournalEntryNumbers17394 = PreferencesRet.AccountingPreferences.IsAssigningJournalEntryNumbers.GetValue() 'Get value of ClosingDate if ( not PreferencesRet.AccountingPreferences.ClosingDate is nothing) then Dim ClosingDate17395 as DateTime ClosingDate17395 = PreferencesRet.AccountingPreferences.ClosingDate.GetValue() End If 'Get value of AnnualInterestRate if ( not PreferencesRet.FinanceChargePreferences.AnnualInterestRate is nothing) then Dim AnnualInterestRate17396 as Double AnnualInterestRate17396 = PreferencesRet.FinanceChargePreferences.AnnualInterestRate.GetValue() End If 'Get value of MinFinanceCharge if ( not PreferencesRet.FinanceChargePreferences.MinFinanceCharge is nothing) then Dim MinFinanceCharge17397 as Double MinFinanceCharge17397 = PreferencesRet.FinanceChargePreferences.MinFinanceCharge.GetValue() End If 'Get value of GracePeriod Dim GracePeriod17398 as Integer GracePeriod17398 = PreferencesRet.FinanceChargePreferences.GracePeriod.GetValue() if (not PreferencesRet.FinanceChargePreferences.FinanceChargeAccountRef. is nothing) then 'Get value of ListID if ( not PreferencesRet.FinanceChargePreferences.FinanceChargeAccountRef.ListID is nothing) then Dim ListID17399 as String ListID17399 = PreferencesRet.FinanceChargePreferences.FinanceChargeAccountRef.ListID.GetValue() End If 'Get value of FullName if ( not PreferencesRet.FinanceChargePreferences.FinanceChargeAccountRef.FullName is nothing) then Dim FullName17400 as String FullName17400 = PreferencesRet.FinanceChargePreferences.FinanceChargeAccountRef.FullName.GetValue() End If End If 'Get value of IsAssessingForOverdueCharges Dim IsAssessingForOverdueCharges17401 as Boolean IsAssessingForOverdueCharges17401 = PreferencesRet.FinanceChargePreferences.IsAssessingForOverdueCharges.GetValue() 'Get value of CalculateChargesFrom Dim CalculateChargesFrom17402 as ENCalculateChargesFrom CalculateChargesFrom17402 = PreferencesRet.FinanceChargePreferences.CalculateChargesFrom.GetValue() 'Get value of IsMarkedToBePrinted Dim IsMarkedToBePrinted17403 as Boolean IsMarkedToBePrinted17403 = PreferencesRet.FinanceChargePreferences.IsMarkedToBePrinted.GetValue() 'Get value of IsUsingEstimates Dim IsUsingEstimates17404 as Boolean IsUsingEstimates17404 = PreferencesRet.JobsAndEstimatesPreferences.IsUsingEstimates.GetValue() 'Get value of IsUsingProgressInvoicing Dim IsUsingProgressInvoicing17405 as Boolean IsUsingProgressInvoicing17405 = PreferencesRet.JobsAndEstimatesPreferences.IsUsingProgressInvoicing.GetValue() 'Get value of IsPrintingItemsWithZeroAmounts Dim IsPrintingItemsWithZeroAmounts17406 as Boolean IsPrintingItemsWithZeroAmounts17406 = PreferencesRet.JobsAndEstimatesPreferences.IsPrintingItemsWithZeroAmounts.GetValue() if (not PreferencesRet.MultiCurrencyPreferences. is nothing) then 'Get value of IsMultiCurrencyOn if ( not PreferencesRet.MultiCurrencyPreferences.IsMultiCurrencyOn is nothing) then Dim IsMultiCurrencyOn17407 as Boolean IsMultiCurrencyOn17407 = PreferencesRet.MultiCurrencyPreferences.IsMultiCurrencyOn.GetValue() End If if (not PreferencesRet.MultiCurrencyPreferences.HomeCurrencyRef. is nothing) then 'Get value of ListID if ( not PreferencesRet.MultiCurrencyPreferences.HomeCurrencyRef.ListID is nothing) then Dim ListID17408 as String ListID17408 = PreferencesRet.MultiCurrencyPreferences.HomeCurrencyRef.ListID.GetValue() End If 'Get value of FullName if ( not PreferencesRet.MultiCurrencyPreferences.HomeCurrencyRef.FullName is nothing) then Dim FullName17409 as String FullName17409 = PreferencesRet.MultiCurrencyPreferences.HomeCurrencyRef.FullName.GetValue() End If End If End If if (not PreferencesRet.MultiLocationInventoryPreferences. is nothing) then 'Get value of IsMultiLocationInventoryAvailable if ( not PreferencesRet.MultiLocationInventoryPreferences.IsMultiLocationInventoryAvailable is nothing) then Dim IsMultiLocationInventoryAvailable17410 as Boolean IsMultiLocationInventoryAvailable17410 = PreferencesRet.MultiLocationInventoryPreferences.IsMultiLocationInventoryAvailable.GetValue() End If 'Get value of IsMultiLocationInventoryEnabled if ( not PreferencesRet.MultiLocationInventoryPreferences.IsMultiLocationInventoryEnabled is nothing) then Dim IsMultiLocationInventoryEnabled17411 as Boolean IsMultiLocationInventoryEnabled17411 = PreferencesRet.MultiLocationInventoryPreferences.IsMultiLocationInventoryEnabled.GetValue() End If End If 'Get value of IsUsingInventory Dim IsUsingInventory17412 as Boolean IsUsingInventory17412 = PreferencesRet.PurchasesAndVendorsPreferences.IsUsingInventory.GetValue() 'Get value of DaysBillsAreDue Dim DaysBillsAreDue17413 as Integer DaysBillsAreDue17413 = PreferencesRet.PurchasesAndVendorsPreferences.DaysBillsAreDue.GetValue() 'Get value of IsAutomaticallyUsingDiscounts Dim IsAutomaticallyUsingDiscounts17414 as Boolean IsAutomaticallyUsingDiscounts17414 = PreferencesRet.PurchasesAndVendorsPreferences.IsAutomaticallyUsingDiscounts.GetValue() if (not PreferencesRet.PurchasesAndVendorsPreferences.DefaultDiscountAccountRef. is nothing) then 'Get value of ListID if ( not PreferencesRet.PurchasesAndVendorsPreferences.DefaultDiscountAccountRef.ListID is nothing) then Dim ListID17415 as String ListID17415 = PreferencesRet.PurchasesAndVendorsPreferences.DefaultDiscountAccountRef.ListID.GetValue() End If 'Get value of FullName if ( not PreferencesRet.PurchasesAndVendorsPreferences.DefaultDiscountAccountRef.FullName is nothing) then Dim FullName17416 as String FullName17416 = PreferencesRet.PurchasesAndVendorsPreferences.DefaultDiscountAccountRef.FullName.GetValue() End If End If 'Get value of AgingReportBasis Dim AgingReportBasis17417 as ENAgingReportBasis AgingReportBasis17417 = PreferencesRet.ReportsPreferences.AgingReportBasis.GetValue() 'Get value of SummaryReportBasis Dim SummaryReportBasis17418 as ENSummaryReportBasis SummaryReportBasis17418 = PreferencesRet.ReportsPreferences.SummaryReportBasis.GetValue() if (not PreferencesRet.SalesAndCustomersPreferences.DefaultShipMethodRef. is nothing) then 'Get value of ListID if ( not PreferencesRet.SalesAndCustomersPreferences.DefaultShipMethodRef.ListID is nothing) then Dim ListID17419 as String ListID17419 = PreferencesRet.SalesAndCustomersPreferences.DefaultShipMethodRef.ListID.GetValue() End If 'Get value of FullName if ( not PreferencesRet.SalesAndCustomersPreferences.DefaultShipMethodRef.FullName is nothing) then Dim FullName17420 as String FullName17420 = PreferencesRet.SalesAndCustomersPreferences.DefaultShipMethodRef.FullName.GetValue() End If End If 'Get value of DefaultFOB if ( not PreferencesRet.SalesAndCustomersPreferences.DefaultFOB is nothing) then Dim DefaultFOB17421 as String DefaultFOB17421 = PreferencesRet.SalesAndCustomersPreferences.DefaultFOB.GetValue() End If 'Get value of DefaultMarkup if ( not PreferencesRet.SalesAndCustomersPreferences.DefaultMarkup is nothing) then Dim DefaultMarkup17422 as Double DefaultMarkup17422 = PreferencesRet.SalesAndCustomersPreferences.DefaultMarkup.GetValue() End If 'Get value of IsTrackingReimbursedExpensesAsIncome Dim IsTrackingReimbursedExpensesAsIncome17423 as Boolean IsTrackingReimbursedExpensesAsIncome17423 = PreferencesRet.SalesAndCustomersPreferences.IsTrackingReimbursedExpensesAsIncome.GetValue() 'Get value of IsAutoApplyingPayments Dim IsAutoApplyingPayments17424 as Boolean IsAutoApplyingPayments17424 = PreferencesRet.SalesAndCustomersPreferences.IsAutoApplyingPayments.GetValue() if (not PreferencesRet.SalesAndCustomersPreferences.PriceLevels. is nothing) then 'Get value of IsUsingPriceLevels Dim IsUsingPriceLevels17425 as Boolean IsUsingPriceLevels17425 = PreferencesRet.SalesAndCustomersPreferences.PriceLevels.IsUsingPriceLevels.GetValue() 'Get value of IsRoundingSalesPriceUp if ( not PreferencesRet.SalesAndCustomersPreferences.PriceLevels.IsRoundingSalesPriceUp is nothing) then Dim IsRoundingSalesPriceUp17426 as Boolean IsRoundingSalesPriceUp17426 = PreferencesRet.SalesAndCustomersPreferences.PriceLevels.IsRoundingSalesPriceUp.GetValue() End If End If if (not PreferencesRet.SalesTaxPreferences. is nothing) then 'Get value of ListID if ( not PreferencesRet.SalesTaxPreferences.DefaultItemSalesTaxRef.ListID is nothing) then Dim ListID17427 as String ListID17427 = PreferencesRet.SalesTaxPreferences.DefaultItemSalesTaxRef.ListID.GetValue() End If 'Get value of FullName if ( not PreferencesRet.SalesTaxPreferences.DefaultItemSalesTaxRef.FullName is nothing) then Dim FullName17428 as String FullName17428 = PreferencesRet.SalesTaxPreferences.DefaultItemSalesTaxRef.FullName.GetValue() End If 'Get value of PaySalesTax Dim PaySalesTax17429 as ENPaySalesTax PaySalesTax17429 = PreferencesRet.SalesTaxPreferences.PaySalesTax.GetValue() 'Get value of ListID if ( not PreferencesRet.SalesTaxPreferences.DefaultTaxableSalesTaxCodeRef.ListID is nothing) then Dim ListID17430 as String ListID17430 = PreferencesRet.SalesTaxPreferences.DefaultTaxableSalesTaxCodeRef.ListID.GetValue() End If 'Get value of FullName if ( not PreferencesRet.SalesTaxPreferences.DefaultTaxableSalesTaxCodeRef.FullName is nothing) then Dim FullName17431 as String FullName17431 = PreferencesRet.SalesTaxPreferences.DefaultTaxableSalesTaxCodeRef.FullName.GetValue() End If 'Get value of ListID if ( not PreferencesRet.SalesTaxPreferences.DefaultNonTaxableSalesTaxCodeRef.ListID is nothing) then Dim ListID17432 as String ListID17432 = PreferencesRet.SalesTaxPreferences.DefaultNonTaxableSalesTaxCodeRef.ListID.GetValue() End If 'Get value of FullName if ( not PreferencesRet.SalesTaxPreferences.DefaultNonTaxableSalesTaxCodeRef.FullName is nothing) then Dim FullName17433 as String FullName17433 = PreferencesRet.SalesTaxPreferences.DefaultNonTaxableSalesTaxCodeRef.FullName.GetValue() End If 'Get value of IsUsingVendorTaxCode if ( not PreferencesRet.SalesTaxPreferences.IsUsingVendorTaxCode is nothing) then Dim IsUsingVendorTaxCode17434 as Boolean IsUsingVendorTaxCode17434 = PreferencesRet.SalesTaxPreferences.IsUsingVendorTaxCode.GetValue() End If 'Get value of IsUsingCustomerTaxCode if ( not PreferencesRet.SalesTaxPreferences.IsUsingCustomerTaxCode is nothing) then Dim IsUsingCustomerTaxCode17435 as Boolean IsUsingCustomerTaxCode17435 = PreferencesRet.SalesTaxPreferences.IsUsingCustomerTaxCode.GetValue() End If 'Get value of IsUsingAmountsIncludeTax if ( not PreferencesRet.SalesTaxPreferences.IsUsingAmountsIncludeTax is nothing) then Dim IsUsingAmountsIncludeTax17436 as Boolean IsUsingAmountsIncludeTax17436 = PreferencesRet.SalesTaxPreferences.IsUsingAmountsIncludeTax.GetValue() End If End If if (not PreferencesRet.TimeTrackingPreferences. is nothing) then 'Get value of FirstDayOfWeek Dim FirstDayOfWeek17437 as ENFirstDayOfWeek FirstDayOfWeek17437 = PreferencesRet.TimeTrackingPreferences.FirstDayOfWeek.GetValue() End If 'Get value of IsAutomaticLoginAllowed Dim IsAutomaticLoginAllowed17438 as Boolean IsAutomaticLoginAllowed17438 = PreferencesRet.CurrentAppAccessRights.IsAutomaticLoginAllowed.GetValue() 'Get value of AutomaticLoginUserName if ( not PreferencesRet.CurrentAppAccessRights.AutomaticLoginUserName is nothing) then Dim AutomaticLoginUserName17439 as String AutomaticLoginUserName17439 = PreferencesRet.CurrentAppAccessRights.AutomaticLoginUserName.GetValue() End If 'Get value of IsPersonalDataAccessAllowed Dim IsPersonalDataAccessAllowed17440 as Boolean IsPersonalDataAccessAllowed17440 = PreferencesRet.CurrentAppAccessRights.IsPersonalDataAccessAllowed.GetValue() if (not PreferencesRet.ItemsAndInventoryPreferences. is nothing) then 'Get value of EnhancedInventoryReceivingEnabled if ( not PreferencesRet.ItemsAndInventoryPreferences.EnhancedInventoryReceivingEnabled is nothing) then Dim EnhancedInventoryReceivingEnabled17441 as Boolean EnhancedInventoryReceivingEnabled17441 = PreferencesRet.ItemsAndInventoryPreferences.EnhancedInventoryReceivingEnabled.GetValue() End If 'Get value of IsTrackingSerialOrLotNumber if ( not PreferencesRet.ItemsAndInventoryPreferences.IsTrackingSerialOrLotNumber is nothing) then Dim IsTrackingSerialOrLotNumber17442 as ENIsTrackingSerialOrLotNumber IsTrackingSerialOrLotNumber17442 = PreferencesRet.ItemsAndInventoryPreferences.IsTrackingSerialOrLotNumber.GetValue() End If 'Get value of IsInventoryExpirationDateEnabled if ( not PreferencesRet.ItemsAndInventoryPreferences.IsInventoryExpirationDateEnabled is nothing) then Dim IsInventoryExpDateEnabled as Boolean IsInventoryExpDateEnabled = PreferencesRet.ItemsAndInventoryPreferences.IsInventoryExpirationDateEnabled.GetValue() End If 'Get value of isTrackingOnSalesTransactionsEnabled if ( not PreferencesRet.ItemsAndInventoryPreferences.isTrackingOnSalesTransactionsEnabled is nothing) then Dim isTrackingOnSalesTransactionsEnabled17443 as Boolean isTrackingOnSalesTransactionsEnabled17443 = PreferencesRet.ItemsAndInventoryPreferences.isTrackingOnSalesTransactionsEnabled.GetValue() End If 'Get value of isTrackingOnPurchaseTransactionsEnabled if ( not PreferencesRet.ItemsAndInventoryPreferences.isTrackingOnPurchaseTransactionsEnabled is nothing) then Dim isTrackingOnPurchaseTransactionsEnabled17444 as Boolean isTrackingOnPurchaseTransactionsEnabled17444 = PreferencesRet.ItemsAndInventoryPreferences.isTrackingOnPurchaseTransactionsEnabled.GetValue() End If 'Get value of isTrackingOnInventoryAdjustmentEnabled if ( not PreferencesRet.ItemsAndInventoryPreferences.isTrackingOnInventoryAdjustmentEnabled is nothing) then Dim isTrackingOnInventoryAdjustmentEnabled17445 as Boolean isTrackingOnInventoryAdjustmentEnabled17445 = PreferencesRet.ItemsAndInventoryPreferences.isTrackingOnInventoryAdjustmentEnabled.GetValue() End If 'Get value of isTrackingOnBuildAssemblyEnabled if ( not PreferencesRet.ItemsAndInventoryPreferences.isTrackingOnBuildAssemblyEnabled is nothing) then Dim isTrackingOnBuildAssemblyEnabled17446 as Boolean isTrackingOnBuildAssemblyEnabled17446 = PreferencesRet.ItemsAndInventoryPreferences.isTrackingOnBuildAssemblyEnabled.GetValue() End If 'Get value of FIFOEnabled if ( not PreferencesRet.ItemsAndInventoryPreferences.FIFOEnabled is nothing) then Dim FIFOEnabled17447 as Boolean FIFOEnabled17447 = PreferencesRet.ItemsAndInventoryPreferences.FIFOEnabled.GetValue() End If 'Get value of FIFOEffectiveDate if ( not PreferencesRet.ItemsAndInventoryPreferences.FIFOEffectiveDate is nothing) then Dim FIFOEffectiveDate17448 as DateTime FIFOEffectiveDate17448 = PreferencesRet.ItemsAndInventoryPreferences.FIFOEffectiveDate.GetValue() End If 'Get value of IsRSBEnabled if ( not PreferencesRet.ItemsAndInventoryPreferences.IsRSBEnabled is nothing) then Dim IsRSBEnabled17449 as Boolean IsRSBEnabled17449 = PreferencesRet.ItemsAndInventoryPreferences.IsRSBEnabled.GetValue() End If 'Get value of IsBarcodeEnabled if ( not PreferencesRet.ItemsAndInventoryPreferences.IsBarcodeEnabled is nothing) then Dim IsBarcodeEnabled17450 as Boolean IsBarcodeEnabled17450 = PreferencesRet.ItemsAndInventoryPreferences.IsBarcodeEnabled.GetValue() End If 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 | //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 DoPreferencesQuery() { 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; BuildPreferencesQueryRq(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; WalkPreferencesQueryRs(responseMsgSet); } catch (Exception e) { MessageBox.Show(e.Message, "Error"); if (sessionBegun) { sessionManager.EndSession(); } if (connectionOpen) { sessionManager.CloseConnection(); } } } void BuildPreferencesQueryRq(IMsgSetRequest requestMsgSet) { IPreferencesQuery PreferencesQueryRq= requestMsgSet.AppendPreferencesQueryRq(); //Set field value for IncludeRetElementList //May create more than one of these if needed PreferencesQueryRq.IncludeRetElementList.Add("ab"); } void WalkPreferencesQueryRs(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.rtPreferencesQueryRs) { //upcast to more specific type here, this is safe because we checked with response.Type check above IPreferencesRet PreferencesRet = (IPreferencesRet)response.Detail; WalkPreferencesRet(PreferencesRet); } } } } } void WalkPreferencesRet(IPreferencesRet PreferencesRet) { if (PreferencesRet == null) return; //Go through all the elements of IPreferencesRet //Get value of IsUsingAccountNumbers bool IsUsingAccountNumbers17327 = (bool)PreferencesRet.AccountingPreferences.IsUsingAccountNumbers.GetValue(); //Get value of IsRequiringAccounts bool IsRequiringAccounts17328 = (bool)PreferencesRet.AccountingPreferences.IsRequiringAccounts.GetValue(); //Get value of IsUsingClassTracking bool IsUsingClassTracking17329 = (bool)PreferencesRet.AccountingPreferences.IsUsingClassTracking.GetValue(); //Get value of AssignClassesTo if (PreferencesRet.AccountingPreferences.AssignClassesTo != null) { ENAssignClassesTo AssignClassesTo17330 = (ENAssignClassesTo)PreferencesRet.AccountingPreferences.AssignClassesTo.GetValue(); } //Get value of IsUsingAuditTrail bool IsUsingAuditTrail17331 = (bool)PreferencesRet.AccountingPreferences.IsUsingAuditTrail.GetValue(); //Get value of IsAssigningJournalEntryNumbers bool IsAssigningJournalEntryNumbers17332 = (bool)PreferencesRet.AccountingPreferences.IsAssigningJournalEntryNumbers.GetValue(); //Get value of ClosingDate if (PreferencesRet.AccountingPreferences.ClosingDate != null) { DateTime ClosingDate17333 = (DateTime)PreferencesRet.AccountingPreferences.ClosingDate.GetValue(); } //Get value of AnnualInterestRate if (PreferencesRet.FinanceChargePreferences.AnnualInterestRate != null) { double AnnualInterestRate17334 = (double)PreferencesRet.FinanceChargePreferences.AnnualInterestRate.GetValue(); } //Get value of MinFinanceCharge if (PreferencesRet.FinanceChargePreferences.MinFinanceCharge != null) { double MinFinanceCharge17335 = (double)PreferencesRet.FinanceChargePreferences.MinFinanceCharge.GetValue(); } //Get value of GracePeriod int GracePeriod17336 = (int)PreferencesRet.FinanceChargePreferences.GracePeriod.GetValue(); if (PreferencesRet.FinanceChargePreferences.FinanceChargeAccountRef != null) { //Get value of ListID if (PreferencesRet.FinanceChargePreferences.FinanceChargeAccountRef.ListID != null) { string ListID17337 = (string)PreferencesRet.FinanceChargePreferences.FinanceChargeAccountRef.ListID.GetValue(); } //Get value of FullName if (PreferencesRet.FinanceChargePreferences.FinanceChargeAccountRef.FullName != null) { string FullName17338 = (string)PreferencesRet.FinanceChargePreferences.FinanceChargeAccountRef.FullName.GetValue(); } } //Get value of IsAssessingForOverdueCharges bool IsAssessingForOverdueCharges17339 = (bool)PreferencesRet.FinanceChargePreferences.IsAssessingForOverdueCharges.GetValue(); //Get value of CalculateChargesFrom ENCalculateChargesFrom CalculateChargesFrom17340 = (ENCalculateChargesFrom)PreferencesRet.FinanceChargePreferences.CalculateChargesFrom.GetValue(); //Get value of IsMarkedToBePrinted bool IsMarkedToBePrinted17341 = (bool)PreferencesRet.FinanceChargePreferences.IsMarkedToBePrinted.GetValue(); //Get value of IsUsingEstimates bool IsUsingEstimates17342 = (bool)PreferencesRet.JobsAndEstimatesPreferences.IsUsingEstimates.GetValue(); //Get value of IsUsingProgressInvoicing bool IsUsingProgressInvoicing17343 = (bool)PreferencesRet.JobsAndEstimatesPreferences.IsUsingProgressInvoicing.GetValue(); //Get value of IsPrintingItemsWithZeroAmounts bool IsPrintingItemsWithZeroAmounts17344 = (bool)PreferencesRet.JobsAndEstimatesPreferences.IsPrintingItemsWithZeroAmounts.GetValue(); if (PreferencesRet.MultiCurrencyPreferences != null) { //Get value of IsMultiCurrencyOn if (PreferencesRet.MultiCurrencyPreferences.IsMultiCurrencyOn != null) { bool IsMultiCurrencyOn17345 = (bool)PreferencesRet.MultiCurrencyPreferences.IsMultiCurrencyOn.GetValue(); } if (PreferencesRet.MultiCurrencyPreferences.HomeCurrencyRef != null) { //Get value of ListID if (PreferencesRet.MultiCurrencyPreferences.HomeCurrencyRef.ListID != null) { string ListID17346 = (string)PreferencesRet.MultiCurrencyPreferences.HomeCurrencyRef.ListID.GetValue(); } //Get value of FullName if (PreferencesRet.MultiCurrencyPreferences.HomeCurrencyRef.FullName != null) { string FullName17347 = (string)PreferencesRet.MultiCurrencyPreferences.HomeCurrencyRef.FullName.GetValue(); } } } if (PreferencesRet.MultiLocationInventoryPreferences != null) { //Get value of IsMultiLocationInventoryAvailable if (PreferencesRet.MultiLocationInventoryPreferences.IsMultiLocationInventoryAvailable != null) { bool IsMultiLocationInventoryAvailable17348 = (bool)PreferencesRet.MultiLocationInventoryPreferences.IsMultiLocationInventoryAvailable.GetValue(); } //Get value of IsMultiLocationInventoryEnabled if (PreferencesRet.MultiLocationInventoryPreferences.IsMultiLocationInventoryEnabled != null) { bool IsMultiLocationInventoryEnabled17349 = (bool)PreferencesRet.MultiLocationInventoryPreferences.IsMultiLocationInventoryEnabled.GetValue(); } } //Get value of IsUsingInventory bool IsUsingInventory17350 = (bool)PreferencesRet.PurchasesAndVendorsPreferences.IsUsingInventory.GetValue(); //Get value of DaysBillsAreDue int DaysBillsAreDue17351 = (int)PreferencesRet.PurchasesAndVendorsPreferences.DaysBillsAreDue.GetValue(); //Get value of IsAutomaticallyUsingDiscounts bool IsAutomaticallyUsingDiscounts17352 = (bool)PreferencesRet.PurchasesAndVendorsPreferences.IsAutomaticallyUsingDiscounts.GetValue(); if (PreferencesRet.PurchasesAndVendorsPreferences.DefaultDiscountAccountRef != null) { //Get value of ListID if (PreferencesRet.PurchasesAndVendorsPreferences.DefaultDiscountAccountRef.ListID != null) { string ListID17353 = (string)PreferencesRet.PurchasesAndVendorsPreferences.DefaultDiscountAccountRef.ListID.GetValue(); } //Get value of FullName if (PreferencesRet.PurchasesAndVendorsPreferences.DefaultDiscountAccountRef.FullName != null) { string FullName17354 = (string)PreferencesRet.PurchasesAndVendorsPreferences.DefaultDiscountAccountRef.FullName.GetValue(); } } //Get value of AgingReportBasis ENAgingReportBasis AgingReportBasis17355 = (ENAgingReportBasis)PreferencesRet.ReportsPreferences.AgingReportBasis.GetValue(); //Get value of SummaryReportBasis ENSummaryReportBasis SummaryReportBasis17356 = (ENSummaryReportBasis)PreferencesRet.ReportsPreferences.SummaryReportBasis.GetValue(); if (PreferencesRet.SalesAndCustomersPreferences.DefaultShipMethodRef != null) { //Get value of ListID if (PreferencesRet.SalesAndCustomersPreferences.DefaultShipMethodRef.ListID != null) { string ListID17357 = (string)PreferencesRet.SalesAndCustomersPreferences.DefaultShipMethodRef.ListID.GetValue(); } //Get value of FullName if (PreferencesRet.SalesAndCustomersPreferences.DefaultShipMethodRef.FullName != null) { string FullName17358 = (string)PreferencesRet.SalesAndCustomersPreferences.DefaultShipMethodRef.FullName.GetValue(); } } //Get value of DefaultFOB if (PreferencesRet.SalesAndCustomersPreferences.DefaultFOB != null) { string DefaultFOB17359 = (string)PreferencesRet.SalesAndCustomersPreferences.DefaultFOB.GetValue(); } //Get value of DefaultMarkup if (PreferencesRet.SalesAndCustomersPreferences.DefaultMarkup != null) { double DefaultMarkup17360 = (double)PreferencesRet.SalesAndCustomersPreferences.DefaultMarkup.GetValue(); } //Get value of IsTrackingReimbursedExpensesAsIncome bool IsTrackingReimbursedExpensesAsIncome17361 = (bool)PreferencesRet.SalesAndCustomersPreferences.IsTrackingReimbursedExpensesAsIncome.GetValue(); //Get value of IsAutoApplyingPayments bool IsAutoApplyingPayments17362 = (bool)PreferencesRet.SalesAndCustomersPreferences.IsAutoApplyingPayments.GetValue(); if (PreferencesRet.SalesAndCustomersPreferences.PriceLevels != null) { //Get value of IsUsingPriceLevels bool IsUsingPriceLevels17363 = (bool)PreferencesRet.SalesAndCustomersPreferences.PriceLevels.IsUsingPriceLevels.GetValue(); //Get value of IsRoundingSalesPriceUp if (PreferencesRet.SalesAndCustomersPreferences.PriceLevels.IsRoundingSalesPriceUp != null) { bool IsRoundingSalesPriceUp17364 = (bool)PreferencesRet.SalesAndCustomersPreferences.PriceLevels.IsRoundingSalesPriceUp.GetValue(); } } if (PreferencesRet.SalesTaxPreferences != null) { //Get value of ListID if (PreferencesRet.SalesTaxPreferences.DefaultItemSalesTaxRef.ListID != null) { string ListID17365 = (string)PreferencesRet.SalesTaxPreferences.DefaultItemSalesTaxRef.ListID.GetValue(); } //Get value of FullName if (PreferencesRet.SalesTaxPreferences.DefaultItemSalesTaxRef.FullName != null) { string FullName17366 = (string)PreferencesRet.SalesTaxPreferences.DefaultItemSalesTaxRef.FullName.GetValue(); } //Get value of PaySalesTax ENPaySalesTax PaySalesTax17367 = (ENPaySalesTax)PreferencesRet.SalesTaxPreferences.PaySalesTax.GetValue(); //Get value of ListID if (PreferencesRet.SalesTaxPreferences.DefaultTaxableSalesTaxCodeRef.ListID != null) { string ListID17368 = (string)PreferencesRet.SalesTaxPreferences.DefaultTaxableSalesTaxCodeRef.ListID.GetValue(); } //Get value of FullName if (PreferencesRet.SalesTaxPreferences.DefaultTaxableSalesTaxCodeRef.FullName != null) { string FullName17369 = (string)PreferencesRet.SalesTaxPreferences.DefaultTaxableSalesTaxCodeRef.FullName.GetValue(); } //Get value of ListID if (PreferencesRet.SalesTaxPreferences.DefaultNonTaxableSalesTaxCodeRef.ListID != null) { string ListID17370 = (string)PreferencesRet.SalesTaxPreferences.DefaultNonTaxableSalesTaxCodeRef.ListID.GetValue(); } //Get value of FullName if (PreferencesRet.SalesTaxPreferences.DefaultNonTaxableSalesTaxCodeRef.FullName != null) { string FullName17371 = (string)PreferencesRet.SalesTaxPreferences.DefaultNonTaxableSalesTaxCodeRef.FullName.GetValue(); } //Get value of IsUsingVendorTaxCode if (PreferencesRet.SalesTaxPreferences.IsUsingVendorTaxCode != null) { bool IsUsingVendorTaxCode17372 = (bool)PreferencesRet.SalesTaxPreferences.IsUsingVendorTaxCode.GetValue(); } //Get value of IsUsingCustomerTaxCode if (PreferencesRet.SalesTaxPreferences.IsUsingCustomerTaxCode != null) { bool IsUsingCustomerTaxCode17373 = (bool)PreferencesRet.SalesTaxPreferences.IsUsingCustomerTaxCode.GetValue(); } //Get value of IsUsingAmountsIncludeTax if (PreferencesRet.SalesTaxPreferences.IsUsingAmountsIncludeTax != null) { bool IsUsingAmountsIncludeTax17374 = (bool)PreferencesRet.SalesTaxPreferences.IsUsingAmountsIncludeTax.GetValue(); } } if (PreferencesRet.TimeTrackingPreferences != null) { //Get value of FirstDayOfWeek ENFirstDayOfWeek FirstDayOfWeek17375 = (ENFirstDayOfWeek)PreferencesRet.TimeTrackingPreferences.FirstDayOfWeek.GetValue(); } //Get value of IsAutomaticLoginAllowed bool IsAutomaticLoginAllowed17376 = (bool)PreferencesRet.CurrentAppAccessRights.IsAutomaticLoginAllowed.GetValue(); //Get value of AutomaticLoginUserName if (PreferencesRet.CurrentAppAccessRights.AutomaticLoginUserName != null) { string AutomaticLoginUserName17377 = (string)PreferencesRet.CurrentAppAccessRights.AutomaticLoginUserName.GetValue(); } //Get value of IsPersonalDataAccessAllowed bool IsPersonalDataAccessAllowed17378 = (bool)PreferencesRet.CurrentAppAccessRights.IsPersonalDataAccessAllowed.GetValue(); if (PreferencesRet.ItemsAndInventoryPreferences != null) { //Get value of EnhancedInventoryReceivingEnabled if (PreferencesRet.ItemsAndInventoryPreferences.EnhancedInventoryReceivingEnabled != null) { bool EnhancedInventoryReceivingEnabled17379 = (bool)PreferencesRet.ItemsAndInventoryPreferences.EnhancedInventoryReceivingEnabled.GetValue(); } //Get value of IsTrackingSerialOrLotNumber if (PreferencesRet.ItemsAndInventoryPreferences.IsTrackingSerialOrLotNumber != null) { ENIsTrackingSerialOrLotNumber IsTrackingSerialOrLotNumber17380 = (ENIsTrackingSerialOrLotNumber)PreferencesRet.ItemsAndInventoryPreferences.IsTrackingSerialOrLotNumber.GetValue(); } //Get value of IsInventoryExpirationDateEnabled if (PreferencesRet.ItemsAndInventoryPreferences.IsInventoryExpirationDateEnabled != null) { bool IsInventoryExpDateEnabled = (bool)PreferencesRet.ItemsAndInventoryPreferences.IsInventoryExpirationDateEnabled.GetValue(); } //Get value of isTrackingOnSalesTransactionsEnabled if (PreferencesRet.ItemsAndInventoryPreferences.isTrackingOnSalesTransactionsEnabled != null) { bool isTrackingOnSalesTransactionsEnabled17381 = (bool)PreferencesRet.ItemsAndInventoryPreferences.isTrackingOnSalesTransactionsEnabled.GetValue(); } //Get value of isTrackingOnPurchaseTransactionsEnabled if (PreferencesRet.ItemsAndInventoryPreferences.isTrackingOnPurchaseTransactionsEnabled != null) { bool isTrackingOnPurchaseTransactionsEnabled17382 = (bool)PreferencesRet.ItemsAndInventoryPreferences.isTrackingOnPurchaseTransactionsEnabled.GetValue(); } //Get value of isTrackingOnInventoryAdjustmentEnabled if (PreferencesRet.ItemsAndInventoryPreferences.isTrackingOnInventoryAdjustmentEnabled != null) { bool isTrackingOnInventoryAdjustmentEnabled17383 = (bool)PreferencesRet.ItemsAndInventoryPreferences.isTrackingOnInventoryAdjustmentEnabled.GetValue(); } //Get value of isTrackingOnBuildAssemblyEnabled if (PreferencesRet.ItemsAndInventoryPreferences.isTrackingOnBuildAssemblyEnabled != null) { bool isTrackingOnBuildAssemblyEnabled17384 = (bool)PreferencesRet.ItemsAndInventoryPreferences.isTrackingOnBuildAssemblyEnabled.GetValue(); } //Get value of FIFOEnabled if (PreferencesRet.ItemsAndInventoryPreferences.FIFOEnabled != null) { bool FIFOEnabled17385 = (bool)PreferencesRet.ItemsAndInventoryPreferences.FIFOEnabled.GetValue(); } //Get value of FIFOEffectiveDate if (PreferencesRet.ItemsAndInventoryPreferences.FIFOEffectiveDate != null) { DateTime FIFOEffectiveDate17386 = (DateTime)PreferencesRet.ItemsAndInventoryPreferences.FIFOEffectiveDate.GetValue(); } //Get value of IsRSBEnabled if (PreferencesRet.ItemsAndInventoryPreferences.IsRSBEnabled != null) { bool IsRSBEnabled17387 = (bool)PreferencesRet.ItemsAndInventoryPreferences.IsRSBEnabled.GetValue(); } //Get value of IsBarcodeEnabled if (PreferencesRet.ItemsAndInventoryPreferences.IsBarcodeEnabled != null) { bool IsBarcodeEnabled17388 = (bool)PreferencesRet.ItemsAndInventoryPreferences.IsBarcodeEnabled.GetValue(); } } } } } |