Our support engineers have assembled the top recommended solutions for you.
Microsoft Dynamics AX 2012
Upgrading to Microsoft Dynamics AX 2012
Data Import, Export, and Migration
Microsoft Dynamics AX 2009
Application Object Server (AOS)
Enterprise Portal and Role Centers
SSRS and SSAS Integration
I'm trying to create serial number who combine:
1) Last two digits in year: Year 2013 should be generated as 13.
2) Two digit for week number regarding to current date of creation: 20th - 26th of January 2014 is 04 (week 4 of the year).
3) Six digits start from 000001
My question is: How can I generate the year and week number? These numbers are always combined with "Today" so you don't have the option to manual set dates.
Use the year function to get the year from a date
Use the wkOfYr method to get the week from a date
In a method write logic to combine these values using strFmt like
strFmt('%1%2%3', '000001', substr(strFmt('%1', year(systemDateGet())), 3, 2), wkOfYr(systemDateGet()));
This should help you.
I'm writing a Class, but '0000001' Is a field in a table. How do I manage that?
Maybe if I re-think the situation - for example:
1) Build a class
2) Method in a str VAR who holds the year (13 for year 2013).
3) Method in a str VAR who holds the week number.
4) Method who take the value from specialized filed in a selected row in a table.
5) Method who make a VAR who is combined with logical plus: yy ++ ww ++ prodTable.Id
-Instance the Class so all prodTable.Id fields will be replaced with that new VAR.
-The only thing than will happened is we add yy and ww in the beginning of the Id number.
What do I need to have in mind? Is some way that I can just take yy and ww VAR's and make logical plus to the prodTable.Id field instead of taking the value first, handle it and then replace it?
You can just append the YY and WW variable to the ProdTable.Id field like
str newValue = ProdTable.Id + YY + WW
Other Microsoft Sites
I'm a Customer
I'm a Partner
Follow Microsoft Dynamics