AxdBase Class [AX 2012]
Combines queries, table objects (Ax <table> classes), and XML code to provide an XML framework for Microsoft Dynamics AX.
Syntax
class AxdBase implements AifServiceable
Run On
Server
Methods
Method | Description | |
---|---|---|
afterDeserializeEntity | Called for each record after is has been deserialized. | |
cancelTimeOut | Cancels a previous method call to the setTimeOut method. (Inherited from Object.) | |
checkInventDim | Validates the document class for the inventory dimension to be created as part of the current service invoked. | |
create | Creates the document in the XML string as a transaction in the database tables, and then returns the entity key of the created transaction. | |
createAxdBaseReadInstance | ||
createEntityKey | ||
createEntityKeyFieldList | ||
createList | Creates the documents in the XML string as transactions in the database, and then returns the entity keys of the created transactions. | |
createNewQuery | ||
defaultValidTimeState | ||
deleteList | ||
equal | Determines whether the specified object is equal to the current one. (Inherited from Object.) | |
expandDimensions | ||
expandSurrogateForeignKeys | ||
findCorrespondingAxBC | Finds the AxBC class that is used for the specified table in the document service. | |
findEntityKeyList | Finds entity keys that identify posted transactions in the database. | |
findList | Finds posted transactions from the database, and then writes them to an XML string. | |
getActionList | Gets a list of all possible actions for the particular Axd document. | |
getAdditionalMandatoryFieldsMap | ||
getChangedEntityKeyList | Retrieves all entity keys that pass the server-defined document filters. | |
getConstraintList | Identifies the constraint(s) from a particular record. | |
getCurrentDateTime | ||
getDataSourceCardinality | ||
getDataSourceFieldSet | Gets a set that contains the field names in a QueryBuildDataSource class. | |
getDataSourceNameForEntityKey | ||
getDimensionId | Translates the dimension value from the xml document into a dimension ID. | |
getDocumentTypeId | Microsoft internal use only. | |
getEnhancedSchema | Gets the enhanced XML Schema Document (XSD) of the Axd document. | |
getEntityKeyFieldList | Gets the fields that will be used in the entity key. | |
getEntityKeyList | Retrieves all entity keys that pass the server-defined document filters. | |
getEntityKeyListInternal | ||
getEntityKeyReplacementElementMap | ||
getEntityKeyReplacementElementValueMap | ||
getEntityKeySfkOptionalFieldsMap | This method is for internal use only.Gets the optional SFK fields map for the entity key. | |
getFieldAccessOverRides | ||
getKeyFields | ||
getLabel | Returns the label that corresponds to the localized document name. | |
getName | Returns a fixed string that contains the name of the document. | |
getNamespace | Returns a fixed string that contains the namespace of the document. | |
getQuery | Fetches the instance of the query that corresponds to the Axd document class. | |
getQueryName | Returns the name of the query that will be used. For example, the query that corresponds to the Axd document. | |
getQueryValueForCriteriaElement | ||
getSchema | Gets the XSD of the Axd document. | |
getSchemaInternal | ||
getSfkReplacementElement | ||
getSfkReplacementMap | ||
getSharedTypesSchema | ||
getSharedTypesSchemaXml | ||
getSurrogateForeignKeyValue | Translates the surrogate foreign key replacement value from the xml document into a surrogate foreign key value. | |
getTableIdForEntityKey | Gets the table ID that will be used in the entity key. | |
getTimeOutTimerHandle | Returns the timer handle for the object. (Inherited from Object.) | |
getValidTimeStateDateTime | ||
getValidTimeStateFieldType | ||
getXmlDataSourceNames | ||
handle | Retrieves the handle of the class of the object. (Inherited from Object.) | |
initEntityKeyMetadata | ||
initFieldAccessOverrides | ||
initMandatoryFieldsMap | Creates a list of mandatory fields that are specific to the document. The document must override this method to add mandatory fields that are not mandatory in the data model. | |
initNewQuery | ||
initQuery | ||
initQueryFromEntityKey | Instantiates the query associated with the Axd document and stores it in a variable on the AxdBase class. | |
initQueryFromQuery | Initializes the query associated with the document based on the criteria values supplied. | |
initQueryValidTimeState | Initialize the valid time state for the Axd query | |
initSecurityFlags | ||
isExpandableDimensionEDT | ||
isExpandableSurrogateForeignKey | ||
isFieldEditable | ||
isFieldVisible | Determines if a field is visible. | |
isFieldVisibleToUser | ||
isValidTimeStateDocument | ||
mergeFilters | ||
mergeRanges | ||
new | Initializes a new instance of the AxdBase class. | |
notify | Releases the hold on an object that has called the wait method on this object. (Inherited from Object.) | |
notifyAll | Releases a lock on the object that was issued by the wait method on this object. (Inherited from Object.) | |
objectOnServer | Determines whether the object is on a server. (Inherited from Object.) | |
overRideFieldAccess | ||
owner | Returns the instance that owns the object. (Inherited from Object.) | |
parmClearNilFieldsOnUpdate | Gets or sets the ClearNilFieldsOnUpdate parameter. | |
parmDocPurpose | Gets or sets the DocPurpose parameter. | |
parmSenderId | Gets or sets the SenderId parameter. | |
parmValidAsOfDateTime | Gets or sets the ValidAsOfDateTime parameter. | |
parmValidFromDateTime | Gets or sets the ValidFromDateTime parameter. | |
parmValidTimeStateType | Gets or sets the ValidTimeStateType parameter. | |
parmValidToDateTime | Gets or sets the ValidToDateTime parameter. | |
prepareForDelete | Prepares an AxBC class to be deleted. | |
prepareForDeleteExtended | Prepares an AxBC class to be deleted. | |
prepareForQuery | Prepares a query before executing the query. | |
prepareForSave | Prepares an AxBC class to be saved. | |
prepareForSaveExtended | Prepares an AxBC class to be saved. | |
prepareForUpdate | Prepares an AxBC class to be updated. | |
prepareForUpdateExtended | Prepares an AxBC class to be updated. | |
processingRecord | Called for each record processed during read and create. | |
read | Reads a posted transaction from the database and writes it to an XML string. | |
readList | Reads posted transactions from the database and writes them to an XML string. | |
security | Identifies whether security should be used in the Axd class. | |
setAifFaultContext | ||
setFieldAsMandatory | Updates the internal list of mandatory fields. | |
setParmMethodAsMandatory | Sets the field specified by a parm method as mandatory in the schema and XML. | |
setSharedTypesSchema | ||
setTableFieldAsMandatory | Specifies that the field should be mandatory in the schema and in the XML. | |
setTimeOut | Sets up the scheduled execution of a specified method. (Inherited from Object.) | |
skipSecurityChecks | ||
topRecordAction | ||
toString | Returns a string that represents the current object. (Inherited from Object.) | |
trimEntityKeyReplacementMap | ||
unpackPropertyBag | Unpacks the docPurpose property from an instance of the aifPropertyBag extended data type (if relevant for the particular Axd document). | |
update | ||
updateList | ||
updateNow | Makes document-specific updates when it processes an incoming document. | |
usageCount | Returns the current number of references, that is, the value of the reference counter, that the object has. (Inherited from Object.) | |
useNaturalEntityKey | ||
validateDocument | Validates that any business rules that govern the processing of the Axd document are complied with. | |
validateEntityKey | Validates whether an entity key that is passed to Axd framework is valid. | |
validateEntityKeyFieldAccess | ||
validateTableId | Validates that the table ID in a common object matches a specific table ID. | |
validateValidTimeState | ||
wait | Pauses a process. (Inherited from Object.) | |
xml | Returns an XML string that represents the current object. (Inherited from Object.) | |
::addInnerJoinedDS | ||
::addPrefix | ||
::fieldsInDataSourceSet | Returns a set with the fields in a data source if the dynamic property for the fields in the data source is set to No. | |
::flushCache | Flushes the cache. | |
::getAllowedDSForCriteria | ||
::getAllowedFieldsForDataSource | ||
::getAllowedTablesForDataSource | ||
::getDocumentClassIdList | Returns a list of class IDs that identify the document classes in Microsoft Dynamics AX. | |
::getTableFieldSet | Returns a Set that contains the field names in a table. | |
::getTableInheritanceChain | ||
::getTableInheritanceHierarchy | ||
::getValidTimeStateParmMethods | ||
::hasPrefix | ||
::isDataSourceInXsd | ||
::isDerivedTable | ||
::isValidReturnType | Indicates whether a type is a valid type for a field in an Axd document. | |
::mergeExistsJoinDataSources | ||
::newClassId | Instantiates a document class object. | |
::stripPrefix | Removes the Axd prefix from a name. |
Top
Remarks
The AxdBase class provides the framework that is used in the Microsoft Dynamics AX document (Axd) classes, and is not intended to be used alone. The AxdBase class implements the AifServiceable Interface.
Calculated fields and display fields must not be made mandatory (required elements in the XML) because it is not possible to ensure that these fields do not return null Nothing nullptr unit a null reference (Nothing in Visual Basic) values. The null Nothing nullptr unit a null reference (Nothing in Visual Basic) values are not transferred to XML.
The core methods of the Axd documents are as follows:
The core methods are implemented on the AxdBase class.
Axd classes are used by the Application Integration Framework (AIF) to generate XSDs, convert documents (transactions) to XML, and create documents (transactions) from XML. All Axd classes inherit from the AxdBase class.
When creating a new Axd class, the following methods must be overridden:
Implement document-specific business logic by overriding the following methods:
The following methods must be overridden for the method to throw an error if the specific Axd class does not provide the corresponding action type for the method:
Examples
The following list of examples shows the code for using the core methods on the AxdBase class. The topic of each method has a more complete example.
// How to generate XSDs.
axdPurchaseRequisition = AxdBase::newClassId(
classNum(AxdPurchaseRequisition));
aifDocumentSchemaXml = axdPurchaseRequisition.getSchema();
// How to read a single purchase requisition.
axdPurchaseRequisition = AxdBase::newClassId(
classNum(AxdPurchaseRequisition));
aifDocumentXml = axdPurchaseRequisition.read(
aifEntityKey,
aifSchemaInfo,
aifEndpointActionPolicyInfo,
aifConstraintList,
aifPropertyBag);
// How to read a list of purchase requisitions.
axdPurchaseRequisition = AxdBase::newClassId(
classNum(AxdPurchaseRequisition));
aifDocumentXml = axdPurchaseRequisition.readList(
aifEntityKeyList,
aifSchemaInfo,
aifEndpointActionPolicyInfo,
aifConstraintListCollection,
aifPropertyBag);
// How to find a list of purchase requisitions.
axdPurchaseRequisition = AxdBase::newClassId(
classNum(AxdPurchaseRequisition));
aifDocumentXml = axdPurchaseRequisition.findList(
aifQueryCriteria,
aifSchemaInfo,
aifEndpointActionPolicyInfo,
aifConstraintListCollection, aifPropertyBag);
// How to find a list of entity keys for purchase requisitions.
axdPurchaseRequisition = AxdBase::newClassId(
classNum(AxdPurchaseRequisition));
aifDocumentXml = axdPurchaseRequisition.findEntityKeyList(
aifQueryCriteria,
aifEndpointActionPolicyInfo);
// How to create a single sales order.
axdSalesOrder = AxdBase::newClassId(classNum(AxdSalesOrder));
aifEntityKey = axdSalesOrder.create(
aifDocumentXml,
aifEndpointActionPolicyInfo,
aifConstraintList);
// How to create a list of sales orders.
axdSalesOrder = AxdBase::newClassId(classNum(AxdSalesOrder));
aifEntityKeyList = axdSalesOrder.createList(
aifDocumentXml,
aifEndpointActionPolicyInfo,
aifConstraintListCollection);
Inheritance Hierarchy
Object Class
AxdBase Class
AxdAddress Class
AxdAdvancedLedgerEntry Class
AxdASN Class
AxdAssetCondition Class
AxdAssetDepRateExpImp_JP Class
AxdAssetGroup Class
AxdAssetLocation Class
AxdAssetMajorType Class
AxdAssetUndepBalanceExpImp_JP Class
AxdBankPositivePay Class
AxdBankStmt Class
AxdBankStmtISO Class
AxdBillsOfMaterials Class
AxdBudgetPlan Class
AxdBudgetPlanOfficeAddin Class
AxdBudgetTransaction Class
AxdCaseCategoryDetail Class
AxdCaseWebDetail Class
AxdCashDisc Class
AxdCatImp Class
AxdConnCustomerOrg Class
AxdConnEmployees Class
AxdConnExchRate Class
AxdConnInvoice Class
AxdConnItemSvc Class
AxdContactPersons Class
AxdCountingJournal Class
AxdCustCreditCard Class
AxdCustECollectionLetter_NO Class
AxdCustomer Class
AxdCustomerQuotation Class
AxdCustomerTransaction Class
AxdCustPayments Class
AxdCustPaymJournal Class
AxdDeliveryModes Class
AxdDlvDlvMode Class
AxdDlvDlvTerm Class
AxdDMFExeStatus Class
AxdDMFProcessGrp Class
AxdEcoResCategoryDoc Class
AxdEcoResCategoryDocument Class
AxdEcoResProduct Class
AxdEcoResProductMasterDimValue Class
AxdEMSMeterReadingFlow Class
AxdEMSSubstanceFlow Class
AxdEUSLReporting Class
AxdExpense Class
AxdFixedAsset Class
AxdFreeTextInvoice Class
AxdGenericDocument Class
AxdHcmJobApplication Class
AxdHcmJobPosting Class
AxdHcmWorkerImport Class
AxdHRMAbsenceReq Class
AxdIntrastatReport Class
AxdInventDimCombination Class
AxdInventItemBarcode Class
AxdInventItemGroup Class
AxdInventItemLocation Class
AxdInventLocation Class
AxdInventoryOnhand Class
AxdInventoryTransactions Class
AxdItem Class
AxdLedgerCurrency Class
AxdLedgerExchangeRate Class
AxdLedgerExchangeRateType Class
AxdLedgerGeneralJournal Class
AxdLineDiscount Class
AxdLogisticsAddressZipCodeSetup Class
AxdMarkupMarkupTable Class
AxdPaymentTerms Class
AxdPayrollEarningsImport Class
AxdPayrollPositivePay Class
AxdPickingList Class
AxdPriceDiscAdmTransDoc Class
AxdPriceDiscountJournal Class
AxdPricelist Class
AxdProdPickingList Class
AxdProfitLossJournal Class
AxdProjCategory Class
AxdProjContract Class
AxdProjectDocument Class
AxdProjectHourJournal Class
AxdProjInformation Class
AxdProjInvoice Class
AxdProjQuotation Class
AxdProjQuotationLine Class
AxdProjWBS Class
AxdPurchaseInvoice Class
AxdPurchaseRequisition Class
AxdPurchReqImport Class
AxdPurchRFQPaymTerms Class
AxdPurchRFQSites Class
AxdPurchRFQUnit Class
AxdRetailCampaignMedia Class
AxdRetailCatAttrib Class
AxdRetailMachine Class
AxdRetailProductData Class
AxdRetailStores Class
AxdReturnOrderIn Class
AxdReturnOrderOut Class
AxdRFQReply Class
AxdRFQSend Class
AxdRouteCard Class
AxdRoutes Class
AxdSalesConfirmation Class
AxdSalesInvoice Class
AxdSalesInvoice_Einvoice Class
AxdSalesMultilineDiscount Class
AxdSalesOrder Class
AxdSalesPackingSlip Class
AxdSalesQuotation Class
AxdSalesTotalDiscount Class
AxdServiceAgreement Class
AxdServiceOrder Class
AxdsmmBusRel Class
AxdsmmLeadPriorities Class
AxdsmmLeads Class
AxdSysImportBusSectors Class
AxdTaxCodes Class
AxdTaxExportLinesForAIF_CN Class
AxdTaxGroups Class
AxdTaxImportLinesForAIF_CN Class
AxdTaxIntgrExportDocData_CN Class
AxdTaxItemGroups Class
AxdTMSInvoice Class
AxdTMSPurchOrder Class
AxdTMSTransStatus Class
AxdTMSTransTender Class
AxdTransferJournal Class
AxdTransferOrder Class
AxdTransferOrderCreate Class
AxdTransferOrderPosting Class
AxdTrvPBSMaindata Class
AxdUnit Class
AxdUnitConversion Class
AxdVendGroup Class
AxdVendInvoice Class
AxdVendorPayment Class
AxdVendPayments Class
AxdVendTable Class
AxdVendVendRequestSignup Class
AxdWHSShipmentASN Class