Baanboard.com

Go Back   Baanboard.com > Forum > Baan Quick Support: Functional & Technical > Tools Development

User login

Frontpage Sponsor

Main

Google search


Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
38%
Installation Wizard into new VRC
38%
Manual into existing VRC
5%
Manual into new VRC
19%
Total votes: 42

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 26th December 2017, 12:21
pralash pralash is offline
Senior Member
 
Join Date: Feb 2017
Posts: 203
pralash is on a distinguished road
Baan: 9.0 - DB: SQL Server - OS: Windows 2012R2
ue.before.after.destroy.object
Baan: Other/Unknown
C/S: None/Unknown

Hi,

I'm new for LN Programming... I have create a User Exit script (UEDLL) for a particular table.... I build my own logic when I perform the insert and delete operation on that table by using the function ue.after.after.save.object(long mode) and ue.after.after.destroy.object() respectively... But I want to know that the functionalities of the rest one function such as ue.before.after.destroy.object, ue.after.before.destroy.object functions. Can you please explain in detail....

Thanks in advance,
Regards,
Pralash
Reply With Quote
  #2  
Old 26th December 2017, 14:46
bhushanchanda's Avatar
bhushanchanda bhushanchanda is offline
Guru
 
Join Date: Sep 2012
Location: India
Posts: 2,345
bhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura about
Baan: LN FP 1-9, 10.4, a little bit of Baan IV - DB: SQL Server 2008, Oracle - OS: Windows Server 2008 R2, Unix
Quote:
ue.before.after.destroy.object
If there is DAL present for the table, this function will be triggered before dal.destroy.object.

If no DAL present for the table, this function will be triggered before after.delete subsection of section main.table.io

Quote:
ue.after.before.destroy.object
If there is DAL present for the table, this function will be triggered after dal.destroy.object.

If no DAL present for the table, this function will be triggered after after.delete subsection of section main.table.io

Refer programmers guide for details.
__________________
Regards,

Bhushan

Unless you try to do something beyond what you have already mastered, you will never grow!
Reply With Quote
Sponsored Links
  #3  
Old 27th December 2017, 06:07
pralash pralash is offline
Senior Member
 
Join Date: Feb 2017
Posts: 203
pralash is on a distinguished road
Baan: 9.0 - DB: SQL Server - OS: Windows 2012R2
Hi Bhushan,,
Thanks so much for your information.... But how can I find out whether DAL is present or not for a particular table?

Regards,
Pralash
Reply With Quote
  #4  
Old 27th December 2017, 07:33
bhushanchanda's Avatar
bhushanchanda bhushanchanda is offline
Guru
 
Join Date: Sep 2012
Location: India
Posts: 2,345
bhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura about
Baan: LN FP 1-9, 10.4, a little bit of Baan IV - DB: SQL Server 2008, Oracle - OS: Windows Server 2008 R2, Unix
Hi,

Usually, a DAL script name is same as table name.

So, if you have a table tdsls400 and a program script named tdsls401(Script type DAL/DAL2) then you have a DAL for table tdsls400.
__________________
Regards,

Bhushan

Unless you try to do something beyond what you have already mastered, you will never grow!
Reply With Quote
  #5  
Old 27th December 2017, 07:42
pralash pralash is offline
Senior Member
 
Join Date: Feb 2017
Posts: 203
pralash is on a distinguished road
Baan: 9.0 - DB: SQL Server - OS: Windows 2012R2
Oh I See... Thanks so much bhusan...
Regards,
Pralash
Reply With Quote
  #6  
Old 27th December 2017, 12:50
pralash pralash is offline
Senior Member
 
Join Date: Feb 2017
Posts: 203
pralash is on a distinguished road
Baan: 9.0 - DB: SQL Server - OS: Windows 2012R2
Hi Bhusan,,
Can you please explain in detailed about the DAL Objects Hooks with some sample program script?
Regards,
Pralash
Reply With Quote
  #7  
Old 27th December 2017, 13:15
bdittmar's Avatar
bdittmar bdittmar is online now
Guru
 
Join Date: Apr 2002
Location: Germany, 50.584097,8.544078
Posts: 1,692
bdittmar will become famous soon enough
Baan: 2.2/3.1/4c4/LN6.1 FP6/FP9/HiDox - DB: tbase, ms-sql7, oracle10gV1, 11g - OS: HP-UX, W2K3, SLES
Dal ..

Hello,
refer to Infor - Guide, please.
Publication Information
U8883O US
Document code
10.4.1 (76a)
Release
September 17, 2015
Code:
DAL
The Data Access Layer (DAL) allows developers to describe rules about data. A DAL is linked to a table,not a session. Therefore, when the table is accessed, the DAL is used. In this way, different sessionscan update a table by using the same rules. In addition, integration capabilities use the DAL to ensureupdates are also processed with the same rules.
Data Access Layer (DAL) scripts implement the business rules of the application to ensure the logicalintegrity of the database. DAL scripts are a Library software component that is aligned with a specifictable. These scripts are compiled into objects. When a session performs an action on a table, the DALfor the table is loaded.
In Infor LN, two types of Data Access Layer scripts exist: DAL 1 and DAL 2.
.............

Business Rules
A business rule is a statement that defines or constrains some aspect or operation of the business. Itis intended to control or influence the behavior of the business operations. Business rules are logicalintegrity rules, and differ from database oriented referential integrity rules.
Business Rules - example
Business rules in a purchasing system may be:
▪
An item can be ordered only from its supplier
▪
When the gross weight and net weight for an item are the same, there is no packaging
▪
The supplier provides the arrival date of a purchase order after the order is entered into thesystem.
▪
Items cannot be removed if there is stock on-hand
▪
The item on-order quantity is increased when an order for the item is entered
▪
The item on-hand quantity is increased and the on-order quantity decreased when an orderarrives
Referential Integrity Rules - example
In contrast, integrity rules in a purchasing system may be:
▪
An item must exist for it to be ordered
▪
If an item has a supplier, the supplier must be known to the system
▪
Items can not be deleted if the item record is used elsewhere in the system
Business rules are implemented as hooks. A hook is a pre-defined function name that you create in aData Access Layer script. The 4GL engine will call this function as it executes user interface and databaserelated actions on the table that the DAL is written for.
Business rules fall into categories that determine how the business rule is implemented in the DAL.
The categories, depending on the type of DAL script, are:
▪
Property or Field hooks
▪
Object Hooks
▪
Field Dependencies
▪
Business Methods
DAL 1
DAL 1 scripts were introduced in Infor Baan 5.0. A DAL 1 script contains database logic (e.g. logicalintegrity rules), but it usually does not contain all business logic for the table it belongs to. Very oftenbusiness logic is spread across the DAL 1 script and the UI scripts.
Most UI scripts still contain business logic. They can contain, for example, logic to:
▪
make fields read-only.
▪
update a field after a change to a related field.
Therefore it is very hard to use the DAL 1 scripts for integrations via Infor LN Business Adapter: thebusiness logic in the UI scripts is skipped if another application connects to a Infor LN table. Thereforethis logic must be rebuilt in the BOIs that provide the connection. If you change the business logic in theUI scripts, you must adapt the corresponding BOIs as well.
A DAL 1 script can contain the following types of hooks:
▪
Object hooks. These hooks operate on the row or record as a whole unit. Object hooksdetermine if operations on a row are allowed, and specify additional operations that shouldbe performed based on an operation of the row. Examples of object hooks are:
▪
Delete the additional employee data in the People package when an employee is deleted.
▪
When a sales order line is saved, create a history record of the sales order line.
▪
Update the item inventory when a planned stock transaction is created.
▪
Property hooks. These hooks operate at a field level, and are, among other things, used toverify valid values and calculate default values for table fields. Examples of property hooksare:
▪
Validity check that the Quotation expiration date should be after the Quotation entry date.
▪
When adding an employee, the language of the company is the default for the employee’slanguage.
For details on DAL 1 scripts, refer to "Data Access Layer" in the LN Programmer's Guide.
To create DAL 1 scripts
You can create and edit DAL 1 scripts in the Program Scripts / Libraries (ttadv2530m000) session.For DAL 1 scripts, the script type is "DAL".
DAL 2
DAL 2 scripts are introduced in Infor LN. A DAL 2 script contains all business logic (database logic +other logic) related to a particular table. The UI scripts of the sessions operating on the table, only containUI logic.
DAL 2 scripts are therefore perfectly suited for integrations via Infor LN Business Adapter. Otherapplications can connect, through Business Objects, to Infor LN tables. The business logic in the table'sDAL 2 script is executed automatically. So, to build an integration, you don't need to rebuild this businesslogic in the BOIs that provide the interface.
Various predefined Business Objects, that can be used for integration purposes, are delivered with InforLN. DAL 2 scripts are only available for tables that are used in these business objects. For the remainingtables, DAL 1 scripts are available. Refer to the Infor LN Business Adapter documentation for detailson business objects and integration technology.
In DAL 2 various new hooks are introduced. A DAL 2 script can contain:
▪
Object hooks: these hooks are identical to the object hooks in DAL 1 scripts.
▪
Field hooks. Field hooks contain the business logic for table fields. They can contain, forexample, logic to:
▪
verify valid values on a table field (logical integrity rules).
▪
make a field read-only. For example: the contact field of the Business Partner is not arequired entry, and is a display field in the UI when the Business Partner is created.
▪
make a field invisible.
▪
automatically update a field, after a related field was changed. See "Field Dependencies".
▪
make input on a field mandatory.
▪
hide a particular enumerated constant from an enum list.
▪
Business method hooks. These hooks are used to disable/enable and hide specific formcommands of type "business method".
For details on DAL 2 scripts, refer to "DAL 2 Overview" in the LN Programmer's Guide.
To create DAL 2 scripts
You can create and edit DAL 2 scripts in the Program Scripts / Libraries (ttadv2530m000) session.For DAL 2 scripts, the script type is "DAL (version 2)".

---->>>>>>
Regards
__________________
//Bernd

Last edited by bdittmar : 27th December 2017 at 13:17. Reason: descr. added
Reply With Quote
  #8  
Old 19th January 2018, 09:09
pralash pralash is offline
Senior Member
 
Join Date: Feb 2017
Posts: 203
pralash is on a distinguished road
Baan: 9.0 - DB: SQL Server - OS: Windows 2012R2
Hi Bhushan,
When these functions (before.before.destroy.object and after.after.destroy.object) are triggered, if there is a DAL for that table and there is no DAL for that table?

Regards,
Pralash
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +2. The time now is 17:43.


©2001-2017 - Baanboard.com - Baanforums.com