Baanboard.com

Go Back   Baanboard.com

User login

Frontpage Sponsor

Main

Poll
What is your current Baan flavour?
Triton (3.x)
0%
BaanIV (4.x)
46%
BaanERP (5.x)
12%
ERP LN (6.x)
42%
Total votes: 213

Reference Content

 
dal.start.business.method()
By patvdv at 26 Feb 2008 - 21:57

dal.start.business.method()

Syntax

void
         dal.start.business.method( long|string set_id, string
         name, ref long retval [, arg]... )




Description

This starts a specified business method.

The business method must be implemented as a function of type EXTERN LONG. If this is the first call to a particular class (that is, table), the before.open.object.set() hook is automatically called before the business method is called.

Arguments

set_id

Indicates the name of the DAL that implements the business method. The set_id argument can be a long (use in external programs) or a string (use in UI scripts).

name

The name of the business method.

retval

The return value.

Negative values are reserved for the calling mechanism. For example:

-1 DALNOOBJSET

-2 DALNOMETHOD

The business method may return only DALHOOKERROR, 0, or positive numbers.

arg

Use these optional arguments to pass arguments to the business method.

Context

DAL function.

Example

 dal.start.business.method("cfcmd100", "print.object.set", ret, feature.f, feature.t)

 function extern long print.object.set(
                         domain cfcmd.feat       feature.f,
                         domain cfcmd.feat       feature.t),
 {
         domain  dcbool  show.pi

         show.pi = tcmcs.dll0011.show.progress.indicator()
         if show.pi then
                 init.progress.indicator(feature.f, feature.t)
         endif

         select cfcmd100.*
         from cfcmd100
         where   cfcmd100.feat inrange :feature.f and :feature.t
         order by cfcmd100._index1
         selectdo
                 if show.pi then
                         |* calculate progress percentage
                         prgi.val = prgi.val + prgi.stp
                         if prgi.tot > 0 then
                                         prgi.prc = (prgi.val / prgi.tot) * 100
                         endif
                         if change.progress.indicator(prgi.prc) then
                                         |* user pressed cancel/stop button
                                         return(0)
                         endif
                 endif
                 prnt.data = "cfcmd110"
                 print.record(1)
         endselect
         return(0)
 }

Related topics



0
No votes yet


All times are GMT +2. The time now is 14:54.


©2001-2008 - Baanboard.com - Baanforums.com