Baanboard.com

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

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 4th August 2017, 12:14
IndoTech's Avatar
IndoTech IndoTech is offline
Member
 
Join Date: Jul 2005
Posts: 72
IndoTech is on a distinguished road
Baan: Baan IV, Infor LN 10.4 - DB: SQL-Server2000, Oracle, Informix - OS: Windows NT, Unix
User Exit query
Baan: ERP LN 6.1 FP10 (Infor ERP 10.4)
C/S: Both

Hi

When exactly these User exit functions get executed or what exact difference between these functions or when to use which UE function?

1) ue.before.before.save.object(long mode) and

2) ue.after.before.save.object(long mode)

Regards
Kedar
Reply With Quote
Sponsored Links
  #2  
Old 4th August 2017, 12:59
bdittmar's Avatar
bdittmar bdittmar is offline
Guru
 
Join Date: Apr 2002
Location: Germany, 50.584097,8.544078
Posts: 1,639
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
UE hooks

Code:
User Exit DLL Overview
Overview

A User Exit DLL (UEDLL) is a DLL that will reside outside the standard software. It will have the same name as a standard DAL with the extension 'ue' (for 'user exit'). E.g. 'whinh200ue' for table whinh200. Customers can implement a UEDLL in order to be able to define extra business logic before and after the standard 'before' and 'after' handling of saves and deletes, by means of specific hooks that will be executed by the 4GL engine and/or DAL Engine. In this way it is possible to e.g. conditionally publish data changes to the outside world.

Interaction with 4GL Engine / DAL Engine

When present, the User Exit 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 UEDLL.

Preconditions

A DLL becomes a UEDLL when it meets the following conditions:

Its name is consisting of the table code with 'ue' as suffix, like whinh200ue
It includes bic_dal, as follows: #include <bic_dal>
Restrictions

A UEDLL 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 UEDLL Instead the business logic should be programmed in another (separate) general DLL.
It is strongly discouraged to define other external functions in a UEDLL and link the UEDLL directly to other scripts. Instead, use a normal general DLL. (This also applies to regular DALs).
User Exit Hooks

A UEDLL script can contain the following hooks:

ue.before.before.save.object()
ue.after.before.save.object()
ue.before.after.save.object()
ue.after.after.save.object()
ue.before.before.destroy.object()
ue.after.before.destroy.object()
ue.before.after.destroy.object()
ue.after.after.destroy.object()
Related topics
Code:
ue.before.before.save.object()
Syntax:

function extern long ue.before.before.save.object  ( [long mode])

Description


This hook is called in case data is saved, either by the user pressing the save button on the UI, or programmatically when one of the functions dal.save.object(), dal.new(), or dal.update() is called.

Note that this hook is not executed in case a db.insert() or a db.update() is done.

In case a DAL is present, this hook is executed just before the before.save.object() hook.

In case no DAL is present, this hook is executed just before the main.table.io:before.write: and main.table.io:before.rewrite: UI script sections.


Arguments

[long mode ] This parameter contains either the value DAL_NEW in case of an insert, or DAL_UPDATE in case of an update.
 
 
Return values

This hooks returns 0 if saving the record is permitted. It should return a negative value like DALHOOKERROR, in case of an error.

Context

This function can be used in UEDLL script types.
Code:
ue.after.before.save.object()
Syntax:

function extern long ue.after.before.save.object  ( [long mode])

Description


This hook is called in case data is saved, either by the user pressing the save button on the UI, or programmatically when one of the functions dal.save.object(), dal.new(), or dal.update() is called.

Note that this hook is not executed in case a db.insert() or a db.update() is done.

In case a DAL is present, this hook is executed just after the before.save.object() hook.

In case no DAL is present, this hook is executed just after the main.table.io:before.write: and main.table.io:before.rewrite: UI script sections.


Arguments

[long mode ] This parameter contains either the value DAL_NEW in case of an insert, or DAL_UPDATE in case of an update.
 
 
Return values

This hooks returns 0 if saving the record is permitted. It should return a negative value like DALHOOKERROR, in case of an error.

Context

This function can be used in UEDLL script types.
__________________
//Bernd
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
DEM - Can a normal user be authorized for 'Execute SQL Query' session? syarragu DEM & Workflow 4 8th September 2010 14:21
Application exporting data from BaaN Automatically alopezsantam Tools Development 19 5th November 2009 11:08
Problem with Convert SSA ERP User to Database User instant000 Operating Systems & Databases 1 17th March 2009 17:29
BaaN / Excel penawils AFS/DDC/OLE: Function servers 11 18th December 2008 15:11
User Authorizations for SQL query gbnbabu Tools Administration & Installation 2 14th September 2004 13:02


All times are GMT +2. The time now is 16:35.


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