mardi 31 mai 2011

How to pass parameters from SalesTable Form to SalesFormLetter class

Here is a sample :

static void  main(Args  args)
   

    formrun           fr;
    Object             callerForm;
    ;

    if (! args)
        throw error("@SYS25407");

    if(record.TableId == tablenum(SalesTable))
    {
        fr                = args.caller();
        if( fr.args().parm() == '1')
        {
            Proforma        = true;
        }
        else
        {
            Proforma        = false;
        }
        args.parm(fr.args().parm());
        globalCache.set(curuserid(), 1, Proforma);
    }
    else
    {
        callerForm = args.caller();
    }

.
.
.

in the clicked method of a menuItem of SalesTable Form Button, we have this code

void clicked()
{

    boolean             ProformaOk;
    Args args           = new Args();
    ;
    element.args().parm('1');
    super();
}

Aucun commentaire:

Enregistrer un commentaire