80670AE AX2012R3CU8 DEV1 ReferenceMaterial

download 80670AE AX2012R3CU8 DEV1 ReferenceMaterial

of 50

Transcript of 80670AE AX2012R3CU8 DEV1 ReferenceMaterial

  • 8/19/2019 80670AE AX2012R3CU8 DEV1 ReferenceMaterial

    1/50

    Online Companion Guide80670AE

    Development I in Microsoft Dynamics AX 0!"# C$8

  • 8/19/2019 80670AE AX2012R3CU8 DEV1 ReferenceMaterial

    2/50

    ContentsOnline Companion Guide........................................................................................................................................1

    80670AE%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% !

    Development I in Microsoft Dynamics AX 0! "# C$8%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%!

    Disclaimer................................................................................................................................................................4

      Module 1: Architecture................................................................................................................................5

    Module !& Arc'itecture (ideo )ranscript....................................................................................5

    *esson !& Module Overvie+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ,

    *esson & -eatures of Dynamics AX%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ,

    *esson #& Arc'itecture%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 6

    *esson .& Data /artitions%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%7

    *esson 6& Model Driven Arc'itecture%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    *esson 7& *icensin1 and Con21uration%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%!0

    *esson and Module 3ummary%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% !0

     Module 1 Key Take Aay.....................................................................................................................................11

    Module 1: !ractices...............................................................................................................................................1"

      Module 1: Thin#s to think a$out:....................................................................................................................1"

    Module ": Data Dictionary....................................................................................................................................1%

    Module ": Data Dictionary &ideo Transcript..........................................................................................1%

    *esson !& Module Overvie+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% !#

    *esson & Introduction to MorpX and t'e Application O45ect )ree%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%!#

    *esson #& Introduction to )a4les%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%!.

    *esson .& Data )ypes& /rimitive and Etended%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%!,

    *esson ,& Creatin1 )a4les%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% !6

    *esson 6& Indees%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%!7

    *esson 7& "elations%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% !7

    *esson 8& ase Enumerations%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% !8

    *esson & (ie+s%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%!8

    *esson and Module 3ummary%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% !

    Module " Key Take Aay......................................................................................................................................1'

    Module ": !ractices..............................................................................................................................................."(

      Module ": Thin#s to think a$out:..................................................................................................................."(

      Module %: )ser *nter+aces........................................................................................................................."1

  • 8/19/2019 80670AE AX2012R3CU8 DEV1 ReferenceMaterial

    3/50

    Module %: )ser *nter+aces &ideo Transcript..........................................................................................."1

    *esson !& Module Overvie+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% !

    *esson & -orms%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% !

    *esson #& oinin1 Data 3ources%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% #

    *esson .& Menu Items%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% #

    *esson ,& -orm )emplates%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% .

    *esson 6& *ist /a1es%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%.

    *esson 7& -actoes%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%,

    *esson and Module 3ummary%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 6

    Module % Key Take Aay......................................................................................................................................",

    Module %: !ractices..............................................................................................................................................."-

      Thin#s to think a$out:......................................................................................................................................"-

      Module 4: ecurity............................................................................................................................................."/

    Module 4: ecurity &ideo Transcript......................................................................................................"/

    *esson !& Module Overvie+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 8

    *esson & De2nitions%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 8

    *esson #& 3et up a 9e+ $ser%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#0

    *esson .& Assi1n a $ser to a "ole%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% #0

    *esson ,& C'an1e Duties on a "ole%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#!

    *esson 6& C'an1e /rivile1es on a Duty%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% #!*esson 7& Assi1n a /ermission to a /rivile1e%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#

    *esson 8& Investi1ate Access%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% #

    *esson and Module 3ummary%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% #

    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% #

    Module 4 Key Take Aay......................................................................................................................................%"

    Module 4: !ractices...............................................................................................................................................%%

      Thin#s to think a$out:......................................................................................................................................%%

      !ractices....................................................................................................................................................%5

    !ractice 1.1: Create a 0e Model and Deelopment !ro2ect...............................................................................%5

    !ractice ".1: Create a 0e 3DT............................................................................................................................%,

    !ractice ".": Create a 0e Ta$le...........................................................................................................................%,

    !ractice ".%: Create a !rimary *nde.....................................................................................................................%-

    !ractice ".4: Create a elation...............................................................................................................................%-

  • 8/19/2019 80670AE AX2012R3CU8 DEV1 ReferenceMaterial

    4/50

    !ractice ".5: Add an 3num....................................................................................................................................%'

    !ractice %.1: Create a 6orm...................................................................................................................................4(

    !ractice %.": Create a 6orm +rom a Template........................................................................................................4(

    !ractice 4.1: Create a 0e ecurity ole..............................................................................................................4"

    Disclaimer )'is Online Companion Guide is to 4e used in con5unction +it' t'e E:*earnin1 for t'is course% )'is online companion 1uide can 4e used to ta;e notes or provide additional information on t'etopic%

  • 8/19/2019 80670AE AX2012R3CU8 DEV1 ReferenceMaterial

    5/50

      Module !& Arc'itecture

    Module !& Arc'itecture (ideo )ranscript

    *esson !& Module Overvie+ Microsoft Dynamics AX 0! "# C$8 is a customi* 3erver master data services= ena4lin1or1ani

  • 8/19/2019 80670AE AX2012R3CU8 DEV1 ReferenceMaterial

    6/50

    for customi

  • 8/19/2019 80670AE AX2012R3CU8 DEV1 ReferenceMaterial

    7/50

      *ets ta;e a deeper loo; at t'e t'ree:tier arc'itecture t'at ma;es up a typical deploymentof AX% At t'e data4ase tier= +e 'ave a fe+ diBerent data4ases% )'e Microsoft Dynamics AXdata4ase is an online transactional processes= or O*)/ data4ase= t'at stores all of t'e 4usinessdata in 3>* ta4les% )'eres also model data4ase t'at stores all of t'e metadata and applicationcode in t'e model store%

    3ome I components of Microsoft Dynamics AX also re@uire you to use 3>* 3erver"eportin1 3ervices and 3>* 3erver Analysis 3ervices% 3>* 3erver "eportin1 3ervices= or 33"3= isused for runnin1 reports% )'e 3>* 3erver Analysis 3ervices= or 33A3= data4ase is derived fromt'e data in t'e O*)/ data4ase in a format t'at is optimi

  • 8/19/2019 80670AE AX2012R3CU8 DEV1 ReferenceMaterial

    8/50

    data isolation% o+ever= data partitions still allo+ t'e metadata t'at supports t'e 4usinessprocesses to 4e s'ared%

    /artitions divide and isolate t'e 4usiness data of an installation 4y usin1 specialprocessin1 t'at t'e AO3 applies to data @ueries% usiness data t'at is s'ared amon1 companiesis only s'ared 4et+een companies t'at are in t'e same partitions%

    Eac' Microsoft Dynamics AX client session starts in one partition% $sers must start a ne+AX client session for eac' partition t'ey +is' to access% Once a session is started= t'e sessionmay only access t'e data and t'e partition it +as started in% -or instance= a client session t'at+as started in su4sidiary A may only access t'e data in partition !%

    Eac' partition contains at least one company or le1al entity% A le1al entity occurs in onlyone partition% ?'en you create a le1al entity= t'e system assi1ns it to t'e current partition%?'ile a le1al entity cannot 4e moved to anot'er partition= its data can 4e eported from onepartition and t'en imported to anot'er company in anot'er partition%

     ust to note= partitions +ere added startin1 in Microsoft Dynamics AX 0! "% ?'en youup1rade from a version t'at did not support partitions= you must assi1n t'e eistin1 companiesor le1al entities to one or more partitions durin1 t'e up1rade%

      *esson ,& Development Environments )'e AX application is 4uilt of elements t'at are stored in t'e model store in t'e 3>* 3erver

    data4ase% -or eample= t'e elements t'at are stored in t'e application mi1't 4e 2elds andta4les t'at de2ne data structure= forms and menus t'at de2ne 'o+ a user interacts +it' t'eapplication= classes and met'ods= +'ic' are code o45ects t'at de2ne usiness *o1ic% )'eApplication O45ect )ree= or t'e AO)= provides a visual representation of t'e elements t'atcomprise t'e application% O45ect oriented desi1n and in'eritance are ;ey concepts t'at form t'e4asis of t'e application%

    Model elements can 4e modi2ed or added usin1 t'e AO)% ou can also use Microsoft(isual 3tudio as a development environment% ?'ile most of t'e development for AX can 4eusin1 t'e Morp'X ID= concepts suc' as 3>* 3erver "eportin1 3ervices and Enterprise /ortalcomponents can only 4e developed usin1 (isual 3tudio%

    Once developed in (isual 3tudio= t'ey can 4e inte1rated 4ac; into t'e AX AO) 4y addin1t'e pro5ects from (isual 3tudio to t'e AO)%

    -or more information on +'ic' environment to use= do+nload t'e +'ite paper titled3electin1 t'e est Development )ec'nolo1y -or our Application Development 3cenario for AX0!% )'at is availa4le on M3D9%

    *a4els are used to provide t'e lan1ua1e tet t'at end:users see +'en usin1 t'eapplication% All tet presented to t'e client displays t'e translation of a la4el code% )'e la4elcodes usually are used +'erever t'e same tet is used +it' t'e same meanin1% )'is ma;es iteasier to mana1e multiple lan1ua1es and to adapt to a companys speci2c lan1ua1e%

    As an eample= t'e la4el code H3378!! is translated as direct delivery in t'e En1lis'$%3% la4el 2le% )'is la4el code is used in various places t'rou1'out t'e application% It is used on2eld names and menu items displayed on forms suc' as t'e sales order 'eader form%

    All la4el codes are already translated into all ot'er lan1ua1es= +'ic' AX supports% If anend user opens t'e application in 3panis'= t'ey +ould see t'e 3panis' translation +'erever t'is

    la4el code is used% Developers can create ne+ la4el 2les to translate la4el codes into ot'erlan1ua1es or customer:speci2c terminolo1y%

     )ools includin1 t'e *a4el Editor and t'e *a4el ?i

  • 8/19/2019 80670AE AX2012R3CU8 DEV1 ReferenceMaterial

    9/50

    t'e Morp'X IDE from t'e Microsoft Dynamics AX client usin1 t'e ?indo+s menu in t'e command4ar and selectin1 ne+ developer +or;space%

    Alternatively= you can also use t'e s'ortcut ;eys Ctrl3'ift?% ?ell ta;e a deeper loo;at t'e Morp'X IDE in t'e net module%

    X is t'e o45ect oriented pro1rammin1 lan1ua1e t'at is used in t'e Morp'Xdevelopment environment% X 'as C s'arp li;e synta and incorporates 3>* datamanipulation statements% A full list of developer tools in t'e Morp'X development environmentcan 4e found in t'e developer 'elp documentation%

    3ome of t'e tools t'at are availa4le are t'e X code editor= +'ic' is a tet editor usedto +rite X code% It supports color:codin1 and allo+s you to loo; up and select various o45ectssuc' as met'od names and enumeration values as your type%

     )'en +e 'ave a de4u11er= +'ic' is an application used 4y developers to step t'rou1' X code to 'elp resolve code errors%

     )'eres also a reverse en1ineerin1 tool t'at ena4les you to visuali* 3erver%

    ?'ile developin1 in Microsoft Dynamics AX= you can 1roup all of your modi2cations intoone or more development pro5ects% )o create a ne+ development pro5ect= you can clic; on t'e

    pro5ect icon in t'e development +or;space or press Ctrl3'ift/% )'ere are t+o types of pro5ectst'at you can create& /rivate pro5ects or s'ared pro5ects% /rivate pro5ects are visi4le to t'e user+'o creates t'em= and t'e s'ared pro5ects are visi4le to everyone%

     )o create a ne+ s'ared pro5ect= you can ri1't:clic; on t'e s'ared note= and select ne+pro5ect%

    Once you open t'e pro5ect= you can dra1 elements from t'e AO) into t'is pro5ect% )'iscreates a reference to t'e element in t'e AO)% Modifyin1 elements in t'e pro5ect is t'e same asmodifyin1 t'em directly in t'e AO)%

    *esson 6& Model Driven Arc'itecture

      AX is desi1ned +it' a uni@ue layer and model structure t'at separates and controls t'eupdates and modi2cations made in t'e application% )'is structure provides a po+erful andei4le arc'itecture for developin1 usiness *o1ic% )'e ;ey 4ene2t of t'e layer and modelstructure is t'at it lets developers c'an1e and etend t'e functionality in AX +'ile maintainin1up1radea4ility to ne+ versions%

     )'e application o45ect layers 'old all t'e elements t'at are displayed in t'e AO)% )'ereare ei1't application o45ect layers t'at are availa4le% Eac' of t'ese layers also 'as a patc' layert'at ma;es it a total of !6 layers% )'e layers are a 'ierarc'y of levels in t'e application t'at youcan use to ma;e modi2cations and additions +it'out interferin1 +it' t'e application elements int'e lo+er level%

  • 8/19/2019 80670AE AX2012R3CU8 DEV1 ReferenceMaterial

    10/50

      ?'en you ma;e an element modi2cation on one level= t'e modi2cation overs'ado+s t'eelement on a lo+er level% ?'en t'e application is compiled= only t'e top:level version of anapplication element is used%

     )'ere are t'ree layers t'at are availa4le only to Microsoft to deliver t'e 4ase application% )'ose are t'e 33 layer= or t'e system layer= t'e G*3 layer= or t'e 1lo4ali

  • 8/19/2019 80670AE AX2012R3CU8 DEV1 ReferenceMaterial

    11/50

      9e+ models are easy to create in t'e Morp'X ID and are applied +'en modifyin1 oraddin1 o45ects in t'e AO)%

    Models can 4e eported= installed= or uninstalled from t'e model store% Models areidenti2ed 4y a name and a pu4lis'er and can 'ave a set of properties t'at can 4e c'an1ed=includin1 a version num4er%

    *ets ta;e an eample to see 'o+ models +or;% A company 'as t+o lines of 4usiness% )'ey manufacture and sell medical products in one of t'e lines of 4usiness= and in t'e secondline of 4usiness= t'ey also service speciali

  • 8/19/2019 80670AE AX2012R3CU8 DEV1 ReferenceMaterial

    12/50

    o -unctional -eatures

    $ni2ed data4ase across modules

    Dimension 4ased

    3upports multi:currency and multi:lan1ua1e

    o AX 'as a t'ree tier arc'itecture

    Data4ase

    Application O45ect 3erver KAO3L

    Clients

    o Application O45ect 3erver is responsi4le for&

    3ecurity

    3ession Mana1ement

    X "untime

    ?e4 services

    o Data /artitions

    elp isolate data

    One or more le1al entities can 4e in eac' partition

    *e1al entities in one partition cannot see application data and 1lo4al

    application data from anot'er partition

    /artitions can still s'are system data suc' as application ports and

    code

    o Development Environments

    Application O45ect )ree KAO)L

    • $sed for ma5ority of t'e development

    (isual 3tudio

    • $sed to +rite mana1ed code= 3>* 3erver "eportin1 3ervices

    "eports and Enterprise /ortal code

  • 8/19/2019 80670AE AX2012R3CU8 DEV1 ReferenceMaterial

    13/50

    • Code +ritten in (isual 3tudio can 4e inte1rated 4ac; into t'e AO)

    o Development /ro5ects

    Can 4e used to 1roup modi2cations

    Can 4e s'ared pro5ects or private pro5ects

    o *icensin1 and Con21uration

    *icense codes ena4le modules t'at 'ave 4een purc'ased

    Con21uration ;eys control functionality and features on a system +ide

    4asis

    o Model Driven Arc'itecture

    *ayers 'elp isolate code +ritten in one layer from anot'er layer

    Customi

  • 8/19/2019 80670AE AX2012R3CU8 DEV1 ReferenceMaterial

    14/50

     777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777 777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777

     777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777

     777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777 777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777

     777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777

     77777777777777777777777777777777777777777777777777777777777777777777777777777777777777777 

     77777777777777777777777777777777777777777777777777777777777777777777777777777777777777777 

  • 8/19/2019 80670AE AX2012R3CU8 DEV1 ReferenceMaterial

    15/50

      Module & Data Dictionary

    Module & Data Dictionary (ideo )ranscript

    *esson !& Module Overvie+ )'is c'apter introduces t'e tools and procedures used to create ta4les= data types= relations=enums and vie+s t'at are re@uired in Microsoft Dynamics AX%

    In t'is model= +ell loo; at t'e features of Morp'X and t'e Application O45ect )ree in moredetail% )'en +ell revie+ t'e 4asics of +or;in1 +it' ta4les in AX% After t'at= +ell tal; in dept'a4out t'e primitive and etended data types t'at are supported in AX% 9et= +ell loo; atcreatin1 ta4les in AX= settin1 indees= relations= and usin1 4ase enums%

    -inally= +ell learn 'o+ to create and modify vie+s%

    *esson & Introduction to MorpX and t'e Application O45ect )ree )'e Application O45ect )ree= or t'e AO)= is a tree vie+ of all t'e application elements in AX% Eac'4ranc' node in t'e AO) contains a diBerent application element type% ?it'in t'e AO)= adeveloper can create or modify AX application elements usin1 simple dra1 and drop functionality%

     )'e system 'as default settin1s for all of t'e application o45ect properties% )'is module focuses on t'e elements contained in t'e data dictionary node%3ome of t'e ot'er application elements are discussed in later modules%-irst= lets ta;e a loo; at 'o+ to use t'e AO)% )'ere are four +ays of accessin1 t'e AO)%

     )'e 2rst is from ?indo+s= and t'en selectin1 t'e ne+ development +or;space% )'e second is as'ortcut Ctrl3'ift?% )'e t'ird +ay of openin1 t'e AO) is 4y usin1 t'e s'ortcut CtrlD%

     )'e fourt' +ay of accessin1 t'e AO) is from command prompt% ou need to 1o to t'e

    client 4in directory of your Microsoft Dynamics AX installation and type AX#%EXE +it' t'edevelopment s+itc'%

    *ets open t'e AO) from t'e ?indo+s ne+ development +or;space% ?'en you selectt'at option= t'e development +or;space= or t'e Morp'X IDE= is opened= and you +ill see oneinstance of t'e AO) t'ats 4een opened%

    *ets loo; at some of t'e features of t'e AO)% ou 2rst 'ave a tool4ar +it' a num4er ofoptions% )'e 2rst option on t'e tool4ar is t'e open command% ou can also use CtrlO% )'iscommand is used to directly open elements from t'e AO)% -or instance= you can select any oft'e forms in t'e AO) and clic; open to open t'e particular form%

     )'e net option is t'e properties s'eet% ou can also use t'e AltEnter s'ortcut% )'eproperty s'eet command opens t'e property s'eet for t'e selected element in t'e AO)%

     )'e t'ird option is save all% )'is saves all of t'e pendin1 c'an1es in t'e AO)%

     )'e fourt' option is t'e import command% )'is is used to import X/Os from a 2le into AX%X/Os are t'e standard +ay of eportin1 and importin1 elements from t'e AO) into t'e 2lesystem%

     )'e last command is t'e AO) is t'e compile option% )'is can 4e used to compile t'eselected elements in t'e AO)%

     )'ere are also a num4er of commands t'at are availa4le from t'e ri1't:clic; menu% *etsloo; at some of t'em% Dependin1 on +'ic' node you ri1't:clic; on= you +ill 1et diBerent options%-or instance= if you ri1't:clic; on a class= you 'ave t'e a4ility to create a ne+ class% All t'enodes in t'e AO) also let you open t'e node in a ne+ +indo+% *ets try t'is%

  • 8/19/2019 80670AE AX2012R3CU8 DEV1 ReferenceMaterial

    16/50

      ?'en you select open in ne+ +indo+= t'e selected node is opened in a separate instanceof t'e AO)= and t'is is very useful +'en you +ant to do dra1:and:drop operations 4et+eenelements in t'e AO)%

     )'e t'ird option t'ats @uite common is t'e eport option t'ats availa4le in t'e ri1't:clic;menu% )'is allo+s you to eport one or more elements from t'e AO) into an X/O 2le%

    9et= you 'ave compile= +'ic' is availa4le on some nodes= +'ic' support it% )'iscompiles t'e selected nodes +it'in t'e Morp'X IDE%

     ou also 'ave t'e a4ility to 2nd t'e nodes% Clic;in1 on 2nd 4rin1s up a 2nd dialo1ue+'ere you can loo; for nodes t'at contain speci2c tet or are named in a certain +ay and t'in1sli;e t'at%

    3ome of t'e nodes also 'ave additional properties or additional commands availa4le% Int'e add:ins su4:menu of t'e ri1't:clic; menu= you 'ave a num4er of diBerent options% Oneinterestin1 option is t'e c'ec; 4est practices option= +'ic' lets you run t'e system de2ned 4estpractices on your customi

  • 8/19/2019 80670AE AX2012R3CU8 DEV1 ReferenceMaterial

    17/50

    +'ic' is used for t'e 1eneral inventory catalo1= and /urc' ta4le= +'ic' is used for purc'ase ordercreation%

    Ot'er ta4les in AX contain system data as +ell as metadata% 3ystem ta4les arediBerentiated from application ta4les 4y t'e 33 pre2 t'at starts t'e name of t'e ta4le% ou canlearn more a4out t'e application ta4les t'at are part of AX from t'e AX E"D +e4site% )'is site'osts entity relations'ip= or E" dia1rams= for core ta4les of t'e application modules in MicrosoftDynamics AX 0! "# C$8% ou can use t'e site to @uic;ly list all of t'e forei1n ;ey relations'ipsfor a ta4le involvin1 4ot' its c'ild and parent ta4les% ou can also use t'is site to determine+'ic' module a ta4le is in and +'ic' ta4les are in a particular module%

     )'ere are multiple elements in Microsoft Dynamics AX t'at de2ne a ta4le% -ields= 2eld1roups= indees= full tet indees= relations= delete actions= and met'ods% -ields can 4e used tocreate or modify t'e p'ysical columns in t'e data4ase ta4le% )'e 2elds de2ned +it'in t'e 2eldsnode are t'e columns 4elon1in1 to t'e p'ysical ta4le% One note of caution 'ere& Any 2eldscreated= deleted or modi2ed usin1 Morp'X in t'e ta4le node are reected in t'e data4ase +'ent'e c'an1es are saved% )'is can potentially dama1e t'e AX application if not used correctly%

    -ield 1roups are lo1ical 1roupin1s of p'ysical data4ase 2elds% AX uses 2eld 1roups tocluster 2elds into lo1ical 1roups so t'at t'ese 1roups can 4e used on forms and reports% Aneample of suc' a 1roup is t'e 1roup measurement located on invent ta4le%

    Invent ta4le 'olds data relatin1 to products= and t'e measurement 2elds are 'ei1't=+idt'= dept' and density of t'e products%

    If a modi2cation is made to a 2eld 1roup= application elements t'at refer to t'e 2eld1roup are automatically updated to reect t'e ne+ content of t'e 1roup% )'is is done usin1 t'eIntelliMorp' tec'nolo1y t'at ad5usts t'e layer of forms and reports= +'ic' use t'e modi2ed 2eld1roup%

    Addin1 ne+ 2elds to a 2eld 1roup can 4e a po+erful tec'ni@ue for updatin1 forms t'atuse 2eld 1roups +it'in a 2eld%

    Every 2eld on a ta4le s'ould 4elon1 to a 1roup%9et= indees in AX are t'e p'ysical indees t'at eist on t'e ta4les in t'e data4ase%

    Indees can accelerate a searc' on a ta4les data% More detailed information on indees isdiscussed later in t'is module%

    -ull tet indees contain location information a4out eac' si1ni2cant +ord in a strin1 2eld

    of a ta4le% 3ome @ueries can use t'is information to run more eciently and to complete@uic;er% )'ese @ueries t'at searc' for +ords em4edded in t'e middle of strin1 2elds% A full tetinde can 4e created 4y creatin1 a ne+ full tet inde under t'e full tet inde node on t'e ta4leand addin1 2elds to t'is inde%

    "elations de2ne relations'ips 4et+een ta4les% AX supports a num4er of diBerentrelations% ?e +ill discuss t'ese in more detail later in t'is module%

    Delete actions 1overn 'o+ data is 'andled +'en a deletion event occurs in a parentta4le% )'ere are four types of delete actions& 9one% ?it' t'is delete action= t'e ro+ in t'e ta4leis deleted 4ut not'in1 occurs in t'e speci2ed ta4le% ?it' a cascade delete action= t'e ro+ in t'ista4le is deleted and all related data in t'e speci2ed ta4le is also deleted% )'is ensures t'at t'ereare no orp'an records t'at remain after deletion% ?it' a restricted delete action= t'e ro+ in t'ista4le is deleted only if t'ere is not'in1 t'at relates to it in a speci2ed ta4le% )'is is used +'en a

    parent record s'ould only 4e deleted +'en no c'ild records eist= and t'e c'ild record isimportant to ;eep% -or eample= transaction records% )'e net delete action iscascaderestricted% )'is +or;s similar to restricted +'en t'e ta4le is not part of a cascadedelete% Cascaderestricted +or;s similar to cascade delete +'en t'e ta4le is part of a cascadedelete operation from a parent ta4le% 9ote its really important to create delete actions andspecify t'em correctly to ensure data inte1rity%

     )'en +e 'ave met'ods% AX uses met'ods +it'in a ta4le to perform functions speci2c tot'at ta4le% Met'ods can 4e used for data loo;ups to ot'er ta4les or manipulation of data durin1speci2c events% )a4le met'ods are covered in more detail in later development courses%

    -inally= AX 0! introduces t'e concept of ta4le in'eritance% A ta4le can etend anot'erta4le 4y specifyin1 t'e etend property on t'e ta4le% )'is means one ta4le in'erits all of t'e

  • 8/19/2019 80670AE AX2012R3CU8 DEV1 ReferenceMaterial

    18/50

    2elds and properties and met'ods of t'e ta4le t'at it etends% 9e+ 2elds and met'ods t'at areadded to t'is etendin1 ta4le +ill not 4e visi4le from t'e parent ta4le t'at it is etended from%

    *esson .& Data )ypes& /rimitive and EtendedAX uses data types to de2ne 'o+ data is stored and restricted +it'in t'e data4ase% )'ere areprimitive and etended data types t'at are supported 4y AX% )'e 4asic set of primitive datatypes in AX map to underlyin1 data types t'at eist in t'e p'ysical data4ase% )'ese primitivedata types can 4e epanded to create etended data types +'ic' are reusa4le data types 'avin1a speci2c de2nition%

    3ome of t'e primitive data types supported 4y AX include strin1= +'ic' is 4asically a setof c'aracters% )'en you 'ave inte1er= +'ic' is a num4er +it'out a decimal point= and is # 4its+ide% )'en you 'ave a real primitive type= +'ic' is a num4er +it' a decimal point% Date=contains day= mont' and year% )ime= contains 'ours= minutes and seconds% )'en you 'ave$)CDate)ime= +'ic' is a com4ination of date and time types= and it also contains time

  • 8/19/2019 80670AE AX2012R3CU8 DEV1 ReferenceMaterial

    19/50

      ?it' t'at= +e are done +it' t'e demonstration to create a ne+ ED)%

    *esson ,& Creatin1 )a4lesIn t'is demonstration= +e +ill create a ne+ ta4le t'at +ill store t'e records for t'e species%

     )'ere are t+o 2elds on t'is ta4le called 3peciesID= +'ic' is an etended data type of(et3peciesID= and name= +'ic' etends from t'e name ED)% *ets ta;e a loo;%

    ?ell 2rst open a ne+ development +or;space and t'en epand t'e data dictionary node=and t'en ri1't:clic; on ta4les and select ne+ ta4le to create a ne+ ta4le% )'is creates a ta4lecalled )a4le !% In t'e property s'eet= lets c'an1e t'e name of t'is ta4le to (et3pecies)a4le%?ell also c'an1e t'e la4el of t'is ta4le to 3pecies% 9et +e need to add a couple of 2elds to t'ista4le% )o do t'at= Im 1oin1 to close t'e property s'eet= open a ne+ AO) +indo+ 4y clic;in1 ont'e AO) +indo+ in t'e tool4ar% I can alternatively press CtrlD% )'en Im 1oin1 to epand t'eetended data types= and t'en t'e 2rst 2eld +ere 1oin1 to add is t'e (et3peciesID% *etsepand t'e ta4les= t'e ta4le (et3pecies)a4le= and t'en dra1 t'e (et3peciesID into t'e 2elds nodeof t'e (et3pecies)a4le% )'is creates a ne+ 2eld called (et3peciesID% *ets open t'e propertys'eet% ?ere 1oin1 to c'an1e t'e name of t'is 2eld to 3peciesID%

     oull also see t'at t'e etended data type for t'is 2eld 'as 4een set as (et3peciesID% )'e net 2eld +e +ant to add to t'is ta4le is t'e name 2eld= so +e are 1oin1 to 1o into

    t'e etended data types= 2nd name= and t'en dra1 it on to t'e 2elds of (et3pecies)a4le% ?it't'at +ere done +it' de2nin1 t'e ta4le% ?e can save our c'an1es% As soon as +e save ourc'an1es 4y pressin1 Ctrl3= t'e ta4le is sync'roni*% ?it' t'at= +ere done +it' t'edemonstration to create a ne+ ta4le%

    *esson 6& IndeesIndees and data4ases are used to locate records% )'ey are stored separately in t'e data4aseand contain a ;ey t'at can 4e @uic;ly located in t'e inde and a reference to t'e record% -oreample= t'e Cust Id inde of t'e customer ta4le contains t'e account num4er of t'e customer%

     )'e account num4er is uni@ue and se@uenced% )'is is t'en used to @uic;ly loo; up t'e customerrecord t'rou1' t'e reference%

     )'ere are t+o types of indees& $ni@ue and non:uni@ue% If a uni@ue inde is created

    4ased on a column= AX ensures no duplicate ;ey values occur in t'at column% Also= updates on acolumn t'at contain a uni@ue inde= +'ic' violates t'e uni@ueness of t'e column= cause an error%9on:uni@ue indees are created for performance reasons% )'ey provide a @uic; +ay of retrievin1data instead of performin1 a full ta4le searc' of all t'e records in t'e ta4le%

    Do not create an inde if it is not needed 4ecause t'ey use system space and must 4eupdated every time data is created= edited or deleted% )'is can slo+ do+n t'e updatin1 process%o+ever= in most cases= t'e performance 1ained +'en selectin1 records far out+ei1's t'eperformance lost +'en updatin1%

    ?'en an inde is created= it is recommended to 1ive t'e inde a name reectin1 t'enames of t'e 2elds in t'e inde follo+ed 4y t'e su Id% An inde can 4e 4ased on eit'er oneor more 2elds t'at are part of t'e ta4le t'e inde is 4ein1 created on%

    Creatin1 an inde in AX al+ays relates to t'e ta4le +'ere its created% )'e inde can only4e created on 2elds t'at eist in t'e ta4le% )'ese indees can 4e uni@ue or non:uni@ue= and are4ased on a sin1le column or multiple columns t'at eist +it'in t'e ta4le% *ets ta;e a loo; at 'o+to create an inde on t'e 3peciesID 2eld in t'e (et3pecies)a4le%

    *ets 1o into t'e AO)= and under data dictionary ta4les= +ere 1oin1 to 2nd t'e(et3pecies)a4le% ere= ri1't:clic; on t'e indees node and select ne+ inde% )'is creates aninde called Inde !% *ets rename t'is inde to 3peciesId% )'en +ere 1oin1 to dra1 t'e3peciesID into t'e 3peciesId inde= and t'en in t'e property s'eet for t'e 3peciesId inde= letsset t'e allo+ duplicates to no= and +ell also set t'e alternate ;ey to yes%

    ?it' t'at= +ere done +it' creatin1 a ne+ inde% *ets save t'e ta4le% )'is concludes t'edemonstration to create a ne+ inde%

  • 8/19/2019 80670AE AX2012R3CU8 DEV1 ReferenceMaterial

    20/50

      A primary inde is one or more columns t'at uni@uely identify one record in a ta4le fromall t'e ot'er records% A primary inde is a uni@ue inde for a ta4le t'at is eit'er a surro1ate ;eyor one of t'e indees t'at are mar;ed as alternate ;eys% )o set an inde as a uni@ue inde= youcan set t'e inde property called allo+ duplicates to no% )o set an inde as t'e alternate ;ey=you can set t'e alternate ;ey property of t'e inde to yes%

    A typical eample of a primary ;ey is on t'e Cust)a4le= +'ere t'e customers Account9um 2eld is used as t'e primary ;ey% )'e Account 9um 2eld is used in t'e account Id inde=+'ic' is a uni@ue inde% )'is inde is t'en set as t'e primary inde for t'e Cust)a4le in t'eproperties of t'e ta4le%

    ?'en a primary inde is not speci2ed= AX uses a surro1ate ;ey as t'e primary inde% )'esurro1ate ;ey is used on many of t'e relations 4et+een ta4les%

    *ets no+ set t'e inde created in t'e previous demonstration on t'e (et3pecies)a4le to4e a primary inde% )'e 2rst t'in1 +e need to do is ma;e sure t'at t'e 3peciesId inde is auni@ue inde= so it 'as t'e allo+ duplicates property set to no= and also +e +ant to ma;e sure itsmar;ed as an alternate ;ey= so t'e alternate ;ey property is set to yes% )o set t'e 3peciesIdinde as a primary inde= 1o into t'e (et3pecies)a4le= and t'en 2nd t'e primary inde= property=and c'an1e t'is to 3peciesId% )'en save your c'an1es= and +it' t'at= youre done +it' t'edemonstration to set a primary inde on t'e (et3pecies)a4le%

    *esson 7& "elations"elations 4et+een ta4les are used to associate roles in one ta4le to roles in anot'er ta4le%"elations are used to enforce 4usiness rules across ta4les% )'ey can also 4e used to create auto

     5oins and forms= loo; up values in ot'er ta4les= or to validate data 4y providin1 constraints% )'eycan also 4e used to automatically propa1ate c'an1es from one ta4le to anot'er 4y de2nin1cascadin1 relations= and t'ey can 4e used to 1enerate 2eld 'elp%

    "elations'ips can 4e created 4et+een ta4les usin1 Morp'X% A ;ey t'in1 to note 'ere ist'at relations are de2ned +it'in t'e AX application and not at t'e p'ysical data4ase level%

    $nder t'e relations node= you can create diBerent types of relations'ips 4et+een t'eparent ta4le and ot'er ta4les in AX% 9ormal speci2es related 2elds in anot'er ta4le% Multiple2elds can 4e included in t'is relation% -or eample= t'e ta4le lo1istics postal address 'as arelation called state t'at de2nes t'e relation to t'e lo1istics address state ta4le% )'e valuesallo+ed in t'e state 2eld are limited= dependin1 on +'ic' country is entered%

    -ield 2ed and related 2eld 2ed are conditional relations% Conditional relations'ips can4e created 4y addin1 a condition to a ta4le relation% Only records t'at ful2ll t'e condition areincluded in t'e relation%

    A condition on a relation 2lters t'e records on eit'er t'e ta4le t'at contains t'e relationor t'e related ta4le= dependin1 on t'e type of condition% -ield 2ed speci2es t'at t'e condition ison t'e ta4le t'at contains t'e relation% "elated 2eld 2ed speci2es t'at t'e condition is on t'erelated ta4le%

    -ield 2ed and related 2eld 2ed are normally an enum%-orei1n ;ey speci2es a correspondence 4et+een a forei1n ;ey 2eld in t'e present ta4le to

    t'e primary ;ey 2eld in anot'er parent ta4le% A forei1n ;ey can 4e a primary ;ey or a sin1le 2eldalternate ;ey% ?'en it is a primary ;ey= t'e relation is on t'e primary ;ey 2eld% -or eample= acustomer account% ?'en it is a sin1le 2eld alternate ;ey= t'e relation is on t'e surro1ate ;ey=+'ic' is usually t'e rec ID

    *ets no+ ta;e a loo; at creatin1 a relation 4et+een t'e 4reed and t'e species ta4le% A4reed is related to t'e species ta4le in t'at a 4reed of *a4rador is related to t'e record do1 in t'especies ta4le% ou s'ould not 4e a4le to 'ave a 4reed of *a4rador 4e related to a species of cat=for instance%

    *ets start +it' updatin1 t'e (et3peciesID ED) to set t'e reference ta4le to 4e(et3pecies)a4le% )o do t'is= Im 1oin1 to 1o into t'e data dictionary= etended data types= and2nd (et3peciesID% Im 1oin1 to ri1't:clic; on t'is and 1o to t'e properties s'eet and set t'ereference ta4le to (et3pecies)a4le% )'en +ere 1oin1 to epand t'e ta4le references node= ri1't:clic; on ta4le references= and create a ne+ ta4le reference%

  • 8/19/2019 80670AE AX2012R3CU8 DEV1 ReferenceMaterial

    21/50

      )'en +e need to ma;e sure t'at t'e related 2eld is set to 3peciesID% After t'at +e cansave our c'an1es to 4e (et3peciesID ED)% ?'en +e 1et a dialo1ue to sync'roni

  • 8/19/2019 80670AE AX2012R3CU8 DEV1 ReferenceMaterial

    22/50

    -inally= +e discussed t'e concept of vie+s and 'o+ it can 'elp present a simpli2ed vie+ of acomple @uery%

     

    Module Jey )a;e A+ay

    o Introduction to Morp'X and t'e AO)

    AO) contains all t'e elements of t'e AX application%

    Data dictionary contains elements related to t'e data model suc' as

     )a4les= ED)s= Maps= Enums= (ie+s

    o  )a4les

    3tore data

    3ync'roni* data4ase

    AErd +e4site contains information a4out data models

    Delete Actions are important to set correctly

    o Data )ypes

    /rimitive data types

    Etended Data )ypes

    "ecommended to use ED)s

    ED)s can etend from primitive types or ot'er ED)s

    o Indees

    Improve performance of reads from t'e data4ase

    Can 4e used to create primary indees

    3urro1ate ;eys are 4ased on "ecId

    o "elations

    $sed to associate data 4et+een ta4les

  • 8/19/2019 80670AE AX2012R3CU8 DEV1 ReferenceMaterial

    23/50

    Enforce 4usiness rules

    Create auto 5oins= loo;ups and validate data t'rou1' constraints

    9ormal relation= -ield -ied= "elated -ield -ied and -orei1n Jey

    relations are supported

    o ase Enums

    /rede2ned set of values%

    Can 4e referred to usin1 a literal name in code

    3tored as an inte1er in t'e data4ase

    o (ie+s

    3ync'roni*

    Data retrieved dynamically at runtime 4ased on t'e vie+ de2nition

    Can 4e used to retrieve focused data from comple @ueries from

    multiple ta4les

    Module & /ractices• /ractice %!& Create a 9e+ ED)

    • /ractice %& Create a 9e+ )a4le

    • /ractice %#& Create a /rimary Inde

    • /ractice %.& Create a "elation

    • /ractice %,& Add an Enum

      Module & )'in1s to t'in; a4out& 777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777

     777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777 777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777 777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777

     777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777

     777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777 777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777

     777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777

     777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777

     777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777 777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777

     777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777

  • 8/19/2019 80670AE AX2012R3CU8 DEV1 ReferenceMaterial

    24/50

     777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777 77777777777777777777777777777777777777777777777777777777777777777777777777777777 

  • 8/19/2019 80670AE AX2012R3CU8 DEV1 ReferenceMaterial

    25/50

      Module #& $ser Interfaces

    Module #& $ser Interfaces (ideo )ranscript

    *esson !& Module Overvie+ )'is module discusses developin1 user interfaces usin1 t'e AX model driven arc'itecture +it'out'avin1 to +rite code% In t'is module= +ell loo; at usin1 t'e features of Morp'X and t'e AO) tocreate user interfaces% ?ell revie+ t'e 4asics of +or;in1 +it' forms in AX= t'en +ell tal; morea4out 5oinin1 multiple data sources in a form% After t'at= +ell revie+ 'o+ to create menu itemsfor forms% 9et= +ell loo; at t'e various form templates t'at are availa4le in AX% -inally= +elldiscuss t'e components of list pa1es and 'o+ to create -actoes%

    *esson & -orms-orms are t'e primary met'od of interaction 4et+een AX and t'e end user% y understandin1and eplorin1 eistin1 forms= ne+ forms can 4e developed +'ile retainin1 t'e same loo; and feel

    as standard AX forms%-orms are composed of a fe+ cate1ories of elements& Met'ods= data sources= parts=desi1ns and permissions% -orm met'ods are 4loc;s of X code t'at= for eample= are eecuted+'en openin1 or closin1 t'e form%

    -orm met'ods are discussed in later development courses% )'is module discusses data sources= desi1ns and parts% )'e net module +ill discuss

    permissions%3everal diBerent standard form desi1ns are availa4le for use in diBerent situations% )o

    4etter understand forms and t'eir desi1n= lets ta;e a loo; at a fe+ forms t'at are availa4le int'e application%

    In t'is demonstration= lets ta;e a deeper loo; at a fe+ of t'e forms t'at are availa4le inAX to understand t'e elements of a form% *ets start 4y ta;in1 a loo; at t'e Cust)a4le*ist/a1e%

     )o do t'at= Im 1oin1 to 1o into t'e accounts receiva4le module= and under common= customers=select t'e all customers menu item% )'is opens t'e Cust)a4le*ist/a1e= customers list pa1e= and+'at you see is at t'e center of t'is list pa1e is a 1rid +'ic' displays t'e list of customers%

    A4ove t'is 1rid= +e 'ave a 2lter pane +'ic' I can use to 2lter t'e data t'ats s'o+n in t'e1rid% -or instance= if I +ant to s'o+ only customers +'ose name starts +it' Contoso= I couldtype Contoso 'ere and press enter= and t'is +ill 2lter t'e 1rid to only s'o+ customers +'osename starts +it' Contoso%

    A4ove t'e 2lter pane= I 'ave an action pane +'ic' 'as a set of action pane ta4s= andeac' of t'ese action pane ta4s 'ave a set of 4uttons +'ic' 'elp you perform actions related tot'e particular list pa1e%

    DiBerent list pa1es may 'ave a diBerent set of 4uttons%-or instance= on t'e customers list pa1e= +e 'ave t'e a4ility to create a ne+ customer=

    edit t'e selected customer= maintain t'eir :: set up t'eir 4an; accounts and so on% )o t'e ri1't of t'is list pa1e are a set of -actoes% -actoes display information from

    ot'er ta4les t'at are related to t'e currently 'i1'li1'ted customer record%At t'e 4ottom of t'is list pa1e is a previe+ pane t'at displays additional information from

    t'e customer ta4le for t'e selected record%As I c'an1e t'e selected record= t'e information in t'e -actoes and t'e previe+ pane

    c'an1es%*ets no+ ta;e a loo; at t'e desi1n for t'is particular list pa1e% )o do t'at= Im 1oin1 to

    select personali

  • 8/19/2019 80670AE AX2012R3CU8 DEV1 ReferenceMaterial

    26/50

      Clic;in1 t'e edit 4utton opens t'e Cust)a4le*ist/a1e in t'e AO)% All forms 'ave a similarset of root nodes% )'ey 'ave met'ods= data sources= parts= desi1ns and permissions% Datasources contain t'e list of @ueries and ta4les from +'ic' t'e form sources its data

    *ets epand t'e desi1n node% ?e can no+ loo; at t'e action pane= and youll notice t'att'e action pane 'as a set of action pane ta4s +'ic' correspond to t'e action pane ta4s on t'eactual list pa1e%

    ?e 'ave t'e 'ome ta4= t'e sell ta4= t'e invoice ta4 and collect ta4% 3imilarly= you 'avet'e 'ome ta4= +'ic' is t'e customer= t'e sell= t'e invoice= and collect%

    Epandin1 t'e 'ome ta4= +e 'ave a set of 4utton 1roups suc' as ne+ 1roup= maintain1roup= customer accounts 1roup% )'is corresponds to t'e 4utton 1roups on t'e 'ome ta4= t'ene+= t'e maintain and t'e accounts%

    Epandin1 one of t'ese 4utton 1roups= +e see a set of menu item 4uttons= t'e edit= editlist and delete= +'ic' correspond to t'e edit= edit in 1rid and delete%

     )'en +e 'ave t'e 1rid control= +'ic' contains a set of strin1 controls +'ic' are 4ound tot'e correspondin1 2elds on t'e ta4le= and you 'ave t'e same set of controls on t'e 1rid% ou'ave t'e name= t'e customer account and telep'one= and if +e loo; at t'e AO)= +e 'ave t'ename= t'e customer account and t'e telep'one%

    *ets no+ ta;e a loo; at a diBerent form% )o do t'at= +ere 1oin1 to ta;e a loo; at t'edetail form for customers% Im 1oin1 to 'it edit on t'e Contoso Europe customer% )'is opens t'ecustomer detail form% ere youll notice t'at t'eres also an action pane at t'e top and a set of-actoes on t'e ri1't= 4ut t'e center of t'is form is a set of fast ta4s +'ic' display additionalinformation a4out t'e customer%

    If +e loo; at t'e desi1n for t'is particular customer 4y clic;in1 t'e personali

  • 8/19/2019 80670AE AX2012R3CU8 DEV1 ReferenceMaterial

    27/50

      In t'is demonstration= +ell create a form t'at +ill 4e used to vie+= create and editrecords in t'e (et3pecies)a4le%

     )o create t'e form= lets 1o into t'e AO)% In t'e AO)= +ere 1oin1 to 1o into t'e formsnode= ri1't:clic; on t'e forms node= and select ne+ form% )'e form t'at opens= lets 1o into t'eproperties s'eet and c'an1e t'e name of t'e form to (et3pecies)a4le% ?ell t'en 1o into t'edata dictionary and 2nd t'e (et3pecies)a4le% )o do t'at= Im 1oin1 to open t'e data dictionary ina ne+ +indo+% Im 1oin1 to close t'e properties s'eet to 1et some more space= epand ta4les% I'ave t'e (et3pecies)a4le% Ill t'en epand t'e forms node and dra1 t'e (et3pecies)a4le into t'edata sources node of t'e (et3pecies)a4le form%

     )'en Im 1oin1 to epand t'e desi1ns node and clic; on desi1n= ri1't:clic;= and say ne+control= and select 1rid% )'is creates a ne+ 1rid control for t'e (et3pecies)a4le% I can t'en opent'e (et3pecies)a4le data source in a ne+ +indo+ and t'en dra1 t'e 2elds name and 3peciesIDfrom t'e (et3pecies)a4le data source into t'e 1rid%

    -or t'e desi1n node= Im 1oin1 to c'an1e t'e property for t'e caption to species% I canno+ save t'e c'an1es to t'is form= and t'en lets open t'is form 4y ri1't:clic;in1 on t'e formand selectin1 open% )'is lets us create ne+ species% -or instance= I can create a species calledcat +it' a 3peciesID called cat= t'en create anot'er species called do1 +it' t'e 3peciesID do1=and press close% *ets ta;e a loo; at t'e ta4le= t'e (et3pecies)a4le% Open t'is= and youll seet'at t+o ne+ records 1ot created for cat and do1 in t'e ta4le%

    ?it' t'at= +e come to t'e end of t'e demonstration to create a ne+ form% As you cansee= its really easy to create ne+ forms +it'in AX and 4ind t'em to ta4les +it'out 'avin1 to+rite any code%

    *esson #& oinin1 Data 3ources  In t'e previous demonstration and practice= +e created t+o separate forms= one forcreatin1 species and t'e ot'er for creatin1 4reeds% 9o+= instead of creatin1 t+o forms for t'especies and 4reed ta4les= 4ot' ta4les could 4e placed on t'e same form and 5oined to1et'er toma;e t'e vie+in1 and creatin1 of records simpler%

    *ets try to do t'at no+ in a demonstration%In t'is demo= +ere 1oin1 to modify t'e (et3pecies)a4le form to add a second data

    source% )'e second data source is 1oin1 to 4e t'e (etreed)a4le% )'is +ill let us edit 4ot'

    species and 4reeds from 5ust one form% )o do t'is= t'e 2rst t'in1 +ere 1oin1 to do is 2nd t'e(et3pecies)a4le form% $nder data sources= youll see t'at t'eres 5ust one data source 'ere= t'e(et3pecies)a4le% Im 1oin1 to add a second data source to t'e (etreed)a4le% )o do t'is= letsopen a ne+ AO) +indo+ 4y pressin1 CtrlD% )'en from t'e data dictionary= +ere 1oin1 toepand ta4les and dra1 t'e (etreed)a4le from t'e data sources :: from t'e ta4les into t'e datasources% )'en in t'e property s'eet for (etreed)a4le= +ell set t'e 5oin source to 4e(et3pecies)a4le

     )'e system +ill automatically use t'e relations created in t'e previous module to lin; t'ecorrect records to1et'er%

    After t'at= +ere 1oin1 to 1o into t'e desi1ns node and ri1't:clic; on t'e desi1n and add ane+ control= a 1rid control% ?ell set t'e data source for t'is 1rid control to 4e (etreed)a4le=and t'en lets move t'is 1rid control do+n= and t'en +ere 1oin1 to add t'e 2eld from t'e 4reed

    ta4le= t'e 4reed ID and t'e name into t'e ne+ 1rid 4y dra11in1 t'ose 2elds into Grid !%?e t'en +ant t'e t+o 1rids to 4e s'o+n side 4y side% )o do t'at= Im 1oin1 to 1o into t'e

    desi1n node and c'an1e t'e columns property from one to t+o% ?it' t'is= Im done +it'modifyin1 my form to add t'e second data source% *ets save it= and t'en open t'e form to ta;ea loo;%

     )'e left:'and side s'o+s data from t'e species ta4le% On t'e ri1't side= +e see datarelevant to t'e selected species from t'e 4reed ta4le% 3o if +e= for instance= create a ne+ 4reedcalled *a4rador for do1= +'en I 1o into cat= youll see t'at t'ere are no 4reeds for cat= 4ut assoon as I select do1= Ill see t'e 4reeds t'at 'ave 4een created for do1%

    If I 1o into t'e ta4le for t'e (etreed)a4le and open it= Ill see t'at t'e 3peciesID 'as 4eenset correctly to do1 for *a4rador%

  • 8/19/2019 80670AE AX2012R3CU8 DEV1 ReferenceMaterial

    28/50

      ?it' t'is= +e conclude t'e demonstration on 'o+ to add a second data source to a form%

    *esson .& Menu Items ou can use menu items to activate application o45ects from t'e user interface% Menu propertiesinclude properties suc' as name= +'ic' is t'e name of t'e menu item= t'e la4el= +'ic' is +'atappears for t'e menu item in t'e application= t'e o45ect type= +'ic' de2nes t'e type of o45ectt'is item points to suc' as a form or a report= and t'e o45ect= +'ic' is t'e actual o45ect t'at t'is

    item points to% )'ere are t'ree types of menu items t'at can 4e created& Display menu items= +'ic' are

    used for formsF output menu items= +'ic' are used for reportsF and action menu items= +'ic' areused for runnin1 processes or eecutin1 X code%

    Output and action menu items are discussed in ot'er development courses%Display menu items open o45ects t'at appear on screen= typically forms% -or eample=

    clic;in1 t'e customers menu item in t'e accounts receiva4le module opens t'e Cust)a4le listpa1e form% )'is display menu item points to t'e form o45ect Cust)a4le*ist/a1e% )'ere are t+oimportant properties to notice& )'e o45ect type is a form= and t'e o45ect is Cust)a4le*ist/a1e%

    In t'is demonstration= +ell create a menu item for t'e (et3pecies)a4le form and add t'ismenu item to t'e accounts receiva4le area pa1e%

    *ets start 4y epandin1 t'e menu items node% Im 1oin1 to open t'is in a ne+ +indo+=

    and t'en +ell epand forms to 2nd t'e (et3pecies)a4le form% Im 1oin1 to dra1 t'e(et3pecies)a4le form on to t'e display node of t'e menu items% )'is creates a ne+ menu itemfor t'e (et3pecies)a4le form%

    *ets 1o into t'e properties s'eet and c'an1e t'e la4el to species% ?eve no+ created amenu item for t'e (et3pecies)a4le form% *ets no+ add t'is menu item to t'e accountsreceiva4le menu% )o do t'at= Im 1oin1 to 1o 4ac; to my 2rst AO)= epand menus= accountsreceiva4le% ?ell put t'is menu item on t'e setup section% Im 1oin1 to create a ne+ su4menu%?ell call t'is su4menu vet sur1ery= and +ell c'an1e t'e su4menu name to vet sur1ery% Im t'en1oin1 to dra1 t'e (et3pecies)a4le display menu item under vet sur1ery%

    *ets no+ save our c'an1es to t'e menu% I can t'en start a ne+ application instance= 1ointo accounts receiva4le% ou no+ see under setup a ne+ su4menu called vet sur1ery= and t'especies menu item% If +e select t'is= its 1oin1 to open t'e (et3pecies)a4le form% ?it' t'at= +e

    come to t'e end of t'e demonstration to create a ne+ menu item%

    *esson ,& -orm )emplates  -orm templates ena4le you to create t'e correct form type +it' t'e appropriate controlsand to ;eep t'e desi1n consistent across t'e application% *ets revie+ some of t'e templatest'at are availa4le in AX% )'e list pa1e form template is used as a main entry into a module%

     )'en you 'ave a details form master template= +'ic' is used to vie+ and edit master data% )'edetails form transaction template can 4e used to vie+ and edit transactional and +or;s'eet data%

     )'e simple list details template can 4e used for reference and setup data% 3imple list templatescan 4e used for 4asic in@uiries% )a4le of contents templates can 4e used for modulecon21uration parameters% Dialo1ue templates are used for @uic; user interaction= and t'en you

    'ave t'e drop dialo1ue template= +'ic' can 4e used to enter or update a very small amount ofdata%AX s'ips +it' a num4er of forms t'at ma;e use of t'ese templates% *ets revie+

    eamples of t'ese templates no+ +it'in AX%-irst= lets loo; at a list pa1e template% An eample of t'is is under accounts receiva4le=

    common customers= all customers% )'is displays a list pa1e for all of t'e customers% )'en +e'ave t'e details form master template% An eample of t'is is +'at you +ould 2nd +'en you clic;on edit customer% )'is lets you edit t'e details for a master record%

     )'en lets loo; at t'e details form transaction template% -or t'is +ere 1oin1 to 1o 4ac;into t'e application and 1o into sales and mar;etin1= and t'en common= sales orders= all salesorders= and t'en clic; on edit for one of t'e sales orders%

  • 8/19/2019 80670AE AX2012R3CU8 DEV1 ReferenceMaterial

    29/50

      )'en lets ta;e a loo; at a simple list details% -or t'is= +ere 1oin1 to 1o into 1eneralled1er= setup= currency= and t'en clic; on currencies% )'en +e 'ave a simple list template for+'ic' +e can 2nd in master plannin1= and t'en under in@uiries= 1o to processes= and t'en clic;on planned orders lo1%

     )'e net form template +ell loo; at is t'e ta4le of contents form template= +'ic' +e can2nd under accounts paya4le= setup= accounts paya4le parameters% ere +e 'ave a set of itemson t'e left +it' content to t'e ri1't%

     )'en +e 'ave a dialo1ue template= +'ic' +e can 2nd under product informationmana1ement= products= products= and t'en clic; on ne+ product%

     )o create a form usin1 a template= +e can do t'is from t'e AO)% *et me open a ne+instance of t'e AO)% And t'en under forms= +e +ould select ne+ form from template and selectt'e type of template t'at +e +ant to use%

    ?it' t'at= +e come to t'e end of t'e demonstration on t'e diBerent types of formtemplates%

    *esson 6& *ist /a1es*ist pa1es are t'e primary met'od of displayin1 data in AX% )'ey can s'o+ lots of data frommany ta4les in a num4er of diBerent formats% )'ey 'ave consistent desi1ns and functions andcan easily 4e displayed in t'e Enterprise /ortal% A typical list pa1e consists of t'e follo+in1

    elements& )'e 1rid displays a list of records% It displays only a fe+ of t'e most important 2eldsfor eac' record% )'e 2lter pane is used to enter searc' criteria% )'is 2lters t'e list in t'e data1rid to s'o+ only t'e records +'ic' an end user is interested in% )'e previe+ pane displays more2elds a4out t'e selected record% )'is 'elps to ensure youve selected t'e correct record in yoursearc'%

    -actoes display more information a4out t'e selected record from related ta4les% )'eaction pane contains menu items you can use to do typical tas;s related to t'e 'i1'li1'tedrecord%

    In t'is demonstration= +ell learn 'o+ to add a menu item to an eistin1 list pa1e% *etsta;e a loo; at 'o+ you can add t'e menu item to t'e pets form t'at +e created in t'e practice tot'e Cust)a4le*ist/a1e form%

    *ets 2rst open t'e Cust)a4le*ist/a1e= and t'en +ell open t'is in desi1n mode% Im 1oin1

    to clic; on personali

  • 8/19/2019 80670AE AX2012R3CU8 DEV1 ReferenceMaterial

    30/50

    and not for $3 07% )'is is done 4ecause +e set t'e data source property on t'e menu item4utton to 4e Cust)a4le%?it' t'is= +e are done +it' t'e demonstration to add a menu item to an eistin1 list pa1e%

    *esson 7& -actoes  A -acto is a small selection of data related to t'e current record in t'e list pa1e% )'ereare t'ree types of -actoes%

    Info/arts 'ave its o+n data source and a num4er of controls% )'ey are limited in +'atcan 4e displayed% o+ever= Info/arts are simple and @uic; to create and can also 4e displayed int'e Enterprise /ortal%

    A form part is a lin; to a form% )'e form can 'ave t'e same controls as a standard form%o+ever= since t'is is displayed in a -acto= addin1 too many controls can cro+d t'e part%

    Cues display a count of t'e num4er of records related to t'e current record in t'e listpa1e% -or eample= it mi1't s'o+ t'e num4er of outstandin1 invoices for a customer%

    In t'is demonstration= +ell create a ne+ -acto and add it to a list pa1e% *ets create asimple -acto to display t'e customer specs%

    efore +e can create a -acto= +e 2rst need to create a @uery% 3ince t'is -acto is1oin1 to s'o+ t'e list of pets for a customer= +ere 1oin1 to create a @uery t'ats 1oin1 to 4ereturnin1 data from t'e (etCust/et)a4le ta4le t'at +e 'ad created previously in our practice% )o

    create a @uery from t'e AO)= you need to ri1't:clic; on t'e @ueries note and select ne+ @uery% )'en in t'e properties s'eet for t'is @uery= lets rename t'e @uery to (etCust/etInfo/art% )'en+e need to add t'e (etCust/et)a4le ta4le into t'e data sources for t'is @uery% )o do t'at= Im1oin1 to open a second AO) +indo+= epand t'e data dictionary ta4les= and dra1 t'e(etCust/et)a4le into t'e data sources node%

     )'e net t'in1 +e need to do is set t'e 2elds dynamic property to yes% )'is ma;es suret'at all of t'e 2elds t'at are on (etCust/et)a4le are included in t'e @uery%

     )'e net t'in1 t'at +e need to do is locate t'e (etreed)a4le and add it as a data sourceunder (etCust/et)a4le%

    *ets dra1 t'is (etreed)a4le under t'e data sources of (etCust/et)a4le%?e are t'en 1oin1 to set t'e dynamic property on t'e (etreed)a4le to also yes= and

    t'en on t'e (etreed)a4le= +ere 1oin1 to set t'e relations property to yes% ?e no+ 'ave a

    @uery t'ats 1oin1 to return all of t'e pets for a customer alon1 +it' t'e information a4out t'e4reed for t'e 1iven pet%

    9o+ I can save t'is @uery 4y pressin1 Ctrl3% After t'is= I can create a ne+ Info/art%?ere 1oin1 to do t'at 4y epandin1 t'e parts node= ri1't:clic; under Info/art= and select ne+Info/art%

    ?ere 1oin1 to 1o to t'e properties s'eet for t'is Info/art= and Im 1oin1 to call t'is(etCust/etInfo/art% -or t'e caption= +ere 1oin1 to call t'is pets= and +ere 1oin1 to c'an1e t'e@uery to 4e t'e @uery t'at +e created= +'ic' is (etCust/etInfo/art% Ive no+ created t'eInfo/art= and I can epand t'e Info/art%

    On t'e layout node= Im 1oin1 to ri1't:clic; on t'e layout node and select ne+ 1roup% Ont'is ne+ 1roup= +e +ant to create a set of 2elds to display t'e name of t'e pet as +ell as t'e4reed of t'e pet% ecause t'is is 1oin1 to 4e a list of pets= Im 1oin1 to c'an1e t'e repeatin1

    property to 4e yes% )'is ma;es sure t'at t'e Info/art renders as a ta4le% )'en Im 1oin1 to add a couple of 2elds to t'is Info/art% )'e 2rst 2eld is 1oin1 to 4e

    4ased on t'e (etCust/et)a4le and t'e data 2eld is 1oin1 to 4e t'e name of t'e pet% )'e second2eld is 1oin1 to 4e 4ased on t'e (etreed)a4le= and t'e name 2eld of t'e reed)a4le +ill 4e t'edata 2eld%

    ?e can no+ save t'e c'an1es to t'e Info/art% At t'is point +e are ready to add t'eInfo/art to our list pa1e% efore +e do t'at= +e need to create a ne+ menu item for t'e Info/art%

     )o do t'is= Im 1oin1 to navi1ate to t'e menu items and t'en dra1 t'e Info/art from t'e Info/artnode into t'e display node of t'e menu items% I can no+ save t'is%

    9et Im 1oin1 to locate t'e (etCust/et)a4le ta4le and create a ne+ inde on customeraccount% 3o far +eve not created an inde on CustAccount on (etCust/et)a4le% Addin1 an inde

  • 8/19/2019 80670AE AX2012R3CU8 DEV1 ReferenceMaterial

    31/50

    is 1oin1 to ma;e accesses to t'is ta4le on t'e customer account num4er more ecient% 3o letscreate a ne+ inde% ?ell call t'is inde CustId= and t'en +ere 1oin1 to dra1 t'e CustAccountas a 2eld +it'in t'e inde%

    *ets save c'an1es to t'is ta4le% And no+ lets add t'e Info/art to t'e Cust)a4le*ist/a1e% )o do t'is= Im 1oin1 to navi1ate to t'e form for t'e Cust)a4le*ist/a1e in t'e AO)= and t'en Im1oin1 to dra1 t'e menu item t'at +e created on to t'e parts node% ?ell dra1 t'e(etCust/etInfo/art on to t'e parts node of Cust)a4le*ist/a1e% )'is adds t'e Info/art on to t'eCust)a4le*ist/a1e% I can no+ save t'e list pa1e%

    And t'en in t'e property s'eet for t'e ne+ reference= +ere 1oin1 to set t'e data source=relation to t'e (etCust/et)a4le%CustAccount% *ets no+ save t'e c'an1es to t'is list pa1e andt'en open t'e list pa1e from AX% Im 1oin1 to 1o 4ac; into t'e list pa1e= and youll see t'eres ane+ -acto t'at s'o+s t'e list of pets%

    ?'en I select $%3% 07 its s'o+in1 me t'at t'eres one pet% If I select DE 00!= its 1oin1to s'o+ me t'e t+o pets t'at are part of t'e DE 00! customer%

    ?it' t'is= +e come to t'e end of t'e demonstration on creatin1 a ne+ -acto%

    *esson and Module 3ummary In t'is module= +e discussed 4uildin1 user interfaces in t'e AO)% ?e 2rst loo;ed at t'e

    various elements of a form and eamined t'ese for a selection set of forms in t'e AO)% )'en +esa+ 'o+ to create a ne+ form and add a second data source to t'e form%

    After t'at= +e discussed t'e process for creatin1 a ne+ menu item for a form%9et +e revie+ed t'e diBerent form templates t'at are availa4le in AX% -inally= +e

    eamined list pa1es and discussed t'e process of creatin1 -actoes%

    Module # Jey )a;e A+ayo -orms

    Contain Met'ods= Data 3ources= /arts= Desi1ns= and /ermissions

    $sed to display data and manipulate data from t'e Application

    Can set properties on data sources to control +'et'er t'e form allo+s

    create= delete= edit operations

    o  oinin1 Data 3ources

    One form can 4e used to display data from multiple datasources%

    $se t'e oin3ource property to lin; datasources%

    3pecify t'e datasource on t'e 1rid or control

    o Menu Items

    $sed to provide access to forms= reports etc% from +it'in t'e

    application

  • 8/19/2019 80670AE AX2012R3CU8 DEV1 ReferenceMaterial

    32/50

    Action N typically used for runnin1 processes

    Display N typically used for forms

    Output N typically used for reports

    o -orm )emplates

    $sed to provide consistent desi1n across application

    3upports a num4er of out of t'e 4o templates&

    • *ist /a1e

    • Details -orm Master

    • Details -orm )ransaction

    • 3imple *ist Details

    • 3imple *ist

    •  )a4le of Contents

    • Dialo1

    • Drop Dialo1

    o *ist /a1es

    /rimary met'od of displayin1 data in AX% Can s'o+ lots of data from

    many ta4les

    Contain -act oes= Action /ane= Grid= -ilter /ane and /revie+ /ane

    o -act oes

    Display data related to selected record

    Info parts= -orm /arts and Cues

    Module #& /ractices• /ractice #%!& Create a -orm

    • /ractice #%& Create a -orm from a )emplate

  • 8/19/2019 80670AE AX2012R3CU8 DEV1 ReferenceMaterial

    33/50

      )'in1s to t'in; a4out& 777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777

     777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777 777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777

     777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777 777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777 777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777

     777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777

     777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777 777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777

     777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777

  • 8/19/2019 80670AE AX2012R3CU8 DEV1 ReferenceMaterial

    34/50

      Module .& 3ecurity

    Module .& 3ecurity (ideo )ranscript

    *esson !& Module Overvie+ )'is module discusses t'e security arc'itecture of AX and 'o+ you can use it to de2ne access tot'e AX application and data% ?ell 2rst descri4e t'e elements of role 4ased security in MicrosoftDynamics AX% )'en +ell loo; at t'e process to set up a ne+ user and assi1n t'e user to a role%After t'at= +ell discuss 'o+ you can edit duties on a role and privile1es on a duty%

    9et +ell loo; at 'o+ to edit permissions assi1ned to a privile1e% -inally= +ell discuss'o+ you can use t'e AX security frame+or; to investi1ate t'e access 1ranted to a user andsearc' for roles +it' access to a menu item%

    "ole 4ased security provides an etensi4le frame+or; for de2nin1 access to t'e MicrosoftDynamics AX application and data% )'e security role relates to a 5o4 role t'at an end user 'as+it'in an or1ani

  • 8/19/2019 80670AE AX2012R3CU8 DEV1 ReferenceMaterial

    35/50

      )'e t'ird cate1ory are service operations t'at are used in document service classes int'e Application Inte1ration -rame+or;= or AI-% AI- ec'an1es data +it' eternal systems 4ysendin1 and receivin1 XM* documents%

    9et lets ta;e a loo; at permissions%/ermissions refer to t'e access levels t'at can 4e applied to secura4le o45ects suc' as

    ta4les= forms= 2elds= reports or server side met'ods t'at are accessi4le t'rou1' an entry point%/ermissions are maintained 4y a developer in t'e Application O45ect )ree%

    *ets ta;e a loo; at permissions on a particular form= on a speci2c form to understand t'is4etter% ?ell ta;e a loo; at t'e permissions on t'e Cust)a4le form in t'is eample%

    On t'e Cust)a4le form= t'ere is a node called permissions= +'ic' if +e epand= +e seet'ere are four diBerent permissions t'at are possi4le% )'eres read= update= create and delete%?'at t'is is sayin1 is t'at t'is particular form= t'e Cust)a4le form= can 4e opened in eit'er read=update= create or delete mode= and +'en it is opened in eac' of t'ese modes= +e can 1ivespeci2c access to t'e various controls= sta4les= server met'ods and associated forms on t'isparticular form%

    -or instance= if t'e form is open in read mode= t'e user +ould 'ave eBective access ofread to t'e company info ta4le% )'ey +ould 'ave eBective access of read to Cust)a4le andeBective access of read to t'e Dir/arty/ostalAddress(ie+%

    If +e loo; at t'e permissions +'en t'e form is opened in update mode= t'e Cust)a4leprovides eBective access of update= 4ut t'e user only 'as an eBective access of read to t'eDir/arty/ostalAddress(ie+%

     )'ere are a num4er of diBerent eBective access t'at are availa4le to 4e set 'ere% -orinstance= you 'ave no accessF t'is implies t'at t'e user does not 1et any access to t'e data%"ead access implies t'at an end user can vie+ data% $pdate access implies t'at an end user canvie+ and edit data% Create access implies t'at an end user can vie+= edit= create ne+ data%Correct access implies t'at an end user can vie+= edit= create= ne+ and correct date eBectiverecords +it'out creatin1 ne+ records% And 2nally= t'e delete option implies t'at an end user canvie+= edit= create= ne+ and delete data%

    /ermissions t'at 1ive access to reports or classes need to only 'ave access or not 'aveaccess% *i;e I mentioned= reports are typically 1iven read access= and classes are typically 1ivendelete access%

    /ermissions t'at 1ive access to ta4les or 2elds can ma;e use of all t'e access levels% )'epossi4le permission levels are de2ned on t'e entry point tar1et% -or eample= a form mi1't allo+permission levels to read= update= create or delete% )'e level to 4e 1ranted to an end user isde2ned on t'e permission itself%

    *ets no+ ta;e a loo; at privile1es% ou can 2nd privile1es under t'e security node in t'eAO)% A privile1e is a 1roup of related permissions t'at are re@uired to perform a duty% /rivile1escan 4e assi1ned directly to roles% o+ever= for easier administrative maintenance and also touse dese1re1ation of duties feature= it is recommended to 1roup privile1es into duties and t'enassi1n duties to roles%

    /rivile1es are typically maintained 4y t'e developer in t'e AO)% o+ever= t'ey can also4e maintained 4y a system administrator in t'e ric' client% A 4est practice is for privile1es to 4emaintained in t'e AO) and to assi1n privile1es to duties%

    *ets ta;e a loo; at a couple of eamples for privile1es% ?ell continue +it' t'e Cust)a4leeample% ere +ere 1oin1 to loo; at t'e privile1es for Cust)a4leMaintain and Cust)a4le(ie+% )'e Cust)a4leMaintain privile1e 'as as entry points t'e Cust)a4le menu item% If you loo;

    at t'is entry point in t'e property s'eet= youll see t'at its pointin1 to t'e Cust)a4le menu itemdisplay and providin1 access level of delete% ?'at t'is means is if a user 'as t'e privile1e forCust)a4leMaintain t'rou1' t'e duties or t'e role t'at 'e is assi1ned= t'en +'en t'ey try to clic;on t'e Cust)a4le menu item= display menu item= t'ey +ould open t'at tar1et= +'ic' +ould 4eCust)a4le= +it' a permission set of delete% )'eyd 1et all of t'e permissions t'at are de2ned ont'e Cust)a4le form under t'e delete node%

    9o+= if +e loo; at t'e Cust)a4le(ie+ privile1e= +e 'ave t'e Cust)a4le menu item as entrypoint 'ere= 4ut youll notice t'at t'e access level= +'en someone 'as t'e Cust)a4le(ie+privile1e= is read% ?'at t'is means is if someone +'o 'as Cust)a4le(ie+ access clic;s on t'e

  • 8/19/2019 80670AE AX2012R3CU8 DEV1 ReferenceMaterial

    36/50

    display menu item for Cust)a4le= t'ey +ould open t'e Cust)a4le form +it' a permission level ofread%

    9et lets ta;e a loo; at duties% efore t'at= youll also notice t'at you can 'avepermissions de2ned directly under privile1e= 4ut its easier to de2ne permissions on t'e tar1etitem%

    *ets ta;e a loo; at duties% Duties are a 1roup of related privile1es t'at are re@uired toperform a tas;% Duties are usually 1rouped into process cycles= and process cycles are used int'e ric' client to ma;e it easier for a system administrator to vie+ and 2nd related duties +'ensettin1 up security%

    -inally= +e 'ave :: under process cycle= you 'ave a set of duties= and 2nally +e loo; atroles% "oles are a 1roup of duties t'at are re@uired 4y an end user to do 'is or 'er 5o4 4ased ont'e end users role in t'e or1ani

  • 8/19/2019 80670AE AX2012R3CU8 DEV1 ReferenceMaterial

    37/50

    ?ere 1oin1 to clic; on net= and +ere done +it' t'is +i

  • 8/19/2019 80670AE AX2012R3CU8 DEV1 ReferenceMaterial

    38/50

      ?it' t'at= +eve added t'e in@uire into service orders to t'e role content for t'e accountsreceiva4le mana1er% Duties can also 4e assi1ned to a role in t'e security node under t'e rolesnode in t'e AO)%

    ere you can dra1:and:drop duties from t'e security duties node to t'e role% ust note= ifyou ma;e c'an1es to roles from +it'in t'e ric' client= to see t'ese c'an1es= you may need torefres' t'e elements in t'e AO) so t'at t'e c'an1es made in t'e client are visi4le% )o do t'at=you can clear t'e cac'es 4y usin1 t'e tools menu under cac'es and selectin1 refres' elements%

    ?it' t'is= +e are done +it' t'e demonstration to add duties to an eistin1 role%

    *esson 6& C'an1e /rivile1es on a Duty  )'e assi1nment of privile1es to duties is maintained 4y a developer in t'e security nodeof t'e AO)% )'e security privile1es form availa4le in t'e ric' client displays all duties de2ned int'e application and t'e privile1es associated +it' eac' duty% Duties are 1rouped 4y processcycle to ma;e t'em easier to 2nd% )'is form can 4e accessed from t'e system administrationmodule under setup= security= security privile1es in t'e ric' client application%

    *ets no+ ta;e a loo; at 'o+ to add a privile1e to a duty% In t'is scenario= C'ris is as;edto add access to t'e service order mar1in report for everyone +'o 'as access to vie+ serviceorders% C'ris reali

  • 8/19/2019 80670AE AX2012R3CU8 DEV1 ReferenceMaterial

    39/50

    roles% In addition= t'ere are tools availa4le +it'in t'e AO) to vie+ from a menu item all of t'erelated security roles and o45ects% )'is is useful if you need to ;no+ all t'e users +'o 'aveaccess to a particular form= report or action%

    *ets do a @uic; demonstration on 'o+ to vie+ all of t'e roles +it' access to t'eCust)a4le*ist/a1e%

    ?ere 1oin1 to 2nd t'e Cust)a4le*ist/a1e menu item= and t'en from t'ere 2nd t'e relatedsecurity roles t'at 'ave access to t'e Cust)a4le*ist/a1e% )o do t'is= Im 1oin1 to epand t'emenu items% )'e Cust)a4le*ist/a1e is under t'e display node= and Im 1oin1 to loo; for t'eCust)a4le*ist/a1e% I can t'en ri1't:clic; on t'is list pa1e= and under add:ins select security tools=and clic; on vie+ related security roles% )'is displays a list of all roles +it' access to t'eCust)a4le*ist/a1e%

    If +e c'oose= +e can also clic; on eport to Microsoft Ecel= to eport t'is list to Ecel%

    *esson and Module 3ummary  )'is module discussed t'e AX security frame+or;% ?e revie+ed t'e security concepts suc' asroles= duties= privile1es= permissions and entry points% ?e t'en discussed a num4er of security:related activities suc' as creatin1 a ne+ user and assi1nin1 roles to a user%

    9et= +e loo;ed at modifyin1 duties in a role= editin1 privile1es assi1ned to a duty= andeditin1 permissions assi1ned to a privile1e% -inally= +e loo;ed at 'o+ you can use t'e AXsecurity tools to searc' for roles t'at 'ave access to a menu item%

    Module . Jey )a;e A+ay

  • 8/19/2019 80670AE AX2012R3CU8 DEV1 ReferenceMaterial

    40/50

    o De2nitions

    "oles

    Duties

    /rivile1es

    /ermissions

    Entry /oints

    o 3etup a ne+ $ser

    Inte1rated +it' Active directory

    Done in ric' client

    Assi1ned to one or more roles

    3ystem user and Employee roles used

    o Assi1n a $ser to a "ole

     )ypically maintained 4y system administrator in ric' client 4ut can also

    4e maintained 4y developer in AO)

    Duties are associated +it' eac' role

    o C'an1e Duties on a "ole

     )ypically maintained 4y system administrator in ric' client 4ut can also

    4e maintained 4y developer in AO)

    Duties can 4e edited usin1 3ecurity roles form in client or usin1

    3ecurity node in AO)

    o C'an1e /rivile1es on a Duty

     )ypically maintained 4y developer in AO)

    Duties 1rouped 4y process cycle

    Can 4e vie+ed from 3ecurity privile1es form in t'e client

    o Assi1n a /ermission to a /rivile1e

     )ypically maintained 4y developer in t'e AO)

  • 8/19/2019 80670AE AX2012R3CU8 DEV1 ReferenceMaterial

    41/50

    /ermission level set on t'e entry point

    o Investi1ate Access

    3ecurity roles and 3ecurity privile1e forms can 4e used to provide

    information a4out relations'ips 4et+een roles= duties= privile1es andpermissions

     )ools availa4le in t'e AO) to investi1ate access

    Module .& /ractices

    /ractice .%!& Create a 9e+ 3ecurity "ole

      )'in1s to t'in; a4out& 777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777 777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777

     777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777

     777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777 777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777

     777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777

     777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777 777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777

     777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777 777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777

     777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777 777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777

  • 8/19/2019 80670AE AX2012R3CU8 DEV1 ReferenceMaterial

    42/50

      /ractices

    /ractice !%!& Create a 9e+ Model and Development /ro5ect

    Scenario

     )'e follo+in1 step procedures and practices +ill demonstrate 'o+ to create a modi2cation t'atcan 4e used in a veterinary sur1ery% )'e sur1ery procedure +ill need to ;eep trac; of eac'animal t'at arrives= t'e o+ners of t'e animal= t'e species= t'e 4reed= and details of eac' visitincludin1 t'e date= reason and t'e cost%

    In t'is practice you +ill create a model and a development pro5ect to ;eep your modi2cationsor1ani Model Management > Create Model%

    4% Enter Dev1 in t'e model name= your name in t'e pu4lis'er andDynamics AX Development I training practices in t'e description%

    c% Clic; OK %

    d% Clic; Close on t'e infolo1 dialo1%

    % Create a pro5ect for Dev I trainin1

    a% /ress Ctrl-Shit-! to open t'e development pro5ects +indo+%

    4% "i1't:clic; t'e Shared node and select "e# > !ro$ect% 

    c% "ename t'e pro5ect to Dev I )rainin1%

  • 8/19/2019 80670AE AX2012R3CU8 DEV1 ReferenceMaterial

    43/50

    /ractice %!& Create a 9e+ ED)

    Scenario

    Create a ne+ Etended Data )ypeKED) L t'at +ill 4e used for t'e 4reed Id% 3et t'e la4el and 'elpas appropriate% Ensure t'e si

  • 8/19/2019 80670AE AX2012R3CU8 DEV1 ReferenceMaterial

    44/50

    a% /ress Ctrl-D to open anot'er AO)% Ensure +indo+ is not maimi

  • 8/19/2019 80670AE AX2012R3CU8 DEV1 ReferenceMaterial

    45/50

    /ractice %.& Create a "elation

    Scenario

    Create a ne+ ta4le t'at +ill store data a4out t'e pets 4elon1in1 to eac' customer% )'e ta4le +illneed to 'ave t'e follo+in1 2elds& Customer Account K)ype CustAccountL= /et9ame K9ameL=3pecies K(et3peciesIdL= reed K(etreedIdL% ou s'ould create t+o relations : one a forei1n ;ey

    to t'e species ta4le= and one a normal relation to t'e 4reed ta4le so t'at it is limited 4ased ont'e species 2eld entered%

    Step by Step

    !% Create (etCust/et)a4le

    a% Open a ne+ development +or;space%

    4% In t'e AO)= epand t'e Data Dictionary node%

    c% "i1't:clic; t'e Ta,les node and select "e# Ta,le% A ne+ )a4le calledTa,le1 is created%

    d% "i1't:clic; Ta,le1 and select !roperties%e% Modify t'e property "ame to 'etC*st!etTa,le%

    f% Modify t'e property el to !ets%

    1% Close t'e property s'eet%

    % Add CustAccount= (et3peciesId= 9ame and (etreedId 2elds to t'e(etCust/et)a4le

    a% /ress Ctrl-D to open anot'er AO)%

    4% Epand t'e Data Dictionary node%

    c% Epand t'e %&tended Data Types node%

    d% *ocate t'e C*stAcco*nt ED)%

    e% Dra1 t'e C*stAcco*nt ED) to t'e -ields node of t'e'etC*st!etTa,le ta4le%

    f% *ocate t'e 'etSpeciesId ED)%

    1% Dra1 t'e 'etSpeciesId ED) to t'e -ields node of t'e'etC*st!etTa,le ta4le% A ne+ 2eld called 'etSpeciesId is created%

    '% "i1't:clic; t'e 'etSpeciesId 2eld and clic; !roperties%

    i% In t'e "ame property= set t'e name of t'e 2eld to SpeciesId%

     5% Close t'e property s'eet%

    ;% *ocate t'e 'et(reedID ED)%

    l% Dra1 t'e 'et(reedID ED) to t'e -ields node of t'e 'etC*st!etTa,leta4le% A ne+ 2eld called 'et(reedId is created%

    m% "i1't:clic; t'e 'et(reedId 2eld and clic; !roperties%

    n% In t'e "ame property= set t'e name of t'e 2eld to (reedId%

    o% Close t'e property s'eet%

    #% Create a relation to t'e (etreed)a4le

    a% "i1't:clic; t'e .elations node on t'e 'etC*st!etTa,le node andselect "e# .elation%

    4% In t'e properties s'eet for t'e ne+ relation= set t'e "ame property to'et(reedTa,le and t'e Ta,le property to 'et(reedTa,le%

    c% "i1't:clic; t'e 'et(reedTa,le relation= select "e# > "ormal%

  • 8/19/2019 80670AE AX2012R3CU8 DEV1 ReferenceMaterial

    46/50

    d% In t'e property s'eet for t'e ne+ normal relation= set t'e /ield to(reedId and t'e .elated/ield to (reedID%

    e% 3ave your c'an1es%

    /ractice %,& Add an Enum

    Scenario

     )'e pet ta4le needs to store +'et'er t'e animal is male or female%

    Add t'e Gender Enum to t'e 'etC*st!etTa,le ta4le%

    Step by Step

    !% *ocate t'e )ender enum in t'e (ase %n*ms node in t'e AO)%

    % Dra1 t'e )ender enum to t'e /ields node in t'e 'etC*st!etTa,le ta4le%

    #% 3ave your c'an1es to t'e ta4le%

  • 8/19/2019 80670AE AX2012R3CU8 DEV1 ReferenceMaterial

    47/50

    /ractice #%!& Create a -orm

    Scenario

    Create a ne+ form to display and edit 4reed records%

    Create a ne+ form t'at can 4e used to vie+= create and edit records in t'e (etreed)a4le ta4le%

    Step by Step

    !% Create a form called (etreed)a4le

    a% In t'e AO)= ri1't:clic; t'e /orms node and select "e# /orm

    4% "ename t'e form to 'et(reedTa,le%

    c% In a second AO)= locate t'e ta4le 'et(reedTa,le%

    % Add t'e (etreed)a4le ta4le to datasources

    a% Dra1 t'e ta4le 'et(reedTa,le to t'e DataSo*rces node on t'e

    'et(reedTa,le form%#% Add t'e reedId and 9ame to t'e desi1n

    a% Epand t'e Desi1ns node on t'e 'et(reedTa,le form%

    4% "i1't:clic; t'e Design node and select "e# Control > )rid% Ane+ Grid control is created%

    c% Epand t'e DataSo*rces > 'et(reedTa,le > /ields node%

    d% Dra1 t'e 2elds (reedId and "ame to t'e 1rid control%

    e% On t'e properties s'eet for t'e Design node= in t'e Captionproperty= enter reed%

    f% 3ave your c'an1es to t'e form%

    .% Open t'e form 4y pressin1 Ctrl0O%

    /ractice #%& Create a -orm from a )emplate

    Scenario

    A form is needed to vie+ +'ic' pets 4elon1 to +'ic' customers% )'e form +ill 4e called from t'ecustomer form%

    Create a form usin1 a 3imple*istDetails template% In t'e 1rid on t'e left it s'ould s'o+ t'e /et

    9ame and Gender from t'e (etCust/et)a4le ta4le% In t'e details section on t'e ri1't of t'e form=it s'ould s'o+ t'e reed name% Additionally= create a menu item for t'e form= 'o+ever do notadd t'e menu item to a menu : you +ill use t'e menu item in t'e net section%

    Step by Step

    !% Create a -orm from 3imple*istDetails template called (etCust/et)a4le

    a% "i1't clic; t'e /orms node of t'e AO) and select "e# /orm fromTemplate > SimpleistDetails%

    4% "ename t'e form 'etC*st!etTa,le%

  • 8/19/2019 80670AE AX2012R3CU8 DEV1 ReferenceMaterial

    48/50

    c% Dra1 t'e ta4le 'etC*st!etTa,le from a second AO) to t'edatasources node of t'e ne+ form%

    d% 3et t'e data source property on t'e 1rid control on t'e form to'etC*st!etTa,le  )'e 1rid control can 4e found 4y epandin1Desi1ns P Desi1n P Group&ody P Group&GridContainer%

    % Add t'e reedId= 9ame and Gender 2elds to t'e desi1n

    a% Dra1 t'e (reedId= "ame and )ender 2elds to t'e 1rid of t'e desi1ns

    node%4% 3ave your c'an1es to t'e form%

    #% Create a menu item for t'e form

    a% Dra1 t'e 'etC*st!etTa,le form to t'e Men* Items > Display nodein a second AO) to create a menu item for t'e ne+ form%

    4% In t'e property s'eet for t'e ne+ menu item= set t'e la4el property to/ets%

    c% Close t'e property s'eet and save your c'an1es to t'e menu item%

  • 8/19/2019 80670AE AX2012R3CU8 DEV1 ReferenceMaterial

    49/50

    /ractice .%!& Create a 9e+ 3ecurity "ole

    Scenario

     une *o+ is employed in t'e ne+ role of veterinary receptionist% une +ill 4e receivin1 patients att'e front des; and +ill need access to maintain customer information and pet information% 3'e

    +ill also need to vie+ 4reeds and species% C'ris= t'e I) En1ineer= needs to create a ne+ role fort'e veterinary receptionist and add duties so t'at s'e can access t'ese areas of t'e application%

     une is already created in Microsoft Dynamics AX and is assi1ned t'e system user and employeeroles% C'ris needs to assi1n 'er t'e ne+ role%

    Step by Step

    !% Create a Maintain/ets /rivile1e

    a% Open t'e AOT%

    4% Epand Sec*rity > !rivileges% 

    c% "i1't:clic; !rivileges and select "e# !rivilege%

    d%