Baanboard.com

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

User login

Frontpage Sponsor

Main

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

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 20th April 2015, 15:00
pillai.ganesh's Avatar
pillai.ganesh pillai.ganesh is offline
Senior Member
 
Join Date: Apr 2011
Location: United Arab Emirates
Posts: 105
pillai.ganesh is on a distinguished road
Baan: ERP LN 6.1 - DB: Oracle, SQL, Informix - OS: Windows
Lightbulb UEDLL for DAL2 Hooks
Baan: ERP LN 6.1 FP9
DB: SQL Server 2012
OS: Windows 7
C/S: Both

What if Customer wants to implement extra business logic before and after the standard DAL 2 [field] Hooks?

A UEDLL enabled to handle this through customized coding will be so handy.

Looking forward to see Infor releasing next level of UEDLL allowing the customization related to DAL2 on UEDLL (may be UEDLL2 ...)

Guys let me know your suggestions/comments to this...
Reply With Quote
  #2  
Old 20th April 2015, 15:08
bhushanchanda's Avatar
bhushanchanda bhushanchanda is offline
Guru
 
Join Date: Sep 2012
Location: India
Posts: 2,287
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 Ganesh,

You might be interested to know the concept of DBDLL added in the latest porting set. Not sure if it meets the things you are looking for. But yes a new move. For the time being, we have wrappers as well.

Quote:
Overview
A DB DLL (DBDLL) is a DLL with the same name as a standard DAL with the extension 'db'. E.g. 'whinh200db' for table whinh200. A DBDLL can be implemented in order to be able to log database actions (insert update or delete) by means of specific hooks that will be executed by the 4GL engine and/or DAL Engine. Stand-alone database operations (not triggered by saves and deletes of the 4GL engine or DAL Engine) are also extended to perform the extra business logic before and after performing the actual database operation. In this way it is possible to log database actions.

Interaction with 4GL Engine / DAL Engine
When present, the DB DLL for a certain table will be loaded by the 4GL engine/DAL Engine by the time the DAL for this particular table will be loaded. In situations where no DAL is present this will be the moment at which a DAL would be loaded if it existed. This means that there is no need to have a DAL in order to make use of the DBDLL.

Interaction with db operations
When one of the following database operations is executed stand-alone (so not as part of the standard save/deletes of the 4GL Engine or DAL Engine):

db.insert()
db.update()
db.delete()
and the DB DLL for the related table is present, the DBDLL will be loaded prior the database operation. This means that there is no need to have a DAL or a session in order to make use of the DBDLL. During the execution of the hooks (initiated by a database operation) the boolean initiated.by.dal will be false.

Preconditions
A DLL becomes a DBDLL when it meets the following conditions:

Its name is consisting of the table code with 'db' as suffix, like whinh200db
It includes bic_dal, as follows: #include <bic_dal>
Restrictions
A DBDLL is treated like a regular DAL. This means all kind of DAL related functionality can be used, like:

Function with.old.object.values.do()
Function with.object.set.do()
Pre-defined variable subdal
Note however that the following restrictions apply:

Business methods cannot be implemented in a DBDLL Instead the business logic should be programmed in another (separate) general DLL.
It is strongly discouraged to define other external functions in a DBDLL and link the DBDLL directly to other scripts. Instead, use a normal general DLL. (This also applies to regular DALs).
The execution of db hooks can be enabled/disable with the following commands

disable.db.dll()
enable.db.dll()
DB Hooks
A DBDLL script can contain the following hooks:

db.before.insert()
db.after.insert()
db.before.update()
db.after.update()
db.before.delete()
db.after.delete()
__________________
Regards,

Bhushan

Unless you try to do something beyond what you have already mastered, you will never grow!
Reply With Quote
  #3  
Old 22nd April 2015, 09:30
pillai.ganesh's Avatar
pillai.ganesh pillai.ganesh is offline
Senior Member
 
Join Date: Apr 2011
Location: United Arab Emirates
Posts: 105
pillai.ganesh is on a distinguished road
Baan: ERP LN 6.1 - DB: Oracle, SQL, Informix - OS: Windows
Thanks a lot for that Bhushan It is really a nice move by Infor Tools...

But dbDLL is not helping to solve my problem.
Like, what if I want to disable a field on a session based on my custom logic... or
what if I want to set values of my cdf fields as soon as a standard field is changed (i.e. even before the user clicks on save).
-> I will have to write Wrappers for this... which seems to be a session dependent and hectic task.

So, when the Tools has provided us with DAL2... I was considering how easy the developers life will be if UEDLL for DAL2 hooks come.
But this is just a thought Wanted to know views of other developers on this.

But for the reality I have 1 more Question:
Where can I write Query extensions to Standard Sessions, if not in Wrappers?
Reply With Quote
Sponsored Links
  #4  
Old 22nd April 2015, 09:45
bhushanchanda's Avatar
bhushanchanda bhushanchanda is offline
Guru
 
Join Date: Sep 2012
Location: India
Posts: 2,287
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,

If the standard table is without DAL, you can create one and do this in DAL(Just keep in mind, the check.input sections on the UI script wont work anymore if DAL exists)-

Code:
function extern long before.open.object.set()
 {
    query.extend.select("qmptc021.cual")
    query.extend.from("qmptc021")
    query.extend.where(":qmptc015.algo refers to qmptc021")
 }

Other than this ans wrappers, I do not see anyother place.

And yes, it would be nice to have such solutions. But, that will reduce the challenges developers face during customization's and will surely degrade the value of a developer. So, I will let it be as it is and let the developers find their own ways to do wonders

With HTMLUI, already a lot of things have already been taken away from Tools.
__________________
Regards,

Bhushan

Unless you try to do something beyond what you have already mastered, you will never grow!
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Developer guide for ION Workflow hooks pillai.ganesh DEM & Workflow 4 8th August 2017 13:55
Can you easily change field to 'read only' status ? metropoj Tools Development 7 8th September 2012 18:01
UE Script pur615 Tools Development 14 10th February 2011 20:30
Using DAL Property Hooks without dal.update dbclark79 Tools Development 10 15th August 2002 08:26


All times are GMT +2. The time now is 01:49.


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