project QadFinancials > class BDebtor > API query SelectDebtor (optimised)

Description

SelectDebtor;
Update the performance on select-query on the main-table.
The silly condition on the main-table of the select query is there for performance-reasons; please do not remove it.


query filter (table tFilter)


tcBusinessFieldNametcDataTypetcOperator
iiCompanyIdi
tAddress.AddressCityc=,>=,>,<>,<=,<,begins,can-do,matches
tAddress.AddressCountyc=,>=,>,<>,<=,<,begins,can-do,matches
tAddress.AddressIsTaxablel=,<>
tAddress.AddressIsTaxIncludedl=,<>
tAddress.AddressNamec=,>=,>,<>,<=,<,begins,can-do,matches
tAddress.AddressStreet1c=,>=,>,<>,<=,<,begins,can-do,matches
tAddress.AddressStreet2c=,>=,>,<>,<=,<,begins,can-do,matches
tAddress.AddressStreet3c=,>=,>,<>,<=,<,begins,can-do,matches
tAddress.AddressTaxDeclarationi=,>=,>,<>,<=,<
tAddress.AddressTaxIDFederalc=,>=,>,<>,<=,<,begins,can-do,matches
tAddress.AddressTaxIDMisc1c=,>=,>,<>,<=,<,begins,can-do,matches
tAddress.AddressTaxIDMisc2c=,>=,>,<>,<=,<,begins,can-do,matches
tAddress.AddressTaxIDMisc3c=,>=,>,<>,<=,<,begins,can-do,matches
tAddressType.AddressTypeCodec=,>=,>,<>,<=,<,begins,can-do,matches
tAddress.AddressZipc=,>=,>,<>,<=,<,begins,can-do,matches
tBillSchedule.BillScheduleCodec=,>=,>,<>,<=,<,begins,can-do,matches
tBusinessRelation.BusinessRelationCodec=,>=,>,<>,<=,<,begins,can-do,matches
tBusinessRelation.BusinessRelationIsIntercol=,<>
tBusinessRelation.BusinessRelationName1c=,>=,>,<>,<=,<,begins,can-do,matches
tBusinessRelation.BusinessRelationName2c=,>=,>,<>,<=,<,begins,can-do,matches
tBusinessRelation.BusinessRelationSearchNamec=,>=,>,<>,<=,<,begins,can-do,matches
tCorporateGroup.CorporateGroupCodec=,>=,>,<>,<=,<,begins,can-do,matches
tCountry.CountryCodec=,>=,>,<>,<=,<,begins,can-do,matches
tCountry.CountryDescriptionc=,>=,>,<>,<=,<,begins,can-do,matches
tCounty.CountyCodec=,>=,>,<>,<=,<,begins,can-do,matches
tCurrency.CurrencyCodec=,>=,>,<>,<=,<,begins,can-do,matches
tDebtor.DebtorCodec=,>=,>,<>,<=,<,begins,can-do,matches
tDebtor2.DebtorCodec=,>=,>,<>,<=,<,begins,can-do,matches
tDebtor.DebtorCommentNotec=,>=,>,<>,<=,<,begins,can-do,matches
tDebtorCreditRating.DebtorCreditRatingCodec=,>=,>,<>,<=,<,begins,can-do,matches
tDebtor.DebtorDBNumberc=,>=,>,<>,<=,<,begins,can-do,matches
tDebtor.DebtorFixedCredLimTCd=,>=,>,<>,<=,<
tDebtor.DebtorHighCreditd=,>=,>,<>,<=,<
tDebtor.DebtorHighCreditDatet=,>=,>,<>,<=,<
tDebtor.DebtorIsActivel=,<>
tDebtor.DebtorIsCheckAftDICredLiml=,<>
tDebtor.DebtorIsCheckAftSOCredLiml=,<>
tDebtor.DebtorIsCheckBefDICredLiml=,<>
tDebtor.DebtorIsCheckBefSOCredLiml=,<>
tDebtor.DebtorIsFinanceChargel=,<>
tDebtor.DebtorIsFixedCredLiml=,<>
tDebtor.DebtorIsInvoiceByAuthl=,<>
tDebtor.DebtorIsLockedCredLiml=,<>
tDebtor.DebtorIsMaxDaysDueCredLiml=,<>
tDebtor.DebtorIsOverruleDICredLiml=,<>
tDebtor.DebtorIsOverruleSOCredLiml=,<>
tDebtor.DebtorIsPrintReminderl=,<>
tDebtor.DebtorIsPrintStatementl=,<>
tDebtor.DebtorIsTaxablel=,<>
tDebtor.DebtorIsTaxInCityl=,<>
tDebtor.DebtorIsTaxIncludedl=,<>
tDebtor.DebtorIsToBeLockedCredLiml=,<>
tDebtor.DebtorIsTurnOverCredLiml=,<>
tDebtor.DebtorLastCreditReviewt=,>=,>,<>,<=,<
tDebtor.DebtorLastCreditUpdatet=,>=,>,<>,<=,<
tDebtor.DebtorLastFinChargeDatet=,>=,>,<>,<=,<
tDebtor.DebtorLastPaymentt=,>=,>,<>,<=,<
tDebtor.DebtorLastSalet=,>=,>,<>,<=,<
tDebtor.DebtorMaxNumDaysCredLimi=,>=,>,<>,<=,<
tDebtor.DebtorPercTurnOverCredLimd=,>=,>,<>,<=,<
tDebtor.DebtorPercWarningCredLimd=,>=,>,<>,<=,<
tDebtor.DebtorSalesOrderBalanced=,>=,>,<>,<=,<
tDebtor.DebtorStatementCyclec=,>=,>,<>,<=,<,begins,can-do,matches
tDebtor.DebtorTaxDeclarationi=,>=,>,<>,<=,<
tDebtor.DebtorTaxIDFederalc=,>=,>,<>,<=,<,begins,can-do,matches
tDebtor.DebtorTaxIDMisc1c=,>=,>,<>,<=,<,begins,can-do,matches
tDebtor.DebtorTaxIDMisc2c=,>=,>,<>,<=,<,begins,can-do,matches
tDebtor.DebtorTaxIDMisc3c=,>=,>,<>,<=,<,begins,can-do,matches
tDebtor.DebtorTaxIDStatec=,>=,>,<>,<=,<,begins,can-do,matches
tDebtor.DebtorTotalDaysLatei=,>=,>,<>,<=,<
tDebtor.DebtorTotalNbrOfInvoicesi=,>=,>,<>,<=,<
tDebtorType.DebtorTypeCodec=,>=,>,<>,<=,<,begins,can-do,matches
tDebtor.DomiciliationNumberi=,>=,>,<>,<=,<
tPaymentCondition.PaymentConditionCodec=,>=,>,<>,<=,<,begins,can-do,matches
tPaymentGroup.PaymentGroupCodec=,>=,>,<>,<=,<,begins,can-do,matches
tProfile5.ProfileCodec=,>=,>,<>,<=,<,begins,can-do,matches
tProfile3.ProfileCodec=,>=,>,<>,<=,<,begins,can-do,matches
tProfile1.ProfileCodec=,>=,>,<>,<=,<,begins,can-do,matches
tProfile2.ProfileCodec=,>=,>,<>,<=,<,begins,can-do,matches
tProfile4.ProfileCodec=,>=,>,<>,<=,<,begins,can-do,matches
tReason.ReasonCodec=,>=,>,<>,<=,<,begins,can-do,matches
tState.StateCodec=,>=,>,<>,<=,<,begins,can-do,matches
tDebtor.TxclTaxClsc=,>=,>,<>,<=,<,begins,can-do,matches
tDebtor.TxuTaxUsagec=,>=,>,<>,<=,<,begins,can-do,matches
tDebtor.TxzTaxZonec=,>=,>,<>,<=,<,begins,can-do,matches


Parameters (internal)


iiCompanyIdintegerCompany id


query condition


  each Debtor where
Debtor.SharedSet_Id = vi_DEBTOR_sharedset(iiCompanyId) AND

      first BillSchedule (conditional-join) where
BillSchedule.BillSchedule_ID = Debtor.BillSchedule_ID AND

      first BusinessRelation (inner-join) where
BusinessRelation.BusinessRelation_ID = Debtor.BusinessRelation_ID AND

          each Address (inner-join) where
Address.BusinessRelation_ID = BusinessRelation.BusinessRelation_ID AND

              first AddressType (inner-join) where
AddressType.AddressType_ID = Address.AddressType_ID AND
AddressType.AddressTypeCode = 'HEADOFFICE'

              first Country (inner-join) where
Country.Country_ID = Address.Country_ID AND

              first County (conditional-join) where
County.County_ID = Address.County_ID AND

              first State (outer-join) where
State.State_ID = Address.State_ID AND

          first CorporateGroup (conditional-join) where
CorporateGroup.CorporateGroup_ID = BusinessRelation.CorporateGroup_ID AND

      first Currency (inner-join) where
Currency.Currency_ID = Debtor.Currency_ID AND

      first Debtor2 (conditional-join) where
Debtor2.SharedSet_Id = vi_DEBTOR_sharedset(iiCompanyId) AND
Debtor2.Debtor_ID = Debtor.BillToDebtor_ID AND

      first DebtorCreditRating (conditional-join) where
DebtorCreditRating.DebtorCreditRating_ID = Debtor.DebtorCreditRating_ID AND

      first DebtorType (conditional-join) where
DebtorType.DebtorType_ID = Debtor.DebtorType_ID AND

      first PaymentCondition (inner-join) where
PaymentCondition.PaymentCondition_ID = Debtor.NormalPaymentCondition_ID AND

      first PaymentGroup (conditional-join) where
PaymentGroup.PaymentGroup_ID = Debtor.PaymentGroup_ID AND

      first Profile2 (inner-join) where
Profile2.Profile_ID = Debtor.CnControlGLProfile_ID AND

      first Profile3 (inner-join) where
Profile3.Profile_ID = Debtor.InvControlGLProfile_ID AND

      first Profile4 (inner-join) where
Profile4.Profile_ID = Debtor.SalesAccountGLProfile_ID AND

      first Profile5 (conditional-join) where
Profile5.Profile_ID = Debtor.DivisionProfile_ID AND

      first Profile1 (conditional-join) where
Profile1.Profile_ID = Debtor.DeductionCtrlGLProfile_ID AND

      first Reason (inner-join) where
Reason.Reason_ID = Debtor.Reason_ID AND


query sort order


Debtor.SharedSet_ID (ascending)
Debtor.DebtorIsActive (ascending)
Debtor.DebtorCode (ascending)


query resultset tqSelectDebtor


field namedata typedb fielddescription
tcAddressCountycharacterAddress.AddressCountyObsolete field
tlAddressIsTaxablelogicalAddress.AddressIsTaxableTaxable Address. This field indicates if business activities for this address are normally subject to tax.
The taxable status of the address defaults to transactions where the address is used.
api annotation:PartialUpdate = yes - defaults to false.
tlAddressIsTaxIncludedlogicalAddress.AddressIsTaxIncludedTax Is Included. This field indicates if line item prices for this address normally include tax.
The value of Tax Is Included defaults to the header of transactions created for this address.
api annotation:PartialUpdate = yes - defaults to false.
tcAddressNamecharacterAddress.AddressNameName. The full name of this particular address.
The name of a headoffice address is the same as the name of the business relationship and can not be modified.
api annotation:PartialUpdate = yes - defaults to the name of the businessRelation.
tcAddressStreet3characterAddress.AddressStreet3Address.Line three of address details.
This field can be blank.
tiAddressTaxDeclarationintegerAddress.AddressTaxDeclarationThis field is mandatory.
tcAddressTaxIDFederalcharacterAddress.AddressTaxIDFederalFederal Tax. The value of this filed is the tax ID assigned to this address by the federal or national government.
If Tax Report is true, the Federal tax ID must be unique; otherwise, related business relations can share an ID.
tcAddressTaxIDMisc1characterAddress.AddressTaxIDMisc1Miscellaneous Tax 1.This field is for reference and documentation purposes, its value can be any other tax identification numbers that are useful.
This field can be blank.
tcAddressTaxIDMisc2characterAddress.AddressTaxIDMisc2Miscellaneous Tax 2.This field is for reference and documentation purposes, its value can be any other tax identification numbers that are useful.
This field can be blank.
tcAddressTaxIDMisc3characterAddress.AddressTaxIDMisc3Miscellaneous Tax 3.This field is for reference and documentation purposes, its value can be any other tax identification numbers that are useful.
This field can be blank.
tcAddressTypeCodecharacterAddressType.AddressTypeCodeAddress Type
tiBillSchedule_ID1integerBillSchedule.BillSchedule_IDRecord ID
tcBillScheduleCodecharacterBillSchedule.BillScheduleCodeBilling Schedule Code
tcBillToDebtorCodecharacterDebtor2.DebtorCodeA code (maximum eight characters) that identifies a customer. If the code you specify matches an existing supplier code, a warning message displays. You can choose to ignore the warning, and create the record. However, when a supplier and customer share the same code, they must reference the same business relation.
api annotation:If you leave the Customer Code field blank, the system automatically generates a number for the record based on the sequence defined in Customer Autonumber Create.
tcCnControlGLProfileCodecharacterProfile2.ProfileCodeA code (maximum 20 characters) that identifies a profile.
tcCorporateGroupCodecharacterCorporateGroup.CorporateGroupCodeGroup Name
tiCountry_IDintegerCountry.Country_IDRecord ID
tcCountryCodecharacterCountry.CountryCodeCountry Code
tcCountryDescriptioncharacterCountry.CountryDescriptionDescription
tcCountyCodecharacterCounty.CountyCodeCounty Code
tcCurrencyCodecharacterCurrency.CurrencyCodeCurrency Code
tcDebtorCommentNotecharacterDebtor.DebtorCommentNoteFree-form text related to this customer that is saved with the customer record.
api annotation:Value for this field defaults to null.
tcDebtorCreditRatingCodecharacterDebtorCreditRating.DebtorCreditRatingCodeA code (maximum eight characters) that identifies a customer credit rating.
tcDebtorDBNumbercharacterDebtor.DebtorDBNumberThe credit agency reference number assigned to this customer.
api annotation:Value for this field defaults to null.
tdDebtorFixedCredLimTCdecimalDebtor.DebtorFixedCredLimTCWhen Apply Fixed Ceiling is selected, specify the currency amount that determines the maximum credit extended to this customer.
api annotation:Value for this field defaults to 0.0000 .
tdDebtorHighCreditdecimalDebtor.DebtorHighCreditThe highest amount of credit you have ever extended to this customer. This is the largest AR balance they have had open at one time.
ttDebtorHighCreditDatedateDebtor.DebtorHighCreditDateThe date the highest credit amount was extended to this customer.
tlDebtorIsCheckAftDICredLimlogicalDebtor.DebtorIsCheckAftDICredLimIndicate whether to perform the credit check when saving a new or modified invoice and include the new invoice amount in the total.
api annotation:Value for this field defaults to false.
tlDebtorIsCheckAftSOCredLimlogicalDebtor.DebtorIsCheckAftSOCredLimIndicate whether to perform the credit check when saving a new or modified order and include the new order amount in the total.
api annotation:Value for this field defaults to false.
tlDebtorIsCheckBefDICredLimlogicalDebtor.DebtorIsCheckBefDICredLimIndicate whether to perform the credit check before a new customer invoice is entered.
api annotation:Value for this field defaults to false.
tlDebtorIsCheckBefSOCredLimlogicalDebtor.DebtorIsCheckBefSOCredLimIndicate whether to perform the credit check before a new order is entered or not.
api annotation:Value for this field defaults to false.
tlDebtorIsFinanceChargelogicalDebtor.DebtorIsFinanceChargeIndicate whether to make this customer’s accounts liable for finance charges or not.
api annotation:Value for this field defaults to false.
tlDebtorIsFixedCredLimlogicalDebtor.DebtorIsFixedCredLimIndicate if the credit limit of the customer is fixed.
api annotation:Value for this field defaults to false.
tlDebtorIsInvoiceByAuthlogicalDebtor.DebtorIsInvoiceByAuthIndicate how invoice totals should be calculated and displayed for this customer.
api annotation:Value for this field defaults to false.
tlDebtorIsLockedCredLimlogicalDebtor.DebtorIsLockedCredLimIndicate whether to put this customer on hold.
api annotation:Value for this field defaults to false.
tlDebtorIsMaxDaysDueCredLimlogicalDebtor.DebtorIsMaxDaysDueCredLimIndicate whether you can enter a value in the Maximum Number of Days field or not.
api annotation:Value for this field defaults to false.
tlDebtorIsOverruleDICredLimlogicalDebtor.DebtorIsOverruleDICredLimIndicate whether to allow users to enter invoice transactions for a customer when the customer’s credit limit is exceeded.
api annotation:Value for this field defaults to false.
tlDebtorIsOverruleSOCredLimlogicalDebtor.DebtorIsOverruleSOCredLimIndicate whether to allow users to enter order transactions for a customer when the customer’s credit limit is exceeded.
api annotation:Value for this field defaults to false.
tlDebtorIsTaxablelogicalDebtor.DebtorIsTaxableIndicate if business activities for this address are normally subject to tax.
api annotation:Value for the field defaults from the Taxable field in Global Tax Management Control.
tlDebtorIsTaxInCitylogicalDebtor.DebtorIsTaxInCityThis setting determines whether the address is in the city
limits for taxation purposes. It is used only with the Sales and Use Tax Interface for US and Canadian tax processing.
api annotation:Value for the field defaults from the business relation.
tlDebtorIsTaxIncludedlogicalDebtor.DebtorIsTaxIncludedTax Is Included
tlDebtorIsToBeLockedCredLimlogicalDebtor.DebtorIsToBeLockedCredLimIndicate if the system puts the customer on credit hold if any of the credit limits are violated when new orders for this customer are created or not.
api annotation:Value for this field defaults to false.
tlDebtorIsTurnOverCredLimlogicalDebtor.DebtorIsTurnOverCredLimIndicate whether you can enter a percentage in the Percentage of Turnover field.
api annotation:Value for this field defaults to false.
ttDebtorLastCreditReviewdateDebtor.DebtorLastCreditReviewThe date when the customer’s credit status was last reviewed.
ttDebtorLastCreditUpdatedateDebtor.DebtorLastCreditUpdateThe date when the customer’s credit status was last updated.
ttDebtorLastFinChargeDatedateDebtor.DebtorLastFinChargeDateThe date when finance charge is last calculated for this customer.
api annotation:Value for this field defaults to null.
ttDebtorLastPaymentdateDebtor.DebtorLastPaymentLast payment date.
api annotation:The system automatically updates this date when transactions are posted in Banking Entry, Petty Cash, and Customer Payments.
ttDebtorLastSaledateDebtor.DebtorLastSaleThe date an invoice was last posted for this customer.
api annotation:This date is updated by Invoice Post and Print.
tiDebtorMaxNumDaysCredLimintegerDebtor.DebtorMaxNumDaysCredLimSpecify the number of days that any invoice for this customer can be overdue before the system disallows any further credit.
api annotation:Value for this field defaults to 0.
tdDebtorPercTurnOverCredLimdecimalDebtor.DebtorPercTurnOverCredLimWhen Apply % of Turnover is selected,specify a percentage value. The system applies this percentage to the last year turnover and displays the result in the Credit on Turnover field. The amount is recalculated when you change the percentage.
api annotation:Value for this field defaults to 0.00 .
tdDebtorPercWarningCredLimdecimalDebtor.DebtorPercWarningCredLimSelect to generate a warning message when the specified percentage of the credit limit has been reached.
api annotation:Value for this field defaults to 0.00 .
tdDebtorSalesOrderBalancedecimalDebtor.DebtorSalesOrderBalanceCurrent balance of all sales order related to this customer.
api annotation:Value for this field defaults to 0.0000 .
tcDebtorStatementCyclecharacterDebtor.DebtorStatementCycleA value to indicate how often you normally print AR statements for this customer.
api annotation:Value for this field defaults to null.
tiDebtorTaxDeclarationintegerDebtor.DebtorTaxDeclarationTax Declaration
tcDebtorTaxIDFederalcharacterDebtor.DebtorTaxIDFederalFederal Tax- the tax ID assigned to this address by the federal or national government.
api annotation:Value for the field defaults to null.
tcDebtorTaxIDMisc1characterDebtor.DebtorTaxIDMisc1Miscellaneous tax 1, 2, 3. For reference and documentation purposes, enter any other tax identification numbers that are useful.
api annotation:Values for these fields default to null.
tcDebtorTaxIDMisc2characterDebtor.DebtorTaxIDMisc2Miscellaneous Tax 2
tcDebtorTaxIDMisc3characterDebtor.DebtorTaxIDMisc3Miscellaneous Tax 3
tcDebtorTaxIDStatecharacterDebtor.DebtorTaxIDStateState Tax- For reference and documentation purposes, enter either a state or provincial tax identification number or a VAT registration number.
api annotation:Value for the field defaults to null.
tiDebtorTotalDaysLateintegerDebtor.DebtorTotalDaysLateTotal Days Late
tiDebtorTotalNbrOfInvoicesintegerDebtor.DebtorTotalNbrOfInvoicesNumber of paid invoices related to this customer.
tcDebtorTypeCodecharacterDebtorType.DebtorTypeCodeA code (maximum four characters) that identifies a customer type.
tiDeductionCtrlGLProfile_IDintegerDebtor.DeductionCtrlGLProfile_IDLink to Deduction Profile
tcDeductionCtrlProfileCodecharacterProfile1.ProfileCodeA code (maximum 20 characters) that identifies a profile.
tcDivisionProfileCodecharacterProfile5.ProfileCodeA code (maximum 20 characters) that identifies a profile.
tiDomiciliationNumberintegerDebtor.DomiciliationNumberDomiciliation Number
tcInvControlGLProfileCodecharacterProfile3.ProfileCodeA code (maximum 20 characters) that identifies a profile.
tcNormalPaymentConditionCodecharacterPaymentCondition.PaymentConditionCodeCredit Terms Code
tcPaymentGroupCodecharacterPaymentGroup.PaymentGroupCodePayment Group
tcReasonCodecharacterReason.ReasonCodeInvoice Status Code
tcSalesAccountGLProfileCodecharacterProfile4.ProfileCodeA code (maximum 20 characters) that identifies a profile.
tcStateCodecharacterState.StateCodeState
tcTxclTaxClscharacterDebtor.TxclTaxClsA tax class previously defined in Tax Class Maintenance. Tax classes group addresses taxed at specific rates or that are tax-exempt and help determine the default tax environment (set of tax types) for related transactions.
api annotation:The value of tax class defaults from the header of transactions created for this address.
tcTxuTaxUsagecharacterDebtor.TxuTaxUsageA tax usage code previously defined in Tax Usage Maintenance. Tax usage codes identify the normal use of items sold to this address.Common tax usages are retail, manufacturing, and industrialization.
api annotation:The value of tax usage defaults from the header of transactions created for this address.
tcTxzTaxZonecharacterDebtor.TxzTaxZoneThe tax zone for this address, defined in Tax Zone Maintenance. A value is required.
api annotation:The system searches for a default based on the country, state or province, county, city, and postal code of the current address.
tlBusinessRelationIsIntercologicalBusinessRelation.BusinessRelationIsIntercoIntercompany. This field Indicates if the business relation identifies an entity that is a member of a group of entities that trade with each other.
If the business relation is identified as an internal entity,this field is true and cannot be changed.
api annotation:PartialUpdate = yes - defaults to false.
tiBLWIGroup_IDintegerDebtor.BLWIGroup_IDBLWI Group Code
tiCnControlGLProfile_IDintegerDebtor.CnControlGLProfile_IDControl GL Profile (Credit Note)
tiCurrency_IDintegerDebtor.Currency_IDCurrency Code
tlDebtorIsPrintReminderlogicalDebtor.DebtorIsPrintReminderIndicate if reminders are typically printed for this customer to report past due balances.
api annotation:Value for this field defaults to false.
tlDebtorIsPrintStatementlogicalDebtor.DebtorIsPrintStatementIndicate if statements should be printed for this customer. When this field is selected, a statement is printed for this customer using the frequency specified in Statement Cycle.
api annotation:Value for this field defaults to false.
tiDivisionProfile_IDintegerDebtor.DivisionProfile_IDSub-Account Profile
tiInvControlGLProfile_IDintegerDebtor.InvControlGLProfile_IDControl GL Profile (Invoice)
tiNormalPaymentCondition_IDintegerDebtor.NormalPaymentCondition_IDCredit Terms Code
tiReason_IDintegerDebtor.Reason_IDInvoice Status Code
tcDebtorCodecharacterDebtor.DebtorCodeA code (maximum eight characters) that identifies a customer. If the code you specify matches an existing supplier code, a warning message displays. You can choose to ignore the warning, and create the record. However, when a supplier and customer share the same code, they must reference the same business relation.
api annotation:If you leave the Customer Code field blank, the system automatically generates a number for the record based on the sequence defined in Customer Autonumber Create.
tcBusinessRelationCodecharacterBusinessRelation.BusinessRelationCodeBusiness Relation. A code to identify the business relation.
If this field does not have a input from the user, the system automatically generates a number for the record based on the sequence defined in Business Relation Autonumber Create.
tcBusinessRelationName1characterBusinessRelation.BusinessRelationName1Name: The full name of the business relation.
This field sets the default name for linked addresses such as customers and suppliers.
api annotation:PartialUpdate = yes - defaults to the BusinessRelationCode.
tcBusinessRelationName2characterBusinessRelation.BusinessRelationName2Second Name. An extended name when the Name field is not large enough to contain all information.
This fielsd can be blank.
tcBusinessRelationSearchNamecharacterBusinessRelation.BusinessRelationSearchNameSearch Name: An alternate name for finding the business relation. This field can be useful for sorting and filtering.
api annotation:PartialUpdate = yes - defaults to the BusinessRelationCode.
tlDebtorIsActivelogicalDebtor.DebtorIsActiveIndicate if this is an active record.
api annotation:Value for this field defaults to false.
tcAddressStreet2characterAddress.AddressStreet2Address.Line two of address details.
This field can be blank.
tcAddressStreet1characterAddress.AddressStreet1Address: Line one of address details.
This field can be blank.
tcAddressZipcharacterAddress.AddressZipZip. The postal code or US zip code associated with this address.
This field is used to decide the tax zone for the address.
This field can be blank.
tcAddressCitycharacterAddress.AddressCityCity. The city for this address. This field can be used to decide the tax zone of the address.
tiDebtor_IDintegerDebtor.Debtor_IDRecord ID
tiSharedSet_IDintegerDebtor.SharedSet_IDLink to SharedSet
tiBusinessRelation_IDintegerDebtor.BusinessRelation_IDBusiness Relation
DebtorCustomcharactercalculatedcustom fields
BillScheduleCustomcharactercalculatedcustom fields
Profile1Customcharactercalculatedcustom fields
BusinessRelationCustomcharactercalculatedcustom fields
AddressCustomcharactercalculatedcustom fields
AddressTypeCustomcharactercalculatedcustom fields
CountryCustomcharactercalculatedcustom fields
CountyCustomcharactercalculatedcustom fields
StateCustomcharactercalculatedcustom fields
CorporateGroupCustomcharactercalculatedcustom fields
CurrencyCustomcharactercalculatedcustom fields
Debtor2Customcharactercalculatedcustom fields
DebtorCreditRatingCustomcharactercalculatedcustom fields
DebtorTypeCustomcharactercalculatedcustom fields
PaymentConditionCustomcharactercalculatedcustom fields
PaymentGroupCustomcharactercalculatedcustom fields
Profile2Customcharactercalculatedcustom fields
Profile3Customcharactercalculatedcustom fields
Profile4Customcharactercalculatedcustom fields
Profile5Customcharactercalculatedcustom fields
ReasonCustomcharactercalculatedcustom fields
ti_sequenceintegercalculatedprimary index
tc_rowidcharactercalculated = rowid(Debtor),rowid(BillSchedule),rowid(BusinessRelation),rowid(Address),rowid(AddressType),rowid(Country),rowid(County),rowid(State),rowid(CorporateGroup),rowid(Currency),rowid(Debtor2),rowid(DebtorCreditRating),rowid(DebtorType),rowid(PaymentCondition),rowid(PaymentGroup),rowid(Profile2),rowid(Profile3),rowid(Profile4),rowid(Profile5),rowid(Profile1),rowid(Reason)


Internal usage


QadFinancials
lookup query on tDebtor.DebtorCode
lookup query on tBill.tcDebtorCode
lookup query on tDDocument.tcDebtorCode
lookup query on tDebtor.tcBillToDebtorCode
lookup query on tDebtorEndUser.tcDebtorCode
lookup query on tDebtorShipTo.tcDebtorCode
lookup query on tDInvoice.tcDebtorCode
lookup query on tDInvoice.tcSoldToDebtorCode
lookup query on tProject.tcDebtorCode


Sample code: how to call this query through RPCRequestService (QXtend Inbound)

define temp-table ttContext no-undo
    field propertyQualifier as character
    field propertyName as character
    field propertyValue as character
    index entityContext is primary unique
        propertyQualifier
        propertyName
    index propertyQualifier
        propertyQualifier.

define dataset dsContext for ttContext.

define variable vhContextDS as handle no-undo.
define variable vhExceptionDS as handle no-undo.
define variable vhServer as handle no-undo.
define variable vhInputDS as handle no-undo.
define variable vhInputOutputDS as handle no-undo.
define variable vhOutputDS as handle no-undo.
define variable vhParameter as handle no-undo.

/* Create context */
create ttContext.
assign ttContext.propertyName = "programName"
       ttContext.propertyValue = "BDebtor".
create ttContext.
assign ttContext.propertyName = "methodName"
       ttContext.propertyValue = "SelectDebtor".
create ttContext.
assign ttContext.propertyName = "applicationId"
       ttContext.propertyValue = "fin".
create ttContext.
assign ttContext.propertyName = "entity"
       ttContext.propertyValue = "1000".
create ttContext.
assign ttContext.propertyName = "userName"
       ttContext.propertyValue = "mfg".
create ttContext.
assign ttContext.propertyName = "password"
       ttContext.propertyValue = "".

/* Create input dataset */
create dataset vhInputDS.
vhInputDS:read-xmlschema("file", "xml/bdebtor.selectdebtor.i.xsd", ?).
vhParameter = vhInputDS:get-buffer-handle("tParameterI").
vhParameter:buffer-create().

assign vhParameter::icRange = "A"
       vhParameter::icRowid = ""
       vhParameter::iiRownum = 0
       vhParameter::iiNumber = 5 /* Number of records to read */
       vhParameter::icSortColumns = ""
       vhParameter::ilCountOnly = false
       vhParameter::ilForwardRead = true
       vhParameter::iiMaximumBrowseRecordsToCount = 0.

vhParameter = vhInputDS:get-buffer-handle("tFilter").
vhParameter:buffer-create().

assign vhParameter::<field-name-1> = <field-value-1>
       vhParameter::<field-name-2> = <field-value-2>
       ...

/* Connect the AppServer */
create server vhServer.
vhServer:connect("-URL <appserver-url>").

if not vhServer:connected()
then do:
    message "Could not connect AppServer" view-as alert-box error title "Error".
    return.
end.

/* Run */
assign vhContextDS = dataset dsContext:handle.

run program/rpcrequestservice.p on vhServer
    (input-output dataset-handle vhContextDS by-reference,
           output dataset-handle vhExceptionDS,
     input        dataset-handle vhInputDS by-reference,
     input-output dataset-handle vhInputOutputDS by-reference,
           output dataset-handle vhOutputDS).

/* Handle output however you want, in this example, we dump it to xml */
if valid-handle(vhExceptionDS)
then vhExceptionDS:write-xml("file", "Exceptions.xml", true).

if valid-handle(vhOutputDS)
then vhOutputDS:write-xml("file", "Output.xml", true).

/* Cleanup */
vhServer:disconnect().
assign vhServer = ?.

if valid-handle(vhInputDS)
then delete object vhInputDS.

if valid-handle(vhOutputDS)
then delete object vhOutputDS.

if valid-handle(vhExceptionDS)
then delete object vhExceptionDS.