V10 ResourcesReference
ResourcesReference
Reference
Back | List of Articles

How to use the PRIMAVERA ERP SDK controls?

Last changed in 02/12/2020

The SDK is a library of standards and business components for the PRIMAVERA environment. It allows partners and external development teams to quickly and easily create ERP add-ons.

Using the SDK beings several advantages, among which, we highlight:

  • Accelerating development processes;
  • Standardizing processes, interfaces and user experience in the ERP.

Using the SDK

Step 1 - Referencing

To be able to use the SDK, you need to add the components from the PRISDK100.dll assembly available under 'PRIMAVERASG100APL' to the toolbox.

 width=

Step 2 - Initializing the SDK context

After referencing the PRISDK100.dll assembly, all you need to do is select the desired control in the toolbox and proceed with the initialization of the usage context.

This context is simply a verification of the environment where controls are being run, since these should only be used in the context of the ERP. In other words, this is the moment when you start the platform and the engine.

This initialization should be run preferably when the form is loaded (in the form's load event)

Note: The SDK context only needs to be initialized once.

//The gobal variable that holds the context and must be passed to the controls.
private clsSDKContexto sdkContexto;

//Function that initializes the SDK context.
private void InicializaSDKContexto()
{
   if(sdkContexto == null)
   {
      sdkContexto = new clsSDKContexto();

      //Initialize the SDK contexto from the BSO object and corresponding module.
      sdkContexto.Inicializa(BSO, 'ERP');

      //Initialize the platform in the context and verify the digital signature.
      PSO.InicializaPlataforma(sdkContext);
   }
}

Step 3 - Initializing controls

After adding the forms, all controls must be initialized with the previously created context.

To do this, call the Initialize() method for each control, as shown below.

Like in the previous step, this initialization should also preferably be performed when the form is loaded (in the form's load event).

//The gobal variable that holds the SDK context created in step 2 is passed by parameter.
Control.Inicializa(sdkContexto)
Bookmark or share this article
Esta página foi útil?
Obrigado pelo seu voto.

login para deixar a sua opinião.

Obrigado pelo seu feedback. Iremos analisá-lo para continuarmos a melhorar!
Artigos Relacionados
Características das entidades e serviços Conceito de integração Conceito de extensibilidade Como registar projetos de extensibilidade? Boas práticas de organização de projetos de integração
Últimos Artigos Vistos
Using the Observer Pattern in V10