Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day...

64
Microsoft ® Business Solutions– Navision ® 4.0 Development II – C/SIDE Solution Development Day 1

Transcript of Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day...

Page 1: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

Microsoft® Business Solutions–Navision® 4.0

Development II – C/SIDE Solution Development

Microsoft® Business Solutions–Navision® 4.0

Development II – C/SIDE Solution Development

Day 1

Page 2: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

IntroductionsIntroductions

Instructor Name

Company/Position

Qualifications/Experience

Hobbies

Page 3: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

Things you need to knowThings you need to know

• Class Information– Monday 8:30am, Tuesday – Friday 8:00am– 5:00pm– Breaks– Lunch

• Facilities– Restrooms– Telephones

Page 4: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

4 of 64

IntroductionIntroduction

•About the Course– Target Audience– Training Objectives– Course Structure– Course Content– Training Prerequisites– Certification– Further Information

Page 5: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

5 of 64

IntroductionIntroduction

•Target Audience– Microsoft Certified Business Solutions Partner

employees who develop custom Microsoft Navision applications

Page 6: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

6 of 64

IntroductionIntroduction

•Training Objectives– Develop the basic skills needed to develop

solutions in Microsoft Navision– Begin preparation for Development II

Certification Exam

Page 7: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

7 of 64

IntroductionIntroduction

•Course Structure– Foundation Tools

• Programming Language• Development Environment

– Business Case Diagnosis• Analysis• Design• Development & Testing

– Deployment

Page 8: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

8 of 64

IntroductionIntroduction

•Course Content– Internal Documentation– Debugging Tools– Performance Issues– Complex Data variables and their member

functions– Multilanguage functionality– Analysis of objects– Posting routines– Interfaces to Microsoft Navision– Some Microsoft SQL issues

Page 9: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

9 of 64

IntroductionIntroduction

•Training Prerequisites– Microsoft Navision Development I

Page 10: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

10 of 64

IntroductionIntroduction

• Certification– You must pass both the Microsoft Navision

Development I exam and the Microsoft Navision Development II exam for certification

– For Microsoft Navision Master Development Designation you need the previous two exams plus the following exams:

• Microsoft Navision Installation and Configuration• MS 70-229 • 1 of Microsoft Navision Financial, Whse Mgmt,

Manufacturing, or Trade

Page 11: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

11 of 64

IntroductionIntroduction

•Further Information– C/SIDE online Help (C/SIDE Reference Guide)– Application Designer’s Guide

Page 12: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

12 of 64

Development ConceptsDevelopment Concepts

•Rules– C/SIDE Reference Guide– Application Designer’s Guide

•Methodology– Phases

• Diagnostic Phase• Analysis Phase• Design Phase• Development & Testing Phase• Deployment Phase• On-Going Support Phase

Page 13: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

13 of 64

Business Case Diagnosis & AnalysisBusiness Case Diagnosis & Analysis

• Introduction• Diagnosis• Analysis – Functional Requirements

– Seminars– Instructors– Participants– Registration– Invoicing– Reporting & Statistics– Interfaces

• Other Requirements• Data Model• Project Plan

Page 14: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

14 of 64

Business Case Diagnosis & AnalysisBusiness Case Diagnosis & Analysis

• Introduction– Business Case or Diagnosis and Analysis Phase

of project– Diagnosis provides the “Executive Summary”

of the Business Case•Client Profile•High-Level Needs Description

– Analysis describes specific requirements in more detail.

•Data Models•Project Plan

Page 15: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

15 of 64

Diagnosis – Executive SummaryDiagnosis – Executive Summary

•Cronus International Training Academy– Software Training Center– Customized Seminar Management module

Page 16: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

16 of 64

Diagnosis – Executive SummaryDiagnosis – Executive Summary

• Customized Seminar Management module

– Store and integrate data• Seminar• Instructor• Customer• Financial Information

– Processes• Track master data• Register participants• Create invoices• Overview of statistics

Page 17: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

17 of 64

Analysis – Functional RequirementsAnalysis – Functional Requirements

•Functional Requirements– Seminars– Instructors– Participants– Registration– Invoicing– Reporting & Statistics– Interfaces– Dimensions

Page 18: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

18 of 64

Analysis – Functional RequirementsAnalysis – Functional Requirements

•Seminars– Fixed duration– Minimum & maximum participants– Fixed price– Related to Job in Microsoft Navision– Posted– Seminar room– In-house or outsourced– Assign in-house room– Customer statistics

Page 19: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

19 of 64

Analysis – Functional RequirementsAnalysis – Functional Requirements

• Instructors– Employee– Setup as Resource in Microsoft Navision

Page 20: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

20 of 64

Analysis – Functional RequirementsAnalysis – Functional Requirements

•Participants– Related to Customers– Must have customer association– Every Customer can have several participants

Page 21: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

21 of 64

Analysis – Functional RequirementsAnalysis – Functional Requirements

•Registration– Form– Job No.– Additional expenses– Invoicing information– Comments

Page 22: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

22 of 64

Analysis – Functional RequirementsAnalysis – Functional Requirements

• Invoicing– Invoice customers at completion of seminar

Page 23: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

23 of 64

Analysis – Functional RequirementsAnalysis – Functional Requirements

•Reporting & Statistics– List of Registered Seminar Participants– Seminar Certificate– View statistical information

Page 24: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

24 of 64

Analysis – Functional RequirementsAnalysis – Functional Requirements

• Interfaces– Send email notification– Export XML participant list

Page 25: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

25 of 64

Analysis – Functional RequirementsAnalysis – Functional Requirements

•Dimensions– Standard dimensions functionality for master

files, registrations, posting, and invoicing

Page 26: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

26 of 64

Analysis – Functional RequirementsAnalysis – Functional Requirements

• Other Requirements– Easy to learn

• Consistent with Microsoft Navision standards

– Efficient• Both mouse and keyboard

– Clarity• Intuitive interfaces

– Easy error correction• Error messages with suggestions

– Guidelines• Application Designer’s Guide

Page 27: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

27 of 64

Instructor

Seminar

Seminar RoomSeminar

RegistrationSeminarCharge

Job

Contact(Participant)

Customer

Blue objects must be created.

Master Files

Data ModelData Model

Page 28: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

28 of 64

Data ModelData Model

Sales Invoice

Seminar Registration

Seminar LedgerEntry

Job LedgerEntry

SeminarInvoicing

SeminarPosting

JobPosting

Blue objects must be created.

Posting

Page 29: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

29 of 64

Business Case Diagnosis & AnalysisBusiness Case Diagnosis & Analysis

• Project Plan– Business case broken down into tasks– End result will be a deliverable– Tasks (By Chapter)

2. Managing Master Files3. Managing Registrations4. Managing Posting5. Managing Integration6. Managing Reporting7. Managing Statistics8. Managing Dimensions9. Managing Interfaces

Page 30: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

C/AL TriggersC/AL Triggers

Page 31: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

31 of 64

C/AL TriggerC/AL Trigger

• Documentation trigger– Used for documentation purposes within

object.

• Event trigger– Name always begins with ‘On’.– Code is executed when named event occurs.

• Function trigger– Function within an object.– Code is executed when function is called.

Page 32: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

Table TriggersTable Triggers

Page 33: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

33 of 64

Table TriggersTable Triggers

Properties Properties

Triggers Triggers

Properties Properties

Properties Properties

Triggers Triggers

Fields Fields

Global Var. Global Var.

Properties Properties

SumIndexFieldsSumIndexFields

KeysKeys

Table Description

Page 34: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

34 of 64

Table TriggersTable Triggers

Table triggers are processed after Form triggers.

OnInsert()OnInsert()

OnModify()OnModify()

OnDelete()OnDelete()

OnRename()OnRename()

•Record.MODIFY(True), Record.MODIFYALL(True)

•Record.DELETE(True), Record.DELETEALL(TRUE)

•Record.RENAME(True)

•Record.INSERT(True)

Page 35: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

35 of 64

Table TriggersTable Triggers

•Fires after field input (Return).•Fires before form control trigger.•Can be run from C/AL with

Record.VALIDATE(Field [NewValue]).

OnValidate()OnValidate()

OnLookup()OnLookup() •Fired by F6 or LookUp button• If C/AL code is inserted in this trigger,

the standard lookup function is deactivated

•Fires only if no C/AL code is available in the corresponding form control trigger

Field Triggers

Page 36: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

Form TriggersForm Triggers

Page 37: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

37 of 64

Form TriggersForm Triggers

Properties Properties

Triggers Triggers

Properties Properties

Properties Properties

Triggers Triggers

Controls Controls

Global Var. Global Var.

Form Description

Page 38: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

38 of 64

Form TriggersForm Triggers

OnInitOnInit

OnOpenFormOnOpenForm

OnFindRecordOnFindRecord

Record not available, no access to controls

Access to controls

OnAfterGetRecordOnAfterGetRecord Record available, but not displayed in controls

OnAfterGetCurrRecOnAfterGetCurrRec Fired by the current record

OnFormatOnFormat Fired by each visible control

OnNextRecordOnNextRecord

OnAfterGetRecordOnAfterGetRecord

OnFormatOnFormat

Fir

st

Record

Next

Record

Record pointer is set

Record available but not displayed in controls

Fired by each visible control

Record pointer is moved to the next record

Form Trigger – Open Form

Page 39: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

39 of 64

Form TriggersForm Triggers

OnBeforePutRecordOnBeforePutRecord

OnQueryCloseFormOnQueryCloseForm

OnCloseFormOnCloseForm

OnBeforePutRecordOnBeforePutRecord

OnQueryCloseFormOnQueryCloseForm

OnCloseFormOnCloseForm

OnModifyRecordOnModifyRecord

Record not modified

Record modified

Table trigger

Record is not saved yet

Form trigger

Exit with parameter ‘true’

Exit with parameter ‘true’

OnModifyOnModify

Form Trigger – Close Form

Page 40: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

40 of 64

Form TriggersForm Triggers

OnInsertRecordOnInsertRecord

OnModifyRecordOnModifyRecord

OnDeleteRecordOnDeleteRecord

Form TriggerForm Trigger

OnInsertOnInsert

OnModifyOnModify

OnDeleteOnDelete

Table TriggerTable Trigger

Form Trigger and Table Trigger

Forms triggers are executed first!

Page 41: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

41 of 64

Form TriggersForm Triggers

OnBeforeInputOnBeforeInput

OnActivateOnActivate

OnFormatOnFormat

InputInput OnInputChangeOnInputChangeyes Input next

characteryes

OnAfterInputOnAfterInput

OnValidate(Table)OnValidate(Table)

OnValidateOnValidate

OnAfterValidateOnAfterValidate

OnFormatOnFormatOnDeactivateOnDeactivate

no

no

Control Trigger – Text Box Input

Page 42: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

42 of 64

Form TriggersForm Triggers

Each trigger is processed!

Table Field TriggerTable Field Trigger

System ValidationSystem Validation

Only one trigger is processed!

Table Field LookupTable Field Lookup

System LookupSystem Lookup

Form Control LookupForm Control Lookup

Form Control TriggerForm Control Trigger

OnValidate()OnValidate()

OnLookup()OnLookup()

Control / Field Trigger

Page 43: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

Codeunit TriggersCodeunit Triggers

Page 44: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

44 of 64

Codeunit TriggersCodeunit Triggers

Properties Properties

ParametersParameters

Properties Properties

Return ValueReturn Value

Triggers Triggers

Global Var. Global Var.

Local VariablesLocal Variables

Codeunit Object Description

Page 45: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

45 of 64

Codeunit TriggersCodeunit Triggers

OnRun()OnRun() •Codeunit.RUN

Page 46: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

Record CommandsRecord Commands

Page 47: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

47 of 64

Record CommandsRecord Commands

• Record.GET• Record.SETCURRENTKEY• Record.SETRANGE• Record.SETFILTER• Record.FIND • Record.NEXT

Page 48: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

48 of 64

Record CommandsRecord Commands

No. Name70000 Side Panel70001 Base70002 Top Panel70003 Rear Panel70010 Wooden Door70011 Glass Door

RECORD.GET(‘70002’)

• Always primary key

• No filter• Very fast

Record.GET([Value],…)

Page 49: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

49 of 64

Record CommandsRecord Commands

No. Name70000 Side Panel70001 Base70002 Top Panel70003 Rear Panel70010 Wooden Door70011 Glass Door

Record pointer

Record.FIND('-')Record pointerRecord pointer

Record.NEXTRecord.NEXT

Record.FIND([Which]) / Record.NEXT([Steps])

Record.FIND('-')Record.NEXT

Page 50: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

50 of 64

Record CommandsRecord Commands

No. Name70001 Base70011 Glass Door70003 Rear Panel70000 Side Panel70002 Top Panel70010 Wooden Door

No. Name70000 Side Panel70001 Base70002 Top Panel70003 Rear Panel70010 Wooden Door70011 Glass Door

Record.SETCURRENTKEY(Name)

Record.SETCURRENTKEY(Field1[,Field2],…)

Page 51: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

51 of 64

Record CommandsRecord Commands

No. Name70000 Side Panel70001 Base70002 Top Panel70003 Rear Panel70010 Wooden Door70011 Glass Door

No. Name70000 Side Panel70001 Base70002 Top Panel70003 Rear Panel70010 Wooden Door70011 Glass Door

Record.SETRANGE(Field[, FromValue][, ToValue])

Record.SETRANGE(“No.”,’70002’,’70010’)

Page 52: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

52 of 64

Record CommandsRecord Commands

No. Name70001 Base70011 Glass Door70003 Rear Panel70000 Side Panel70002 Top Panel70010 Wooden Door

No. Name70000 Side Panel70001 Base70002 Top Panel70003 Rear Panel70010 Wooden Door70011 Glass Door

Record.SETFILTER(Field, String [, Value],…)

Record.SETFILTER(Name,’@*PANEL*’)

Page 53: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

53 of 64

Record CommandsRecord Commands

No. Name70000 Side Panel70001 Base70002 Top Panel70003 Rear Panel70010 Wooden Door70011 Glass Door

Record pointer

Record.FIND('-')Record pointerRecord pointer

Record.NEXTRecord.NEXTRecord.NEXT = 0 Record

pointer

Using SETRANGE, FIND and Next

Record.SETRANGE(“No.”,’70002’,’70010’)

Record.FIND('-')Record.NEXT

Page 54: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

54 of 64

Record CommandsRecord Commands

• Additional Commands– INSERT– MODIFY– MODIFYALL– DELETE– DELETEALL– RENAME– INIT– CALCFIELDS– COPY– COUNT– VALIDATE

Page 55: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

Multilanguage – Tables/FormsMultilanguage – Tables/Forms

Page 56: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

56 of 64

Multilanguage – Tables/FormsMultilanguage – Tables/Forms

• Application Texts• System Texts• Online Help• Company Notes

Use Tools, Language from the menu bar to change the application language

Page 57: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

57 of 64

Multilanguage – Tables/FormsMultilanguage – Tables/Forms

• Internal name of elements, like Objects, Fields, Controls, Functions and Variables

•Must be in English (United States)

NameName

CaptionCaption•Displays the caption of an element in

the selected language•Current value is copied from CaptionML

CaptionMLCaptionML•Contains the caption of an element

for each language code•Mandatory for all elements that

might be visible to the user

Think Caption – Not Name!

Page 58: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

Data Caption FieldsData Caption Fields

Page 59: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

59 of 64

Data Caption FieldsData Caption Fields

•DataCaptionFields– Primary key and description field

(For example: ‘No.’ and ‘Name’)

TablesTables

FormsForms •DataCaptionFields– Most used filter field

(For example: ‘Customer No.’)

•DataCaptionExpr– Expression to show different captions in

a form(For example:FORMAT("Contract Type") + ' ' + "Contract No.“)

– Overwrites DataCaptionFields property

Data Caption Properties

Page 60: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

60 of 64

Data Caption FieldsData Caption Fields

•DataCaptionExpr from the form or the value of DataCaptionFields

•Value of DataCaptionFields from the parent form’s source table

Tabular FormTabular Form

Card FormCard Form •DataCaptionExpr from the form or the value of DataCaptionFields from the source table

•Primary key fields are used if no data caption is defined

Data Caption Display

Page 61: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

61 of 64

Managing Participants – Code WalkthroughManaging Participants – Code Walkthrough

• Contact Card – Form 5050• Contact List – Form 5052• Contact Table – Table 5050

Page 62: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

Managing Master FilesManaging Master Files

Lab

Page 63: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

63 of 64

ConclusionConclusion

• We have now created our master files and user interfaces

• Now that we can store our master data, we can develop the forms and code necessary to carry out transactions

Page 64: Microsoft ® Business Solutions–Navision ® 4.0 Development II – C/SIDE Solution Development Day 1.

64 of 64

ReviewReview

• C/AL Triggers• Complex Datatypes• MultiLanguage• Master Files