100% found this document useful (1 vote)
400 views27 pages

Lesson8 Enquiry Hooks

This document discusses how to write enquiry hooks in T24 using different APIs. It provides examples of using various enquiry hook points like BUILD.ROUTINE, CONVERSION, SYS.FIELD.NO, and EB.API to modify enquiry behavior and output. Code snippets are given for using the CONVERSION hook to reformat values and the setRecord() method to set the entire record contents.

Uploaded by

laks
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Topics covered

  • Parameter Setting,
  • Dynamic Data,
  • Enquiry Integration,
  • Enquiry Configuration,
  • Enquiry Engine,
  • Enquiry Context,
  • Enquiry Parameters,
  • Record Ids,
  • Data Display,
  • Enquiry Design
100% found this document useful (1 vote)
400 views27 pages

Lesson8 Enquiry Hooks

This document discusses how to write enquiry hooks in T24 using different APIs. It provides examples of using various enquiry hook points like BUILD.ROUTINE, CONVERSION, SYS.FIELD.NO, and EB.API to modify enquiry behavior and output. Code snippets are given for using the CONVERSION hook to reformat values and the setRecord() method to set the entire record contents.

Uploaded by

laks
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Topics covered

  • Parameter Setting,
  • Dynamic Data,
  • Enquiry Integration,
  • Enquiry Configuration,
  • Enquiry Engine,
  • Enquiry Context,
  • Enquiry Parameters,
  • Record Ids,
  • Data Display,
  • Enquiry Design

1

2
3
In this lesson we will learn how to write ENQUIRY hook using different APIs

4
An enquiry is a query to T24

It is a ‘SELECT’ executed to fetch data from T24

Created using the ENQUIRY application

Data can be displayed in user defined format


There are two exit points in Enquiry where L3 developers can attach their methods,
[Link] – Modifying the dynamic selection box
CONVERSION – Modifying the data before display

5
This interface enables the implementer to set the selection criteria used by the
enquiry engine to select records
This interface is invoked after the user has entered their choices in the selection
screen
The T24 field specifying this hook is the [Link] field in ENQUIRY

6
Parameters:
filterCriteria - The list of FilterCriteria as entered by the user. In T24 terms,
this is [Link]<2 ... 4>
enquiryContext – Context Variables for the enquiry interaction
Returns:
List<FilterCriteria> - A new list of filter criteria to be applied during record
selection

7
This interface enables the implementer to set the value of an element displayed in
the enquiry results programmatically
This interface is invoked during calculation of each field's value, in the order it is
specified in the list of CONVERSION fields in the enquiry definition
The value returned by this interface is written to [Link].
The T24 field specifying this hook is the CONVERSION field in ENQUIRY

8
Parameters:
value - The initial value of the field. The new value should be returned. (In T24
terms, this is [Link])
currentId - The ID of the current record being processed. (In T24 terms, this is
the 'ID' common variable)
currentRecord - The full record currently being processed by the enquiry. (In
T24 terms, this is [Link])
filterCriteria - The list of selection criteria entered by the user. (In T24 terms,
this is fields<2 ... 4> from [Link])
enquiryContext - Context variables for the enquiry interaction.
Returns
String - The new value to be displayed to the enquiry processing engine, to be
displayed to the user or used in further calculations

9
This interface enables the implementer to define the list of record Ids that the
enquiry will process
This interface is invoked during the record selection stage of running an enquiry, and
replaces the usual record selection based on a select statement on a T24 application
The T24 field specifying this hook is the [Link] in [Link] (the
[Link] must be 'R' in the associated multivalue group)
This interface is mainly intended to support NOFILE enquiry in T24.

10
Parameters:
filterCriteria - The list of selection criteria entered by the user. (In T24 terms,
this is comes from [Link], [Link] and [Link])
enquiryContext - Context variables for the enquiry interaction.
Returns:
List<String> - The list of recordIds.

11
This interface enables the implementer to set the entire contents of a record prior to
it being processed by the enquiry engine
This interface is invoked during enquiry processing when the field it is attached to is
calculated
The [Link] hook used by this interface is [Link]
The T24 field specifying this hook is the CONVERSION field in ENQUIRY
This interface is mainly intended to support NOFILE enquiry in T24

12
public void setRecord(String value, String
currentId, TStructure currentRecord, List
filterCriteria, EnquiryContext enquiryContext)
Parameters:
value - The initial value of the field to which the interface is attached. (In T24
terms, this is [Link])
currentId - The ID of the current record being processed. (In T24 terms, this is
the 'ID' common variable)
currentRecord - The full record currently being processed by the enquiry. (In
T24 terms, this is [Link])
filterCriteria - The list of selection criteria entered by the user. (In T24 terms,
this is fields<2 ... 4> from [Link])
enquiryContext - Context variables for the enquiry
[Link]:nothing
Returns
nothing

13
In this lesson we saw how to write ENQUIRY hook using different APIs

14
Create an enquiry to display Customer Id, Account Id and the respective working
balance after accepting category from the user Based on category, additional filtering
has to be done
For category 1001 - Balance should be in the range 0 and 49999
For category 6001 - Balance should be in the range 50000 and 100000
For category greater than 7000 - Balance should be in the range 100000 and
500000

15
16
Create an Enquiry to List @ID, CUSTOMER, AMOUNT from LD Application with the
Loan Amount in foreign Currency.
Display the Loan Amount in Local Currency
Use Conversion Hook to convert the amount in foreign currency to Local Currency

17
18
Create an Enquiry to display the consolidated balance of a Customer.
Note: Accumulate all the balances from all the accounts available in
[Link]

19
20
Create [Link] Record with below details,
Source type = method
Java Method = setIds
Java Class = NoFileDEmo
Java package = [Link]

21
Create [Link] Record with,

User Field Name = [Link]


User Type = R
User Field No = [Link] Which is STANDARD SELECTION ID

22
Create an Enquiry with the application name as [Link] which is the ID of
[Link]

23
Enquiry Browser View

24
Execute Enquiry

25
26
27

You might also like