Open CMD with run as administrator
run the command: sc queryEx DynamicsAxBatch
Get PID number
Kill the task : taskkill /f /pid 8696
Open CMD with run as administrator
run the command: sc queryEx DynamicsAxBatch
Get PID number
Kill the task : taskkill /f /pid 8696
/// <returns>to get particular date beginning to till now created records</returns>
public void getData()
{
//datetoBegin gets that dates beginning time which is 12:00AM midnight
curDate = datetobeginUtcDateTime(today(), DateTimeUtil::getUserPreferredTimeZone());
info(strFmt('RecId = %1 createdDateTime = %2', salesTable.RecId, salesTable.createdDateTime));
}
1. create a new base enum(YajLeaveWorkflowStatus or use the existing base enum
a. canSubmitToWorkflow
b. updateWorkflowStatus
public boolean canSubmitToWorkflow(str _workflowType = '')
3. Create a new Query (Ex: YajLeaveQuery) Add above table(YajLeaveTable) and datasource and its Table property Dynamics fields: Yes
4. Create a new WorkflowCategory(Ex: YajLeaveWorkflowCategory)
Set the following properties for the “Work flow category”Label – Give the label.Module – Select the module (in which module this workflow category belongs Ex: HumanResource).
5. Create a new Form (YajLeaveForm) and Add Datasource as Table(YajLeaveTable).
i. Form pattern: Simplelist
* Action Pane* Group with Quick filter control* Grid
6. Create a new Display menu Item for above Form (YajLeaveDisplayMenuItem)
Add the properties options as Below image
Object type : FormObject : YajLeaveFormEnum Type Parameter : YajLeaveWorkflowStatus (Base Enum created in Point no .1)Enum Parameter : Submitted
7. Create a new Workflow Type((YajLeaveWorkflowType)
Choose Category: (Point no. 4)Query : (Point no. 3)Menu item : (Point no. 6)
public class YajLeaveWorkflowTypeEventHandler implements WorkflowCanceledEventHandler,
update following code to YajLeaveWorkflowTypeSubmitManager
Note: Build the project now.
8. Create workflow Approval (YajLeaveWorkflowApproval)
Choose Workflow Document: (Created during Workflowtype creation Point no. 7)Field Group (YajLeaveTable field group: (Point no. 2)Menu item : (Point no. 6)
update following code to YajLeaveWorkflowApprovalEventHandler
public final class YajLeaveWorkflowApprovalEventHandler implements WorkflowElementCanceledEventHandler,
9. Now Goto Workflow Type (YajLeaveWorkflowType)
Note: If HRM CreateExtension not enable Update PersonnelManagement to current Model)
----------------------------------------------------------------------------------------------------------------------------
in D365FO FrontEnd : choose Module : Human resource --> Human Resource Workflow
-------------------------------------------------------------
Now goto HumanResource(HRM) module --> Workers Group --> Click Menu Item (leave form we created to open form)
Create some records as with Leave status as Not submitted.
Table
properties in the Application Object Tree (AOT)
|
Property |
Description |
New in this version
of Microsoft Dynamics AX |
||||
|
Abstract |
Specifies whether
the table supports inheritance. The default value is No. If the value
is Yes, the table cannot be a direct target of X++ SQL statements such
as update_recordset and select. This property is unavailable
when the SupportInheritance property is set to No. For more
information, see Table Inheritance Overview. |
AX 2012 |
||||
|
AnalysisDimensionType |
Determines the type
of dimension created based on the IsLookup property setting. You
can specify one of the following values. ·
Auto - Specifies that the table may contain
factual as well as dimensional data. The BI Wizard will
extract dimensional data and create dimensions and attributes while factual
data will be extracted to create measures. One child dimension is created
with attributes from the parent table. ·
MasterInner - Specifies an inner (full) join to
create relationships with this table to the child table. Each record
combination for this table and the child table are generated in the
dimension. One child dimension is created with attributes from the parent
table. ·
MasterLeftOuter - Specifies a left outer join to
create relationships with this table to the child table. Dimensions will have
additional attributes based on values in this table that can also be empty.
One child dimension is created with attributes from the parent table. ·
Transaction - Specifies that the table should
strictly be used to generate factual data (measures). This setting should be
used when a table only contains transactional data. One child dimension is
created containing only enumeration fields from the table. IsLookup property
set to No ·
Auto - Specifies that the table may contain
factual as well as dimensional data. The BI Wizard will
extract dimensional data and create dimensions and attributes while factual
data will be extracted to create measures. One parent and child dimension is
created. ·
MasterInner - Not applicable. Same as Auto. ·
MasterLeftOuter - Not applicable. Same as Auto. ·
Transaction - Specifies that the table should
strictly be used to generate factual data (measures). This setting should be
used when a table only contains transactional data. One child dimension is
created containing only enumeration values from the table. |
|||||
|
AnalysisIdentifier |
Specifies the field
to be used as the identifier for the dimension in a SQL Server Analysis
Services (SSAS) cube. |
|||||
|
AOSAuthorization |
Specifies the type
of operation that a user can perform on a table, depending on the user's
permissions. When the property is set to None, an authorization
check is not performed. |
|||||
|
CacheLookup |
Determines how to
cache the records retrieved during a lookup operation. This CacheLookup property
exists only on tables that do not inherit from another table. On an
inheritance root table, this property cannot be set to EntireTable by
using the AOT Properties window. You must not use other techniques
to assign this value to inheritance root tables. For example, do not use
the AOTsetProperty method of the TreeNode class
to assign this value. |
|||||
|
ClusterIndex |
Specifies the
cluster index. This property is used only for SQL optimization purposes. |
|||||
|
ConfigurationKey |
Specifies the
configuration key for the table. Configuration keys allow a system
administrator to enable and disable certain parts of an application. |
|||||
|
CountryRegionCodes |
Specifies the
country region codes where the table is applicable or valid. The client
framework and application may make use of this property to enable or disable
country or region specific features. This is implemented as a comma-separated
list of ISO country codes in a single string. The values must match data
contained in the global address book. |
AX 2012 |
||||
|
CountryRegionContextField |
Specifies the field
that will be used to identify the country context. This relates to the CountryRegionCodes property. |
AX 2012 |
||||
|
CreatedBy |
Indicates whether
the system maintains the CreatedBy field for the records in
a table. This field contains information about who created a particular
record. |
|||||
|
CreatedDateTime |
Indicates whether
the system maintains the CreationDate and CreationTime fields
for the records in a table. This field contains the date when a record was
created. |
AX 2012 |
||||
|
CreatedTransactionId |
Indicates whether
the system maintains the CreatedTransactionId field for the
records in a table. This field contains information about which transaction
created the record. |
|||||
|
CreateRecIdIndex |
Indicates whether an
index on the Record ID field is created. |
|||||
|
DeveloperDocumentation |
Describes the
purpose of a table and explains how it is used. A description is typically no
more than five sentences long and is written as a single paragraph. |
|||||
|
EntityRelationshipType |
Classifies a table
according to common entity relationship (ER) data model notation. A table is
classified as an entity or a relationship. An entity represents an object. A relationship
represents an association between two objects. |
|||||
|
Extends |
Derives the table
from another table that is chosen as the property value. The value is null
when the SupportInheritance property is set to Yes. For more
information, see Table Inheritance Overview. |
AX 2012 |
||||
|
FormRef |
Specifies the
display menu item that is activated when a table is referenced. A display
menu item is associated with a form. When you use a primary index field on a
report, this form is available as a link in the report. A primary index is
specified by using the PrimaryIndex property. If you leave
this field blank, the system attempts to display a form that has the same
name as the table. |
|||||
|
ID |
Specifies the
table ID generated by the system. For more information, see Application Object IDs. |
|||||
|
IsLookup |
For report models,
it specifies whether the table information is incorporated into other tables
that reference it when a report model is generated. For OLAP cubes, it
determines whether to generate a consolidated dimension or a distinct
dimension. You can specify one of the following values. ·
Yes - Indicates that attributes from the
table are to be consolidated into the parent dimension (star schema). ·
No - Indicates that a separate dimension
is to be generated for the table (snowflake schema). For more information
about dimensions and star and snowflake schemas, see Introduction to Dimensions (SQL Server 2005 Books Online). |
|||||
|
Label |
Specifies the label
for a table. |
|||||
|
ListPageRef |
Specifies a display
menu item that points to a form that can show a list of this record type. |
AX 2012 |
||||
|
Model |
Specifies which
model the table is in. A model is a logical grouping of elements in a layer.
An element can exist in exactly one model in a layer. Examples of elements
are a table or class. The same element can exist in a customized version in a
model in a higher layer. |
AX 2012 |
||||
|
ModifiedBy |
Indicates whether
the system maintains the ModifiedBy field for the records in
a table. This field records the person who performed the last modification to
a record. |
|||||
|
ModifiedDateTime |
Indicates whether
the system maintains the ModifiedDateTime field for the
records in a table. This field records the date of the last modification of a
record. |
|||||
|
ModifiedTime |
Indicates whether
the system maintains the ModifiedTime field for the records
in a table. This field records the time when a record was last modified. |
|||||
|
Name |
Specifies the table
name. |
|||||
|
OccEnabled |
Specifies whether
the optimistic concurrency mode is enabled for a table. When this mode is
enabled, data is not locked from future modification when it is fetched from
the database. Data is locked only when the actual update is performed. |
|||||
|
PreviewPartRef |
Specifies
the Info Part or Form Part to be used in the enhanced
preview. An info part shows a collection of data fields from a specified
query. An info part uses metadata to describe how the data appears. A form
part represents a pointer to a form. |
AX 2012 |
||||
|
PrimaryIndex |
Specifies the
primary index. Only a unique index can be selected. The property is used for
database optimization purposes and to indicate which unique index to use as
the caching key. If a primary index is not specified, the unique index with
the lowest ID is used as the caching key. |
|||||
|
ReplacementKey |
Specifies the fields
to display as the identifier for data in some form controls. |
AX 2012 |
||||
|
ReportRef |
Specifies the output
menu item that is activated when a table is referenced. An output menu item
is associated with a report. When you use a primary index field on a report,
this report is available as a link in the report. A primary index is
specified using the PrimaryIndex property. |
|||||
|
SaveDataPerCompany |
Indicates whether
the data for the current company is saved. If you set the property to No,
data is saved without a company identifier (DataAreaId).
|
|||||
|
SaveDataPerPartition |
Shows whether the
table has a system field named Partition. This is meant to be a
read-only system field. If the table has a Partition field,
each record is assigned to one partition. Each record is kept hidden from
data access operations that are run under the context of other partitions. |
AX 2012 R2 |
||||
|
SearchLinkRefName |
Specifies the name
of the menu item that links to information on a Web site about a table record
listed in the Enterprise Portal search results. If the SearchLinkRefType property
is set to URL, select a menu item from the SearchLinkRefName property
list that links to a Web part page that displays the table data. Forms and
reports on Web part pages can display data. |
|||||
|
SearchLinkRefType |
Specifies the type
of the menu item that links to information on a Web site about a table record
listed in the Enterprise Portal search results. |
|||||
|
SingularLabel |
Specifies the label
that is used in a report model or a cube to display the singular name of
items stored in the table. |
|||||
|
SupportInheritance |
Setting this
property to Yes enables you to set a value for other
inheritance related properties such as Extends and Abstract.
For more
information, see Table Inheritance Overview. |
AX 2012 |
||||
|
SystemTable |
Indicates if a table
appears as a System table. It can then be filtered during export and import.
System tables are always synchronized when you log in. This may be useful for
tables that you use as soon as you log in. |
|||||
|
TableContents |
Specifies how
setup/parameter data can be reused from one customer to another. The
following values are possible: ·
Not
specified – For most
tables. ·
Default
Data – Use for
customer-independent data such as ZIP/Postal Codes, units, and time
intervals. ·
Base
Data – Use for
customer-dependent data such as calendars, groups, and parameters. ·
Default+Base
data – Use for data
where the local perception varies. For example, Chart of Accounts is not
customer-dependent in Germany, but is most other places in the world. |
|||||
|
TableGroup |
Determines which
group the table belongs to. Table Groups provide a method for categorizing tables according to
the type of data they contain. Table groups can be used to define whether the
system should prompt users when they update or delete from the table in forms
by using the table as the data source. When exporting data, you can use table
groups to filter records. |
|||||
|
TableType |
Replaces the Temporary property
found in Microsoft Dynamics AX 2009. For more information, see Temporary Tables and the TableType Property. |
AX 2012 |
||||
|
TitleField1, TitleField2 |
Enables you to do
the following: ·
Add
table field data to a form caption. ·
Display
additional fields in a lookup form. For more information, see How to: Add a Control with a Lookup Form. The TitleField1 property
is also used when activating the lookup list in a field on a form. The fields
you specify for TitleField1 and TitleField2 properties
can be merged with the key value. ·
Display
field information in a tooltip. |
|||||
|
TypicalRowCount |
Specifies the number
of records that typically appear in a table. If the AnalysisSelection property
is not set, the TypicalRowCount property determines how
records are selected by using Report Builder for Microsoft SQL Server
Reporting Services. The TypicalRowCount property setting
affects whether a drop-down list, list box, or a filtered list box is used to
select table records. For more information, see Best Practices for Table Properties. |
|||||
|
ValidTimeStateFieldType |
Specifies the type
of date-time field for the system to use when it tracks data within time
spans. |
AX 2012 |
||||
|
Visible |
Specifies the access
rights when the table is used as a data source in a form or a report. If the table
is used as a data source in a form, then the access rights in the form cannot
exceed the access rights defined for the table. |
Best
Practices for Table Properties
|
Property |
Rules |
|
Name |
Prefix with the
module name. For example, Cust, Vend, or Invent. Infix with a logical
description of the contents. For example, CustCollectionLetterTrans, where
CollectionLetter is the infix. For temporary tables, infix with Tmp. For
example, CustTmpLedger. Postfix with the
type of contents. For example, Trans, Jour, Line, Table, Group, Parameters,
or Setup. The primary tables
for the major business areas are postfixed with Table. For example,
CustTable, InventTable, and VendTable. |
|
Label |
Mandatory unless the
table has the Visible property set to No. An error occurs if: ·
You
do not set this property. –and– ·
Visible
is not set to Yes. The text value of
the label must be unique across all tables (excluding temporary tables),
views, and maps, in all languages. |
|
FormRef |
For tables where the
FormRef property is set to a display menu item, the display menu item must
exist. |
|
TitleField1,
TitleField2 |
Mandatory unless: ·
The
Visible property for the table is set to No. –or– ·
The
TableGroup property is set to Parameter. Don't set this
property if there are not enough fields (according to your needs) in the
table. (Fields of type real or integer should not be used as title fields.) Specify the two best
fields for TitleField1 and TitleField2 according to the following: ·
TitleField1
– The key field for the records in the table. Use a descriptive title if the
key field has information for the user. ·
TitleField2
– A descriptive field for the records in the table. For example, for the
Table InventItemGroup table, TitleField1 is ItemGroupId, and TitleField2 is
Name. If the value of
TitleField1 and TitleField2 is the same, an error occurs. |
|
TableType |
Starting in
Microsoft Dynamics AX 2012, all tables have the TableType property that
replaces the Temporary property found in Microsoft Dynamics AX 2009 and
earlier versions. Use the setTmp table
method to make a non-temporary table temporary rather than creating a copy of
the table, and then making it temporary. The two versions of the table can
quickly become out of sync. |
|
TableContents |
Leave this property
set to Not Specified for most tables. Set to Default
Data for customer-independent data. For example, time intervals and
unit conversions. Set to Base
Data for customer-dependent data. This data is often from an
existing system that has been imported or entered into Microsoft Dynamics AX.
For example, customers and vendors. Set to Default+Base
Data for data that can be customer-dependent in some
countries/regions, but not in others. |
|
SystemTable |
Set this property
to Yes if you want the table to be designated as a system
table. For example, the information about the system table is used during
export and import when system tables can be filtered out. Don't overuse this
feature. |
|
ConfigurationKey |
Set the
ConfigurationKey property for most tables. This ensures that the table is
removed when the key is disabled. Configuration keys allow a system
administrator to enable and disable certain parts of an application. |
|
SecurityKey |
In Microsoft
Dynamics AX 2012, security keys are obsolete and only remain for upgrade
purposes. |
|
Visible |
Mandatory. If the table is a
transactions table, set this property to Yes. |
|
CacheLookup |
Set to the EntireTable value
for the following tables: ·
Contains
static data (for example: some Main, and most Group and Parameter tables). ·
Are
frequently accessed by the NotFound cache when it hits select statements. For
example: o while select. o == selects something that doesn't match the
cache candidate key. o select using relational operators other than
== (such as <, > and so on). ·
Has
a moderate number of records (hundreds or thousands, but not millions). ·
Is
obvious that one select statement to the database outperforms select
statements to the database. If a table performs
poorly when the cache type is set to EntireTable, it is possible to change
the cache setting to FoundAndEmpty or Found for a particular installation. Tables with the
cache type set to EntireTable should have a Cluster index. This ensures that
the table loads as quickly as possible. When your code
attempts to find a record in a cache by using a utility class such as
SysGlobalCache or SysGlobalObjectCache, your code might get a return code
which indicates the record is not in the cache. You code must then get the
record by using a normal query. After the query returns the record, your code
should add the record to the cache. If most of the find attempts indicate the
needed records are not already in the cache, it might make sense to
discontinue caching the table. Remove Found caching
from tables that have no unique index. |
|
CreateRecIdIndex |
Set this property to
Yes only if you actually need an index on the Record ID field. All
tables have a Record ID index, but the index is set to Passive when the
CreateRecIdIndex property is set to No. |
|
SaveDataPerCompany |
Set to Yes for
company-specific tables. Set to No if the
data is related to cross-companies, installation, a database, the AOT,
tracing, or OLAP. For example, SysTraceTable or OLAPServerTable. Note If the
SaveDataPerCompany property on a table is set to Yes, the SetCompany property
on a form design that uses that table as a data source must also be set to
Yes. |
|
TableGroup |
Mandatory. Set to Group for
tables that contain grouping and categorizing information. If the parent
table is also a Group table, you only sometimes establish delete actions for
a table that relates to a group table. Deleting records
from a group table can sometimes result in an unstable situation. Enable
confirm deletion. For more information, see Maintaining Data Integrity. Typical examples of
Group tables from the standard application are CustGroup and VendGroup. Set to Main for
tables that contain base data. Note Consider using an
alias field for all tables that have the TableGroup property set to Main.
Alias fields are set by using the AliasFor property on the field. For
example, a phone number could be an alias for a customer ID. When the phone
number is entered, it is automatically replaced by the customer's ID. |
|
PrimaryIndex |
Mandatory property
for tables that have a unique index. If there is more
than one unique index, this property determines which index Found caching
works on. |
|
ClusterIndex |
Set the index that
the table should be organized by. Leave the index
blank if performance tests on realistic data show that clustering does not
work better. You can measure performance along the following dimensions: ·
Amount
of space that the index consumes on the disk and in memory. ·
Speed
of CRUD operations (Create, Read, Update, Delete). For more
information, see Clustered Indexes. |
|
TypicalRowCount |
Select a value that
corresponds to the number of rows that the table will probably have. |
|
IsLookup |
Set to Yes if the
table consists of only a primary key and one other field. |
|
SingularLabel |
Mandatory if you
have set the AnalysisVisibility property to Yes. |
|
ModifiedDateTime |
Set this property to
Yes only if you need the information it provides. |
|
ModifiedTime |
Set this property to
Yes only if you need the information it provides. |
|
ModifiedBy |
Set this property to
Yes only if you need the information it provides. |
|
CreatedTransactionId |
Enable the CreatedTransactionId
property if your table has the TableGroup property set to Transaction. If the TableGroup
property is not set to Transaction, set the CreatedTransactionId property
only if you need to use information about which transaction created each record
in the table. |
|
CreatedBy,
CreatedDateTime, and CreatedTransactionID |
Read-only properties. |
Copy D365FO Table Browser URL /?cmp=usmf&mi=SysTableBrowser&tablename= URL : https://usnconeboxax1aos.cloud.onebox.dynamics.com...