Вы находитесь на странице: 1из 10

Contents

Introduction To Microsoft Navision Development I C/SIDE

Welcome ............................................................................................................... 1
About the Course .................................................................................................. 2
The Basic Objects in Navision............................................................................... 2
C/SIDE Fundamentals........................................................................................... 4
Integration Tools.................................................................................................. 11
The Course Design ............................................................................................. 11
Student Objectives .............................................................................................. 15

Chapter 1: Basic Tables

17

Training Objectives.............................................................................................. 17
Tables.................................................................................................................. 18
Table and Field Properties .................................................................................. 19
Viewing and Modifying Field Properties .............................................................. 20
Test Your Skills Investigating Existing Tables .................................................. 22
Creating Tables ................................................................................................... 23
Test Your Skills Adding Data............................................................................ 29
Keys .................................................................................................................... 30
Secondary Keys .................................................................................................. 32
Test Your Skills Using Secondary Keys ........................................................... 34
Setting Relationships Between Tables ................................................................ 36
Table Relations and the TableRelation Property................................................. 36
Test Your Skills Simple Table with Table Relations ......................................... 37
Test Your Skills Renaming Records................................................................. 39
Test Your Skills Filtered Table Relations.......................................................... 41
Test Your Skills Conditional Table Relations.................................................... 43
Special Table Fields ............................................................................................ 46
Test Your Skills Calculating the Sums Manually .............................................. 49
Test Your Skills Testing Your FlowField........................................................... 52
Test Your Skills Creating a SumIndexField ...................................................... 53
Test Your Skills Filtering the FlowField ............................................................ 55
Test Your Skills Process for Creating a SumIndexField................................... 57
Test Your Skills Creating a FlowFilter .............................................................. 59
Test Your Skills Using a FlowFilter................................................................... 61
Test Your Skills The NotBlank Property ........................................................... 63
Test Your Skills The Editable Property............................................................. 64
Test Your Skills The DecimalPlaces Property .................................................. 66
Types of Tables and Their Characteristics .......................................................... 67
Supplemental Table Characteristics.................................................................... 70
Subsidiary Table Characteristics ......................................................................... 70
Ledger Table Characteristics .............................................................................. 72
Register Table Characteristics ............................................................................ 73
Journal Table Characteristics .............................................................................. 74
Document Table Characteristics ......................................................................... 75
Document History Table Characteristics ............................................................. 78
Setup Table Characteristics ................................................................................ 78
Test Your Knowledge .......................................................................................... 80
Quick Interaction: Lessons Learned .................................................................... 82

Microsoft Official Training Materials for Microsoft Dynamics


Your use of this content is subject to your current services agreement

Page

Microsoft Navision Development I C/Side Introduction


Chapter 2: Basic Forms

83

Training Objectives.............................................................................................. 83
Forms .................................................................................................................. 84
Controls ............................................................................................................... 84
Bound and Unbound Forms and Controls ........................................................... 85
Starting with a Blank Form .................................................................................. 86
Test Your Skills Attaching a Source Table ....................................................... 88
Test Your Skills Adding Simple Controls .......................................................... 89
Test Your Skills Using Add Label and Lock...................................................... 94
Other Useful Controls .......................................................................................... 97
Test Your Skills Displaying Options................................................................ 104
Test Your Skills Displaying Progress Indicators ............................................. 107
Using the Form Wizard...................................................................................... 110
Test Your Skills Using the Field Menu............................................................ 115
Test Your Skills Making Columns Invisible on a Tabular Form ...................... 117
Creating Buttons................................................................................................ 118
Test Your Skills Creating Command Buttons ................................................. 119
Test Your Skills The RunObject PushAction .................................................. 121
Test Your Skills Linking Forms ....................................................................... 123
Test Your Skills Creating Menu Items ............................................................ 125
Test Your Skills The LookupTable PushAction .............................................. 126
Creating Subforms ............................................................................................ 127
Test Your Skills Creating the Main Form........................................................ 128
Test Your Skills Creating the Subform ........................................................... 130
Test Your Skills Adding the Subform Onto the Main Form............................. 132
Form Types and Characteristics........................................................................ 135
Standard Navigation .......................................................................................... 140
Test Your Knowledge ........................................................................................ 142
Quick Interaction: Lessons Learned .................................................................. 144

Chapter 3: Introduction to C/AL Programming

145

Training Objectives............................................................................................ 145


C/AL Programming ............................................................................................ 146
C/AL .................................................................................................................. 146
Accessing C/AL ................................................................................................. 148
Test Your Knowledge ........................................................................................ 151
Quick Interaction: Lessons Learned .................................................................. 152

Chapter 4: Intrinsic Data Types

153

Training Objectives............................................................................................ 153


Simple Data Types ............................................................................................ 154
Numeric Data Types.......................................................................................... 154
String Data Types.............................................................................................. 156
Boolean ............................................................................................................. 157
Date, Time, and DateTime ................................................................................ 158
Complex Data Types ......................................................................................... 159
Test Your Knowledge ........................................................................................ 162
Quick Interaction: Lessons Learned .................................................................. 164

Page

ii

Microsoft Official Training Materials for Microsoft Dynamics


Your use of this content is subject to your current services agreement

Contents
Chapter 5: Identifiers and Variables

165

Training Objectives............................................................................................ 165


Identifiers and Variables .................................................................................... 166
The Syntax of Identifiers.................................................................................... 166
Variable Scope and Initialization ....................................................................... 167
Create a New Codeunit ..................................................................................... 168
Displaying Variables .......................................................................................... 169
Test Your Skills ................................................................................................. 171
Quick Interaction: Lessons Learned .................................................................. 172

Chapter 6: Assignment Statement

173

Training Objectives............................................................................................ 173


Assignment Statements .................................................................................... 174
Assigning a Value to a Variable ........................................................................ 174
Automatic Type Conversions............................................................................. 175
The Statement Separator .................................................................................. 176
Using Assignment Statements and the Symbol Menu ...................................... 177
Test Your Skills ................................................................................................. 182
Quick Interaction: Lessons Learned .................................................................. 183

Chapter 7: Simple Expressions, Terms, and Operators

185

Training Objectives............................................................................................ 185


Expressions, Terms, and Operators.................................................................. 186
The Syntax of an Expression ............................................................................ 187
The String Operator........................................................................................... 188
Function Calls in Expressions ........................................................................... 189
Test Your Skills ................................................................................................. 192
Quick Interaction: Lessons Learned .................................................................. 193

Chapter 8: Numeric Expressions

195

Training Objectives............................................................................................ 195


Numeric Expressions and Operator Precedence .............................................. 196
Types of Arithmetic Operators........................................................................... 196
Operator Precedence Effects ............................................................................ 201
Test Your Skills ................................................................................................. 204
Quick Interaction: Lessons Learned .................................................................. 205

Chapter 9: Logical and Relational Expressions

207

Training Objectives............................................................................................ 207


Logical and Relational Operators and Expressions........................................... 208
Relational Expressions for Comparison ............................................................ 209
Relational Expressions for Set Inclusion ........................................................... 211
Using Logical Expressions ................................................................................ 212
Adding Logical and Relational Expressions to a Form ...................................... 214
Test Your Skills Logical and Relational Expressions Part 1 ........................... 220
Test Your Skills Logical and Relational Expressions Part 2 ........................... 221
Quick Interaction: Lessons Learned .................................................................. 222

Microsoft Official Training Materials for Microsoft Dynamics


Your use of this content is subject to your current services agreement

Page

iii

Microsoft Navision Development I C/Side Introduction


Chapter 10: The IF and EXIT Statements

223

Training Objectives............................................................................................ 223


Conditional Statements and Boolean Expressions............................................ 224
The IF Statement............................................................................................... 224
The EXIT Statement .......................................................................................... 226
Performing Calculations in Microsoft Navision Using These Statements.......... 227
Test Your Skills ................................................................................................. 233
Quick Interaction: Lessons Learned .................................................................. 234

Chapter 11: Compound Statements and Comments

235

Training Objects ................................................................................................ 235


Compound Statements and Comments ............................................................ 236
Compound Statement Syntax with BEGIN and END ........................................ 236
Compound Statements Using Nested IF Statements........................................ 238
Adding Comments to Code ............................................................................... 240
Coding with Compound Statements and Comments......................................... 242
Test Your Skills ................................................................................................. 243
Quick Interaction: Lessons Learned .................................................................. 244

Chapter 12: Arrays

245

Training Objectives............................................................................................ 245


Array Definitions ................................................................................................ 246
Array Syntax ...................................................................................................... 247
The Power of Arrays.......................................................................................... 249
Strings as Arrays of Characters......................................................................... 250
Using Arrays ...................................................................................................... 251
Test Your Knowledge ........................................................................................ 255
Quick Interaction: Lessons Learned .................................................................. 256

Chapter 13: Repetitive Statements

257

Training Objectives............................................................................................ 257


Repetitive Statements ....................................................................................... 258
Coding with Repetitive Statements.................................................................... 262
Test Your Knowledge ........................................................................................ 267
Quick Interaction: Lessons Learned .................................................................. 268

Chapter 14: Other Statements

269

Training Objectives............................................................................................ 269


The WITH Statement......................................................................................... 270
Quick Interaction: Lessons Learned .................................................................. 276

Chapter 15: Functions

277

Training Objectives............................................................................................ 277


Functions and Parameters ................................................................................ 278
Using Built-in Functions..................................................................................... 279
Test Your Skills Functions .............................................................................. 283
Quick Interaction: Lessons Learned .................................................................. 285

Page

iv

Microsoft Official Training Materials for Microsoft Dynamics


Your use of this content is subject to your current services agreement

Contents
Chapter 16: Using Intrinsic C/AL Functions

287

Training Objectives............................................................................................ 287


The Essential C/AL Functions ........................................................................... 288
User Communication Functions ........................................................................ 297
String Functions ................................................................................................ 299
System Functions .............................................................................................. 301
Date Functions .................................................................................................. 302
Number Functions ............................................................................................. 304
Array Functions ................................................................................................. 305
Other Important Functions................................................................................. 306
Quick Interaction: Lessons Learned .................................................................. 310

Chapter 17: Creating Your Own Functions

311

Training Objectives............................................................................................ 311


Why Create Functions?..................................................................................... 312
Formal and Actual Parameters.......................................................................... 313
Local Functions and Variables .......................................................................... 314
The EXIT Statement .......................................................................................... 314
Creating Functions ............................................................................................ 315
Defining a Function ........................................................................................... 316
Adding Code to Your Functions ........................................................................ 319
Calling Your Functions ...................................................................................... 320
Test Your Skills Creating Your Own Functions .............................................. 322
Quick Interaction: Lessons Learned .................................................................. 324

Chapter 18: Reports

325

Training Objectives............................................................................................ 325


Reports .............................................................................................................. 326
Types of Printed Reports................................................................................... 330
The Report Designers ....................................................................................... 332
Creating a Data Model ...................................................................................... 333
Designing the Page Layout ............................................................................... 338
Learning How Sections Work ............................................................................ 341
Headers, Bodies, and Footers........................................................................... 341
TransHeaders and TransFooters ...................................................................... 344
Some Useful Properties .................................................................................... 347
Grouping Within a Report .................................................................................. 349
Totaling in a Report ........................................................................................... 353
Adding Some Advanced Features..................................................................... 357
Creating a Basic Report for Yourself ................................................................. 362
Test Your Skills Reports ................................................................................. 365
Quick Interaction: Lessons Learned .................................................................. 366

Microsoft Official Training Materials for Microsoft Dynamics


Your use of this content is subject to your current services agreement

Page

Microsoft Navision Development I C/Side Introduction


Chapter 19: Dataports

367

Training Objectives............................................................................................ 367


Dataport Fundamentals ..................................................................................... 368
Designing Dataports .......................................................................................... 372
Sample Dataports.............................................................................................. 377
Test Your Knowledge Dataports..................................................................... 392
Quick Interaction: Lessons Learned .................................................................. 394

Chapter 20: XMLports

395

Training Objectives............................................................................................ 395


XMLport Fundamentals ..................................................................................... 396
Designing XMLports .......................................................................................... 399
Sample XMLports .............................................................................................. 402
Test Your Knowledge XMLports..................................................................... 411
Quick Interaction: Lessons Learned .................................................................. 412

Chapter 21: Codeunits

413

Training Objectives............................................................................................ 413


The C/SIDE Codeunit ........................................................................................ 414
Creating Codeunits............................................................................................ 416
Using Codeunits ................................................................................................ 424
Test Your Knowledge ........................................................................................ 429
Quick Interaction: Lessons Learned .................................................................. 431

Chapter 22: MenuSuites

433

Training Objectives............................................................................................ 433


Menu Suite Fundamentals................................................................................. 434
Customizing a Menu Suite ................................................................................ 435
Exporting a MenuSuite Object........................................................................... 438
Upgrading MenuSuite Content .......................................................................... 440
Test Your Knowledge ........................................................................................ 441
Quick Interaction: Lessons Learned .................................................................. 443

Chapter 23: Using ODBC

445

Training Objectives............................................................................................ 445


Using ODBC ...................................................................................................... 446
Why Use ODBC with Microsoft Navision........................................................... 447
Installation and Setup of the NODBC Driver ..................................................... 448
Accessing Data from the Database Queries ..................................................... 455
Writing Data Back to Microsoft Navision ........................................................... 459
Limitations of the NODBC driver ....................................................................... 463
Test Your Knowledge ........................................................................................ 468
Quick Interaction: Lessons Learned .................................................................. 469

Page

vi

Microsoft Official Training Materials for Microsoft Dynamics


Your use of this content is subject to your current services agreement

Contents
Chapter 24: Using C/FRONT

471

Training Objectives............................................................................................ 471


C/FRONT .......................................................................................................... 472
Installation and Setup of the C/FRONT System ................................................ 472
Limitations of C/FRONT .................................................................................... 477
Test Your Knowledge ........................................................................................ 478
Quick Interaction: Lessons Learned .................................................................. 479

Chapter 25: Using OCX Controls

481

Training Objectives............................................................................................ 481


Custom Controls and Using an OCX Control .................................................... 482
Installing and Registering the OCX ................................................................... 482
Creating a Sample with OCX Controls .............................................................. 484
Common Problems and Limitations................................................................... 492
Test Your Knowledge ........................................................................................ 494
Quick Interaction: Lessons Learned .................................................................. 495

Chapter 26: Automation Server

497

Training Objectives............................................................................................ 497


Automation ........................................................................................................ 498
Creating the Variables ....................................................................................... 499
Creating a Report with Automation.................................................................... 503
Responding to Events ....................................................................................... 513
Common Problems and Limitations................................................................... 513
Automation Exercise ......................................................................................... 515
Test Your Knowledge ........................................................................................ 519
Quick Interaction: Lessons Learned .................................................................. 520

Chapter 27: Implementation Methodology

521

Training Objective ............................................................................................. 521


Implementation Methodology ............................................................................ 522
Version Control.................................................................................................. 538
Development Documentation ............................................................................ 543
Test Your Knowledge ........................................................................................ 553
Quick Interaction: Lessons Learned .................................................................. 555

Chapter 28: C/Front Overview

557

Training Objective ............................................................................................. 557


Introduction to C/Front....................................................................................... 558
Install, Run and Debug the C/Front .NET Application ....................................... 560
Building a C/Front .NET Application .................................................................. 564
Test Your Knowledge ........................................................................................ 565
Quick Interaction: Lessons Learned .................................................................. 567

Appendix A: Object Q&A

569

Objects .............................................................................................................. 569

Microsoft Official Training Materials for Microsoft Dynamics


Your use of this content is subject to your current services agreement

Page

vii

Microsoft Navision Development I C/Side Introduction


Appendix B: C/AL Q&A

587

Part 1: Object Questions ................................................................................... 587


Part 2: Answers ................................................................................................. 595

Appendix C: Solutions to Exercises

603

Test Your Skills Investigating Existing Tables (CH1) ..................................... 603


Test Your Skills Adding Data (CH1) ............................................................... 603
Test Your Skills Using Secondary Keys (CH1)............................................... 604
Test Your Skills Simple Table with Table Relation (CH1) .............................. 604
Test Your Skills Renaming Records (CH1) .................................................... 604
Test Your Skills Filtered Table Relations (CH1) ............................................. 605
Test Your Skills Conditional Table Relations (CH1) ....................................... 605
Test Your Skills Calculating the Sums Manually (CH1).................................. 605
Test Your Skills Testing Your Flowfield (CH1) ............................................... 606
Test Your Skills Creating a SumIndexfield (CH1)........................................... 606
Test Your Skills Filtering the FlowField (CH1)................................................ 607
Test Your Skills A Process for Creating a SumIndexField (CH1)................... 607
Test Your Skills Using a FlowFilter (CH1) ...................................................... 607
Test Your Skills The NotBlank Property (CH1)............................................... 608
Test Your Skills The Editable Property (CH1) ................................................ 608
Test Your Skills The DecimalPlaces Property (CH1) ..................................... 609
Test Your Knowledge Answers (CH1)............................................................... 609
Test Your Skills Attaching a Source Table (CH2)........................................... 610
Test Your Skills Answers Adding Simple Controls (CH2)............................... 610
Test Your Skills Using Add Label and Lock (CH2) ......................................... 611
Test Your Skills Adding Container Controls (CH2)......................................... 611
Test Your Skills Displaying Options (CH2) ..................................................... 613
Test Your Skills Displaying Progress Indicators (CH2) .................................. 613
Test Your Skills Tabular Form (CH2) ............................................................. 613
Test Your Skills Using the Field Menu (CH2) ................................................. 614
Test Your Skills Making Columns Invisible (CH2) .......................................... 614
Test Your Skills Creating Command Buttons (CH2)....................................... 615
Test Your Skills RunObject PushAction (CH2)............................................... 615
Test Your Skills Linking Forms (CH2) ............................................................ 616
Test Your Skills Linking Forms (CH2) ............................................................ 616
Test Your Skills LookupTable PushAction (CH2) ........................................... 617
Test Your Skills Creating the Main Form (CH2) ............................................. 617
Test Your Skills Creating the SubForm (CH2)................................................ 617
Test Your Skills Adding the SubForm (CH2) .................................................. 618
Test Your Knowledge Answers (CH2)............................................................... 619
Test Your Knowledge Answers (CH3)............................................................... 620
Test Your Knowledge Answers (CH4)............................................................... 620
Test Your Skills Answers(CH5) ......................................................................... 621
Test Your Skills Answers (CH6) ........................................................................ 622
Test Your Skills Answers (CH7) ........................................................................ 623
Test Your Skills Answers (CH8) ........................................................................ 624
Test Your Skills (CH9) ....................................................................................... 624

Page

viii

Microsoft Official Training Materials for Microsoft Dynamics


Your use of this content is subject to your current services agreement

Contents
Test Your Skills Answers (CH10) ...................................................................... 625
Test Your Skills Answers (CH11) ...................................................................... 628
Test Your Skills Answers (CH12) ...................................................................... 629
Test Your Skills Answers (CH 15) ..................................................................... 630
Test Your Skills Answers (CH 17) ..................................................................... 631
Test Your Skills Answers (CH18) ...................................................................... 632
Test Your Knowledge Answers (CH 19)............................................................ 633
Test Your Knowledge Answers (CH20)............................................................. 634
Test Your Knowledge Answers (CH 21)............................................................ 635
Test Your Knowledge Answers (CH22)............................................................. 636
Test Your Skills Answers (CH 23) ..................................................................... 637
Test Your Knowledge Answers (CH 24)............................................................ 638
Test Your Knowledge Answers (CH25)............................................................. 638
Test Your Knowledge Answers (CH26)............................................................. 639
Test Your Knowledge Answers (CH28)............................................................. 639

Index

641

Microsoft Official Training Materials for Microsoft Dynamics


Your use of this content is subject to your current services agreement

Page

ix

Microsoft Navision Development I C/Side Introduction

Page

Microsoft Official Training Materials for Microsoft Dynamics


Your use of this content is subject to your current services agreement

Вам также может понравиться