Logo
programming4us
programming4us
programming4us
programming4us
Home
programming4us
XP
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Windows Phone
 
Windows Server

Customizing Dynamics AX 2009 : Number Sequence Customization

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
2/15/2013 6:09:52 PM
When you want to create a new number sequence, you must first create an extended data type. The ID of the type is used as the identifier for the number sequence reference, so it must be unique. Figure 1 shows a string data type named BikeServiceOrderId.
Figure 1. BikeServiceOrderId extended data type


The properties on the extended data type are set to create a type with a maximum length of 20 characters, as shown in Table 1.

Table 1. BikeServiceOrderId Property Settings
PropertySettings
TypeString
LabelService order
HelpTextService order ID
StringSize20

To implement a number sequence reference for service orders and assign it a specific service order number sequence, you must make changes to a NumberSeqReference class. To implement the reference in the Accounts Receivable module, among other references used by the sales order functionality, you add the following lines of X++ code to the loadModule method on the NumberSeqReference_SalesOrder class.

numRef.DataTypeId             = typeId2ExtendedTypeId(
                                typeid(BikeServiceOrderId));
numRef.ReferenceHelp          = "Unique key for the service order table, "+
                                "used when identification of a service "+
                                "order is allocated automatically.";
numRef.WizardContinuous       = false;
numRef.WizardManual           = NoYes::No;
numRef.WizardAllowChangeDown  = NoYes::No;
numRef.WizardAllowChangeUp    = NoYes::No;
numRef.SortField              = 100;
this.create(numRef);


These are the only modifications necessary to set up a new number sequence reference. The reference is available in the Accounts Receivable parameter form, and a number sequence can be created automatically by using the Number Sequence Wizard. You start the Number Sequence Wizard by clicking the Wizard button in the Number Sequences form located in the navigation pane under Basic\Setup\Number Sequences\Number Sequences.

The numRef table buffer in the preceding example is of a NumberSequenceReference table type. This table contains several fields that can be set depending on the reference you want to create. These fields are described in Table 2.

Table 2. NumberSequenceReference Field Explanations
FieldExplanation
DataTypeIdThe ID for the reference. Use the ID of the extended data type.
ConfigurationKeyIdThe configuration key that must be enabled for the reference to display. The configuration key should be set only if it is different from the key associated with the extended data type.
ReferenceLabelThe number sequence reference label should be set only if it is different from the label on the extended data type.
ReferenceHelpThe number sequence reference user interface Help field should be set only if the Help text is different from text in the HelpText property on the extended data type.
DataTypeSameAsIdIndicates that the reference can use the number from another number sequence. To make this possible, set the ID for the reference to the listed number sequence. This setting is usually applied to voucher references that use the ID of the journal as the voucher number.
GroupEnabledIndicates that the reference is enabled for use with number sequence groups. This setting should be specified only if the reference can be set up for each number sequence group.
SortFieldThe position of the reference in the list. Use a sufficiently high number to avoid conflict with other or future references within the same module.
WizardLowestThe default value for the Smallest field when creating the number sequence with the Number Sequence Wizard.
WizardHighestThe default value for the Largest field when creating the number sequence with the Number Sequence Wizard.
WizardManualThe default value for the Manual field when creating the number sequence with the Number Sequence Wizard.
WizardContinuousThe default value for the Continuous field when creating the number sequence with the Number Sequence Wizard.
WizardAllowChangeDownThe default value for the To A Lower Number field when creating the number sequence with the Number Sequence Wizard.
WizardAllowChangeUpThe default value for the To A Higher Number field when creating the number sequence with the Number Sequence Wizard.
WizardFetchAheadQtyThe default value for the Quantity Of Numbers pre allocation field when creating the number sequence with the Number Sequence Wizard. This field also enables the pre allocation number sequence feature, but it can’t be used in combination with a sequence marked Continuous.

Finally, the following method is implemented on the SalesParameters table. The method returns the new number sequence reference and should be used in the X++ code that requires numbers from the number sequence.

static client server NumberSequenceReference numRefBikeServiceOrderId()
{
    return NumberSeqReference::findReference(
                           typeId2ExtendedTypeId(typeid(BikeServiceOrderId)));
}

					  
Other -----------------
- Microsoft Systems Management Server 2003 : Queries (part 3) - Executing Queries
- Microsoft Systems Management Server 2003 : Queries (part 2) - Creating a Query
- Microsoft Systems Management Server 2003 : Queries (part 1) - Query Elements
- Microsoft Systems Management Server 2003 : Custom SMS Administrator Consoles
- System Center Configuration Manager 2007 : Operating System Install Packages and Image Packages (part 2) - Manual Image Creation, Image Deployment
- System Center Configuration Manager 2007 : Operating System Install Packages and Image Packages (part 1) - Automated Image Creation and Capture
- System Center Configuration Manager 2007 : Operating System Deployment - Computer Associations
- Microsoft Exchange Server 2007 : Load Balancing in Exchange Server 2007
- Microsoft Exchange Server 2007 : Managing a Windows Server 2003 Cluster
- BizTalk Server 2009 : Editing and Resubmitting Suspended Messages (part 2) - Pseudo-Walkthrough to Perform Edits and Resubmits
 
 
Top 10
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
 
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server