Welcome at schweda.net | EN | DE
 
 
 
 
 
These posts are machine-translated.

You can use the following line code to release a product in another company:

EcoResProductReleaseSessionManager ecoResProductReleaseSessionManager;
   
ecoResProductReleaseSessionManager =
EcoResProductReleaseSessionManager::newReleaseSession();

ecoResProductReleaseSessionManager.addProduct(52565549190);
ecoResProductReleaseSessionManager.addLegalEntityForAllProducts(
CompanyInfo::findDataArea('USP2').RecId);

if( !ecoResProductReleaseSessionManager.execute())
{
    error("An error occured");
}

If you have to lock a dialog field within a SysOperation-framework, which is integrated via a parm method, you can use code like the following.

public void postBuild()
{
    DialogField df_SalesId;

    super();

    df_salesId =
    this.bindInfo().getDialogField(this.dataContractObject(),
                                   methodStr(DEV_SalesUpdateDatacontract, parmSalesId));

    if(df_salesId)
    {
        df_salesId.allowEdit(false);
        df_salesId.skip(true);
    }
}

ConViewYou can use conView() to display the contents of a container.

static void conViewExample(Args _args)
{
    container con;
   
    con = conIns(con, conLen(con)+1, ["Mazda", 2]);
    con = conIns(con, conLen(con)+1, ["Volkswagen", 1]);
    con = conIns(con, conLen(con)+1, ["Ferrari", 3]);
   
    conView(con);
}

Sometimes you just need the length of an extended data type (EDT):

new SysDictType(extendedtypenum(costingversionid)).stringLen()

Consider the following scenario: In the dialog of a SysOperation construct, a field must be manipulated depending on other fields, for example, the AllowEdit property should be changed.

Dialog

In the following you will find the code for a DataContract and the corresponding UIBuilder, in which the corresponding program logic is to be installed.

Here, depending on the selection in the Module field, you can either activate the Customer account field or the Vendor account field.

DataContract

[DataContractAttribute, SysOperationContractProcessingAttribute(classStr(TutorialSysOperationUIBuilder))]
public class TutorialSysOperationDataContract
{
    ModuleCustVend moduleCustVend;
    CustAccount custAccount;
    VendAccount vendAccount;
}

 


Sometimes you just need the length of a field of a table:

new SysDictType(SysDictField::findFieldByName(tableStr(SalesTable), identifierStr(SalesId)).typeId()).stringLen();

In the following scenario, all records of a temporary table are to be passed to a SysOperation construct.

For that we need:

  • In the DataContract, a parm-method that takes a container
  • In the controller, a logic that iterates the records of a calling data source and packs it into a container, and passes it to the service using the above method
  • In the service class we need code, which unpacks and processed the transferred container

 

Controller

class TutorialSysOperationController extends SysOperationServiceController
{
}

Pages 1 2 3 4 ... 18 » 

 

 
Feeds
RSS RSS feed
 
 
posts of the actual month
Oktober 2017
MoDiMiDoFrSaSo
 1
2345678
9101112131415
16171819202122
23242526272829
3031 
 
 
© 2006-2016 Heinz Schweda | Imprint | Contact | German version | Mobile version
In order to provide you with better service, this site uses cookies. By continuing to browse the site, you are agreeing to our use of cookies.