SlideShare a Scribd company logo
Dynamics AX Lookups
Muhammad Anas Khan
Muhammad Anas Khan
Overview
• A lookup is a small form we use to
select a value for a control
• A lookup can list the values in a grid or
a form
• Often shows several fields that help us
find and select the correct record
• For example, lookup for customer
account number will also show
customer name
• We can bind a lookup form to a field in
the form datasource or a control in the
form design
Muhammad Anas Khan3
Controls
• Following are the controls which can be bound to a
lookup form:
– DateEdit
– GuidEdit
– Int64Edit
– IntEdit
– RealEdit
– ReferenceGroup
– StringEdit
– TimeEdit
Muhammad Anas Khan4
Types of Lookup Forms
• Standard Lookup Forms
• EDT Lookup Forms
• Runtime Lookup Forms
• Enum Lookup (Not exactly a lookup form)
Standard Lookup Forms
Example, Insight, Lab Activity, Demo
Muhammad Anas Khan6
Example
Muhammad Anas Khan
Insight
• A standard lookup form is a system generated form
• To add a standard lookup form:
– you bind a control to a field
– from the main table of the form data source
– that references the ID of a record in related table
• It uses a grid to list the records
• Field displayed in the control is dictated by the AutoIdentification field
group of the related table
Muhammad Anas Khan
Insight
• Fields appearing in the lookup form are specified by a field group or
another set of fields from the related table
– Lookup bound to surrogate/natural foreign key
• shows fields in the AutoLookup field group by default
• shows fields used in TitleField1, TitleField2 properties of the table if AutoLookup is empty
• shows the first natural key of the table if AutoLookup, TitleField1, TitleField2 all are empty
• Use it whenever possible because:
– Consistent experience across forms
– Easier to maintain as lookup forms get synced with field groups changes
Muhammad Anas Khan
Lab Activity
• In AOT, navigate to
– Forms>>Form>>Data Sources>>Table>>Fields
• Open Fields node in a new window
• In the AOT that shows the form, navigate to
– Designs>>Design
• Drag the field1 from the Fields list to the Design node of the form
• As a consequence, a control will be added to the Design node
• Check the properties of the newly added control
• Following above steps you will successfully build a standard lookup
form
Muhammad Anas Khan
Lab Activity
ReferenceGroup control
• Name
• DataSource
– Should be the intended table from
the form data source
• Label
• ReferenceField
– Should be the intended surrogate
foreign key field from the
DataSource table you want to bind
the control to
Other controls
• Name
• DataField
– Should be the intended foreign key
field in the DataSource table
• DataSource
– Should be the intended table from
the form data source
• Label
• LookupButton
– Should be set to Auto
After finishing lab activity, make sure the following fields have been set correctly
Muhammad Anas Khan
DEMO
Standard Lookup Form
EDT Lookup Forms
Example, Insight, Lab Activity, Demo
Muhammad Anas Khan13
Example
Muhammad Anas Khan
Insight
• EDT can be used to bind a lookup form, from the AOT, to
– A field in a form data source table
– A control in a form design. The control can be unbound
• Style property, of the AOT form to be used as a lookup form,
should be set to Lookup1
• Code must be added to the form that updates the value of the
control when you select a record. For example, onClose
method may be returning a record
• Use whenever the lookup form layout is complex
Muhammad Anas Khan
Lab Activity
• To add an EDT lookup form:
– To a field, set the ExtendedDataType property of that field to the name of
the EDT
– To a control, set the ExtendedDataType property of that control to the
name of the EDT
– Finally, set the FormHelp property of the EDT to the name of the AOT
form you want to use as a lookup
Muhammad Anas Khan
DEMO
EDT Lookup Form
Runtime Lookup Forms
Example, Insight, API, Demo
Muhammad Anas Khan18
Example
Muhammad Anas Khan
Insight
• It is a custom form you create with X++ code
• It can be added to a field in the form data source or a control in the
form design
• To add a runtime lookup form to a field, override lookup or
lookupReference method
• To add a runtime lookup form to a control, override lookup or
lookupReference method
• Difficult to maintain because changes to the lookup require updates to
the X++ code. Therefore use only when you need it
• Runtime lookup has higher precedence over standard and EDT lookups
Muhammad Anas Khan
lookup() method
Muhammad Anas Khan
lookupReference() method
Muhammad Anas Khan
DEMO
Runtime Lookup Form
Enum Lookup
Example, Insight, API, Demo
Muhammad Anas Khan24
Example
Muhammad Anas Khan
Insight
• Not exactly a lookup form
• Useful to know how to filter values in an enum lookup
• Possible in case of unbound controls
Muhammad Anas Khan
API
Muhammad Anas Khan
DEMO
Enum Lookup
When to use what?
Muhammad Anas Khan
• Consistent experience across different forms
• Easier to maintain as they get auto synced with
changes in field groups
• Best to show fields from a field group of a related table
Standard Lookups
• Best to use if the lookup form layout is complex
• Performance hit due to form rendering
EDT Lookups
• Best to leverage the power of query
• Difficult to maintain because of the need to update the
code in case of changesRuntime Lookups
Muhammad Anas Khan
Muhammad Anas Khan31
References
• http://msdn.microsoft.com/en-us/library/aa597861.aspx
• Inside Microsoft Dynamics AX 2012 – Pg#188

More Related Content

PPTX
Microsoft dynamics ax2012 : forms and tables methods call sequences, How To?
PPTX
Microsoft dynamics ax 2012 development introduction part 1/3
DOCX
Ax 2012 x++ code best practices
PPTX
Microsoft Dynamics AX 2012 - Development Introduction Training - Part 2/3
PPTX
Microsoft dynamics ax 2012 development introduction part 2/3
PPTX
Microsoft Dynamics AX 2012 - Development Introduction Training - Part 3/3
PPTX
Microsoft Dynamics AX 2012 - Development Introduction Training - Part 1/3
PDF
ODTUG KSCOPE 2017 - Black Belt Techniques for FDMEE and Cloud Data Management
Microsoft dynamics ax2012 : forms and tables methods call sequences, How To?
Microsoft dynamics ax 2012 development introduction part 1/3
Ax 2012 x++ code best practices
Microsoft Dynamics AX 2012 - Development Introduction Training - Part 2/3
Microsoft dynamics ax 2012 development introduction part 2/3
Microsoft Dynamics AX 2012 - Development Introduction Training - Part 3/3
Microsoft Dynamics AX 2012 - Development Introduction Training - Part 1/3
ODTUG KSCOPE 2017 - Black Belt Techniques for FDMEE and Cloud Data Management

What's hot (20)

PPTX
Oracle FCCS: A Deep Dive
PDF
Oracle FCCS Getting Started Guide II
PPTX
Payroll process in oracle hrms
PPTX
Designing a Chart of Accounts and Enterprise Structure in Oracle Fusion ERP C...
PDF
Optimization SQL Server for Dynamics AX 2012 R3
PDF
X++ advanced course
PPT
Sap Integration Testing Test Scripting V0.1
PDF
Fccs valid intersection examples
PDF
HFM Extended Analytics
PDF
10 Tips for Successful 12.2 Upgrade
PPTX
R12 features presentation inventory management
PDF
FDMEE Taking Source Filters to the Next Level
PDF
The Wright Move – A Continued Journey to the Oracle EPM Cloud
PDF
EPBCS - A New Approach to Planning Implementations
DOCX
Oracle advanced supply chain planning implementation and user
PDF
oracle order management
PPT
Read 1-hyperion planning presentation
PDF
Oracle workflow: use and administration.
PPTX
Salesforce admin training 1
PDF
Understanding oracle fusion accounting hub
Oracle FCCS: A Deep Dive
Oracle FCCS Getting Started Guide II
Payroll process in oracle hrms
Designing a Chart of Accounts and Enterprise Structure in Oracle Fusion ERP C...
Optimization SQL Server for Dynamics AX 2012 R3
X++ advanced course
Sap Integration Testing Test Scripting V0.1
Fccs valid intersection examples
HFM Extended Analytics
10 Tips for Successful 12.2 Upgrade
R12 features presentation inventory management
FDMEE Taking Source Filters to the Next Level
The Wright Move – A Continued Journey to the Oracle EPM Cloud
EPBCS - A New Approach to Planning Implementations
Oracle advanced supply chain planning implementation and user
oracle order management
Read 1-hyperion planning presentation
Oracle workflow: use and administration.
Salesforce admin training 1
Understanding oracle fusion accounting hub
Ad

Viewers also liked (13)

PPTX
Integration with dynamics ax 2012
PDF
AX 2012 R3 Installation Guide
PPT
An Introduction to the Dynamics AX Application Integration Framework
PPTX
Azure overview
PPTX
AX2012 Technical Track - Infrastructure, Davy Vliegen
PPTX
Ax 2012 enterprise portal development
PDF
Deploying customizations across microsoft dynamics ax 2012 environments ax2012
PDF
Dynamics Day '11 - Manufacturing and Distribution Roundtable Discussion
PPT
Whomovedmycheese
PPTX
Mule Microsoft Dynamics AX 2012 Connector
PPS
positive thinking
PPTX
whats New in axapta 2012
PDF
Report programming model for microsoft dynamics ax 2012
Integration with dynamics ax 2012
AX 2012 R3 Installation Guide
An Introduction to the Dynamics AX Application Integration Framework
Azure overview
AX2012 Technical Track - Infrastructure, Davy Vliegen
Ax 2012 enterprise portal development
Deploying customizations across microsoft dynamics ax 2012 environments ax2012
Dynamics Day '11 - Manufacturing and Distribution Roundtable Discussion
Whomovedmycheese
Mule Microsoft Dynamics AX 2012 Connector
positive thinking
whats New in axapta 2012
Report programming model for microsoft dynamics ax 2012
Ad

Similar to AX 2012: All About Lookups! (20)

PPS
Ado.net session02
PDF
Advanced database
PDF
New Perspectives Microsoft Office 365 and Access 2016 Intermediate 1st Editio...
DOCX
data binding.docx
PPS
Vb.net session 06
PPS
VISUAL BASIC .net data accesss vii
PDF
PPTX
Chapter-3 Data Modeling using ER Model
PPT
Chapter 10
PPT
ERD_01B=DBMS DATA BASE MANAGEMENT SYSTEM.ppt
PPTX
Module 3 Database systems for DIPLOMA.pptx
PDF
New Perspectives Microsoft Office 365 and Access 2016 Intermediate 1st Editio...
PPT
ADO CONTROLS - Database usage
PDF
New Perspectives Microsoft Office 365 and Access 2016 Intermediate 1st Editio...
PDF
New Perspectives on Microsoft Access 2013 Comprehensive 1st Edition Adamski S...
PDF
New Perspectives on Microsoft Access 2013 Comprehensive 1st Edition Adamski T...
PPTX
X++ 1.pptx
PPT
Lecture 03 data abstraction and er model
PDF
Access 2007 lecture notes students
PDF
New Perspectives on Microsoft Access 2013 Comprehensive 1st Edition Adamski S...
Ado.net session02
Advanced database
New Perspectives Microsoft Office 365 and Access 2016 Intermediate 1st Editio...
data binding.docx
Vb.net session 06
VISUAL BASIC .net data accesss vii
Chapter-3 Data Modeling using ER Model
Chapter 10
ERD_01B=DBMS DATA BASE MANAGEMENT SYSTEM.ppt
Module 3 Database systems for DIPLOMA.pptx
New Perspectives Microsoft Office 365 and Access 2016 Intermediate 1st Editio...
ADO CONTROLS - Database usage
New Perspectives Microsoft Office 365 and Access 2016 Intermediate 1st Editio...
New Perspectives on Microsoft Access 2013 Comprehensive 1st Edition Adamski S...
New Perspectives on Microsoft Access 2013 Comprehensive 1st Edition Adamski T...
X++ 1.pptx
Lecture 03 data abstraction and er model
Access 2007 lecture notes students
New Perspectives on Microsoft Access 2013 Comprehensive 1st Edition Adamski S...

Recently uploaded (20)

PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
DP Operators-handbook-extract for the Mautical Institute
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Mushroom cultivation and it's methods.pdf
PDF
August Patch Tuesday
PDF
Heart disease approach using modified random forest and particle swarm optimi...
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
PPTX
A Presentation on Touch Screen Technology
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
WOOl fibre morphology and structure.pdf for textiles
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PPTX
A Presentation on Artificial Intelligence
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
Hindi spoken digit analysis for native and non-native speakers
PDF
Getting Started with Data Integration: FME Form 101
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
DP Operators-handbook-extract for the Mautical Institute
A comparative analysis of optical character recognition models for extracting...
NewMind AI Weekly Chronicles - August'25-Week II
Unlocking AI with Model Context Protocol (MCP)
Mushroom cultivation and it's methods.pdf
August Patch Tuesday
Heart disease approach using modified random forest and particle swarm optimi...
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Univ-Connecticut-ChatGPT-Presentaion.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
A Presentation on Touch Screen Technology
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
WOOl fibre morphology and structure.pdf for textiles
Assigned Numbers - 2025 - Bluetooth® Document
A Presentation on Artificial Intelligence
Group 1 Presentation -Planning and Decision Making .pptx
Hindi spoken digit analysis for native and non-native speakers
Getting Started with Data Integration: FME Form 101

AX 2012: All About Lookups!

  • 2. Muhammad Anas Khan Overview • A lookup is a small form we use to select a value for a control • A lookup can list the values in a grid or a form • Often shows several fields that help us find and select the correct record • For example, lookup for customer account number will also show customer name • We can bind a lookup form to a field in the form datasource or a control in the form design
  • 3. Muhammad Anas Khan3 Controls • Following are the controls which can be bound to a lookup form: – DateEdit – GuidEdit – Int64Edit – IntEdit – RealEdit – ReferenceGroup – StringEdit – TimeEdit
  • 4. Muhammad Anas Khan4 Types of Lookup Forms • Standard Lookup Forms • EDT Lookup Forms • Runtime Lookup Forms • Enum Lookup (Not exactly a lookup form)
  • 5. Standard Lookup Forms Example, Insight, Lab Activity, Demo
  • 7. Muhammad Anas Khan Insight • A standard lookup form is a system generated form • To add a standard lookup form: – you bind a control to a field – from the main table of the form data source – that references the ID of a record in related table • It uses a grid to list the records • Field displayed in the control is dictated by the AutoIdentification field group of the related table
  • 8. Muhammad Anas Khan Insight • Fields appearing in the lookup form are specified by a field group or another set of fields from the related table – Lookup bound to surrogate/natural foreign key • shows fields in the AutoLookup field group by default • shows fields used in TitleField1, TitleField2 properties of the table if AutoLookup is empty • shows the first natural key of the table if AutoLookup, TitleField1, TitleField2 all are empty • Use it whenever possible because: – Consistent experience across forms – Easier to maintain as lookup forms get synced with field groups changes
  • 9. Muhammad Anas Khan Lab Activity • In AOT, navigate to – Forms>>Form>>Data Sources>>Table>>Fields • Open Fields node in a new window • In the AOT that shows the form, navigate to – Designs>>Design • Drag the field1 from the Fields list to the Design node of the form • As a consequence, a control will be added to the Design node • Check the properties of the newly added control • Following above steps you will successfully build a standard lookup form
  • 10. Muhammad Anas Khan Lab Activity ReferenceGroup control • Name • DataSource – Should be the intended table from the form data source • Label • ReferenceField – Should be the intended surrogate foreign key field from the DataSource table you want to bind the control to Other controls • Name • DataField – Should be the intended foreign key field in the DataSource table • DataSource – Should be the intended table from the form data source • Label • LookupButton – Should be set to Auto After finishing lab activity, make sure the following fields have been set correctly
  • 12. EDT Lookup Forms Example, Insight, Lab Activity, Demo
  • 14. Muhammad Anas Khan Insight • EDT can be used to bind a lookup form, from the AOT, to – A field in a form data source table – A control in a form design. The control can be unbound • Style property, of the AOT form to be used as a lookup form, should be set to Lookup1 • Code must be added to the form that updates the value of the control when you select a record. For example, onClose method may be returning a record • Use whenever the lookup form layout is complex
  • 15. Muhammad Anas Khan Lab Activity • To add an EDT lookup form: – To a field, set the ExtendedDataType property of that field to the name of the EDT – To a control, set the ExtendedDataType property of that control to the name of the EDT – Finally, set the FormHelp property of the EDT to the name of the AOT form you want to use as a lookup
  • 17. Runtime Lookup Forms Example, Insight, API, Demo
  • 19. Muhammad Anas Khan Insight • It is a custom form you create with X++ code • It can be added to a field in the form data source or a control in the form design • To add a runtime lookup form to a field, override lookup or lookupReference method • To add a runtime lookup form to a control, override lookup or lookupReference method • Difficult to maintain because changes to the lookup require updates to the X++ code. Therefore use only when you need it • Runtime lookup has higher precedence over standard and EDT lookups
  • 25. Muhammad Anas Khan Insight • Not exactly a lookup form • Useful to know how to filter values in an enum lookup • Possible in case of unbound controls
  • 28. When to use what?
  • 29. Muhammad Anas Khan • Consistent experience across different forms • Easier to maintain as they get auto synced with changes in field groups • Best to show fields from a field group of a related table Standard Lookups • Best to use if the lookup form layout is complex • Performance hit due to form rendering EDT Lookups • Best to leverage the power of query • Difficult to maintain because of the need to update the code in case of changesRuntime Lookups
  • 31. Muhammad Anas Khan31 References • http://msdn.microsoft.com/en-us/library/aa597861.aspx • Inside Microsoft Dynamics AX 2012 – Pg#188