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

Post on 23-Dec-2015

219 views 4 download

Tags:

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

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

IntroductionsIntroductions

Instructor Name

Company/Position

Qualifications/Experience

Hobbies

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

4 of 64

IntroductionIntroduction

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

5 of 64

IntroductionIntroduction

•Target Audience– Microsoft Certified Business Solutions Partner

employees who develop custom Microsoft Navision applications

6 of 64

IntroductionIntroduction

•Training Objectives– Develop the basic skills needed to develop

solutions in Microsoft Navision– Begin preparation for Development II

Certification Exam

7 of 64

IntroductionIntroduction

•Course Structure– Foundation Tools

• Programming Language• Development Environment

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

– Deployment

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

9 of 64

IntroductionIntroduction

•Training Prerequisites– Microsoft Navision Development I

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

11 of 64

IntroductionIntroduction

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

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

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

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

15 of 64

Diagnosis – Executive SummaryDiagnosis – Executive Summary

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

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

17 of 64

Analysis – Functional RequirementsAnalysis – Functional Requirements

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

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

19 of 64

Analysis – Functional RequirementsAnalysis – Functional Requirements

• Instructors– Employee– Setup as Resource in Microsoft Navision

20 of 64

Analysis – Functional RequirementsAnalysis – Functional Requirements

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

21 of 64

Analysis – Functional RequirementsAnalysis – Functional Requirements

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

22 of 64

Analysis – Functional RequirementsAnalysis – Functional Requirements

• Invoicing– Invoice customers at completion of seminar

23 of 64

Analysis – Functional RequirementsAnalysis – Functional Requirements

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

24 of 64

Analysis – Functional RequirementsAnalysis – Functional Requirements

• Interfaces– Send email notification– Export XML participant list

25 of 64

Analysis – Functional RequirementsAnalysis – Functional Requirements

•Dimensions– Standard dimensions functionality for master

files, registrations, posting, and invoicing

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

27 of 64

Instructor

Seminar

Seminar RoomSeminar

RegistrationSeminarCharge

Job

Contact(Participant)

Customer

Blue objects must be created.

Master Files

Data ModelData Model

28 of 64

Data ModelData Model

Sales Invoice

Seminar Registration

Seminar LedgerEntry

Job LedgerEntry

SeminarInvoicing

SeminarPosting

JobPosting

Blue objects must be created.

Posting

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

C/AL TriggersC/AL Triggers

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.

Table TriggersTable Triggers

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

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)

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

Form TriggersForm Triggers

37 of 64

Form TriggersForm Triggers

Properties Properties

Triggers Triggers

Properties Properties

Properties Properties

Triggers Triggers

Controls Controls

Global Var. Global Var.

Form Description

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

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

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!

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

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

Codeunit TriggersCodeunit Triggers

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

45 of 64

Codeunit TriggersCodeunit Triggers

OnRun()OnRun() •Codeunit.RUN

Record CommandsRecord Commands

47 of 64

Record CommandsRecord Commands

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

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],…)

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

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],…)

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’)

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*’)

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

54 of 64

Record CommandsRecord Commands

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

Multilanguage – Tables/FormsMultilanguage – Tables/Forms

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

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!

Data Caption FieldsData Caption Fields

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

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

61 of 64

Managing Participants – Code WalkthroughManaging Participants – Code Walkthrough

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

Managing Master FilesManaging Master Files

Lab

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

64 of 64

ReviewReview

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