Anda di halaman 1dari 154

Extensibility Manual

ERP PRIMAVERA V8.10

Version 1.0
March 2013

Content
Content .............................................................................................................................. 2
Introduction ....................................................................................................................... 6
Extensibility ....................................................................................................................... 7
Application Engines .........................................................................................................7
Platform Engines .............................................................................................................7
VBA Visual Basic for Applications ..................................................................................8
User Fields and Tables .....................................................................................................8
User Tabs and Forms .......................................................................................................8
User Functions .................................................................................................................8
User Processes ................................................................................................................9
User Menus ......................................................................................................................9
Navigator ........................................................................................................................9
Lists ................................................................................................................................9
User Maps ......................................................................................................................10
Integration Technologies ...............................................................................................10
Module Engines ................................................................................................................ 12
COM Technology and Windows DNA Architecture ...........................................................12
Engine Architecture .......................................................................................................13
Business Objects (BE) ....................................................................................................14
Business Services (BS) ..................................................................................................15
Data Services (DS).........................................................................................................17
Use of Engines in External Applications ..........................................................................18
Integration of the Engine in the Project ............................................................................. 18
Opening the Engine ........................................................................................................ 19
Customer Creation ......................................................................................................... 20
Platform Engines .............................................................................................................. 22
PRIMAVERA Administrator .............................................................................................22
References .................................................................................................................... 22
Opening the Engine and Execution of the Service .......................................................... 23
Platform Services (StdPlatBS)........................................................................................24
References .................................................................................................................... 24
Service Execution .......................................................................................................... 24

Pg 2

VBA Visual Basic for Applications ................................................................................... 26


IDE ................................................................................................................................26
VBA Project ...................................................................................................................28
Macros ...........................................................................................................................28
Classes ..........................................................................................................................29
Events ...........................................................................................................................30
Base Tables Maintenance ................................................................................................ 30
Editors ......................................................................................................................... 31
Objects ..........................................................................................................................32
Aplicacao ...................................................................................................................... 33
PlataformaPRIMAVERA .................................................................................................... 34
User Fields and Tables ...................................................................................................... 36
User Fields in Applications .............................................................................................40
User Fields in Maintenance with Tabs ................................................................................ 40
User Fields in Maintenance without Tabs ............................................................................ 40
User Fields in Documents ................................................................................................ 41
User Tables ....................................................................................................................43
User Tabs and Forms ........................................................................................................ 44
User Tabs ......................................................................................................................44
To create a User Tab ...................................................................................................... 44
User Forms ....................................................................................................................48
Create a User Form ........................................................................................................ 48
User Functions ................................................................................................................. 51
Examples of User Functions ...........................................................................................52
E-mail Message ............................................................................................................. 52
Parameters Definition ..................................................................................................... 55
Result Definition: ...................................................................................................... 57
External Application........................................................................................................ 57
Parameters Definition: .............................................................................................. 58
Result Definition: ...................................................................................................... 59
Macro VBA .................................................................................................................... 60
Definition of Parameters: ........................................................................................... 61
Result Definition: ...................................................................................................... 62
Query SQL .................................................................................................................... 62

Pg 3

Parameters Definition: .............................................................................................. 63


Definition of the Result: ............................................................................................. 64
Parameters ....................................................................................................................65
Fixed Value ................................................................................................................... 65
List of Fixed Values ........................................................................................................ 66
List Defined By an SQL Query .......................................................................................... 67
Formula ........................................................................................................................ 69
Function ....................................................................................................................... 70
Execution ......................................................................................................................70
User Menus ...................................................................................................................... 76
To create a Submenu ..................................................................................................... 77
To create a Command .................................................................................................... 78
User Processes ................................................................................................................. 81
Configuration Environment ............................................................................................82
To define the main properties of the Process ...................................................................... 84
Steps Definition .............................................................................................................85
Definition of Conditions .................................................................................................94
Definition of Parameters and Results .............................................................................96
Execution Environment ..................................................................................................97
User Alerts ....................................................................................................................... 98
Warning Definition.........................................................................................................99
Execution Environment ................................................................................................ 106
Results ........................................................................................................................ 108
User Indicators............................................................................................................... 109
Indicator Definition ..................................................................................................... 110
Navigator ....................................................................................................................... 117
Shortcuts ..................................................................................................................... 119
To create a shortcut to an external application ................................................................. 119
To create a shortcut to a Web page ................................................................................ 121
To create a shortcut for an application menu .................................................................... 122
To create a shortcut to a User Function ........................................................................... 122
To create a shortcut to a User Process ............................................................................ 123
To create a shortcut to a Company ................................................................................. 123
Lists ............................................................................................................................... 124

Pg 4

Information Categories ................................................................................................ 124


Creation of Lists........................................................................................................... 125
Sorting of Records ....................................................................................................... 133
Sorting Columns .......................................................................................................... 134
Aliases ....................................................................................................................... 135
Expressions (Calculated Values) ..................................................................................... 135
Conditions .................................................................................................................. 137
Aggregate Totals.......................................................................................................... 142
Conditions on Aggregate Totals ...................................................................................... 142
Grouping .................................................................................................................... 143
Conditional formatting .................................................................................................. 145
List Query ....................................................................................................................... 147
Operations on a List........................................................................................................ 148
Default Searches and Lists .............................................................................................. 149
Categories ...................................................................................................................... 151
User Maps ...................................................................................................................... 152
To duplicate a Map ....................................................................................................... 152
To change the design of a Map ....................................................................................... 153

Pg 5

Introduction
The Extensibility of applications is a central concept in ERP PRIMAVERA in that it allows the standard
solution to be supplemented with additional features and to intervene in the core features of each application
to meet the specific needs of each business or customer in particular.
The objective of this manual is to document - within the context of the PRIMAVERA Partners - the most
important ERP PRIMAVERA extensibility tools, presenting their conceptual architecture, practical examples of
their application and the competitive advantages they are able to provide.
The information presented refers to PRIMAVERA Platform version 8.10 and PRIMAVERA EXECUTIVE
version 8.10.

In order to see the most up to date version of this manual, we suggest you check online in PRIMAVERA
KnowledgeBase.

PKB

Extensibility Manual

Pg 6

Extensibility
The concept of Extensibility refers to the ability to alter and extend the features of the various ERP
PRIMAVERA modules and applications, adapting them to the specific needs of each particular
customer/business/implementation.
Considering that PRIMAVERA is a company specialized in the development of standard management
solutions (directed essentially at the administrative and financial areas of organizations) it is, nonetheless,
necessary for its products - and its EXECUTIVE solutions in particular - to increasingly incorporate
extensibility technologies.
Over the course of time and evolution of PRIMAVERA products there have been several technologies that
were developed and exploited and are today a very powerful tool at the disposal of the implementation
services of PRIMAVERA and its partners. These technologies permit, for example:

The reuse of the ERP features from external applications;

The reuse of code and the most common features that a programmer needs and
that the PRIMAVERA platform provides;

The intervention and adaptation of the behavior of the main ERP features;

The extension of the database or the data exploration tools provided by the ERP;

The automation of specific business processes;

The integration of external solutions and applications in the ERP;

The adaptation of the ERP to the needs of each user.

Application Engines
All PRIMAVERA applications are developed in accordance with the Windows DNA architecture and
internationally recognized standards of components development through layers, provided through DLLs
COM.
This architecture permits the reuse of all the main features of the applications (the business rules) from any
other external application such as Microsoft Excel.

Platform Engines
The PRIMAVERA Platform consists of a set of components that provide the most core features (example:
map printing or exporting of records) of the ERP and the common features among all modules (example: the
link to the database or the permissions system).

Pg 7

Although these components were specifically conceived to be consumed by PRIMAVERA applications, many
of their features are also exposed for any external application through components (engines) that may be
reused, reducing the development effort involved in implementation.

VBA Visual Basic for Applications


PRIMAVERA Business Software Solutions has been a pioneer in the integration of VBA (Visual Basic for
Applications) technology in Portugal since version 4.00 of the Professional Line.
This internationally recognized technology offers the programmer the possibility of intervening in the "normal"
behavior of the application, through the implementation of the behavior (code) associated with each one of its
events (examples: before editing a client, after saving an invoice).

User Fields and Tables


The structure of the database associated with each company registered in the PRIMAVERA system can be
adapted by creating new fields in system tables (CDU - User Fields) or creating new tables (TDU - User
Tables) to store additional data.

User Tabs and Forms


In addition to the adaptation of the behavior (VBA) of the applications and data structure (CDU and TDU),
ERP PRIMAVERA also provides the possibility of intervening at the level of the applications' interface through
the creation of new tabs in the standard forms (SDU - User Tabs) or forms developed from grass-roots level
(FDU - User Forms) and integrated in the applications.

User Functions
A User Function (XDU) corresponds to the definition of an action - among the various types of actions
available (sending messages, exporting maps, execution of VBA macros, etc.) - that can interact with the user
(through the request for parameters and the presentation of results) and the system (VBA, engines, etc.) to
automate a particular task.
Given its characteristics, the User Functions are the central component of the 2nd Generation extensibility
technologies (provided as from version 3 of the Corporate Line) and are used for the implementation of
several other tools such as User Processes and User Menus.

Pg 8

User Processes
User Processes (PDU) permit the graphic definition of workflows (sequences of User Functions merged into
one another) that facilitate the automation of repetitive processes (examples: automatic orders or processing
of bonuses) and their integration in the ERP to implement specific needs of each implementation.

User Menus
The User Menus allow the application menus to be supplemented through the inclusion of new options that
will execute a specific User Function (which, for example, opens an external application or initiates a particular
background operation).

Navigator
In this version the Browser had suffer a major restructuration.
The Navigator is the "entry point" for all modules and provides users with a central point from which to access
all the application features (lists, menu options, documents, shortcuts, etc.) configured according to their
preferences and permissions.
From the implementation viewpoint, the Navigator is also a powerful configuration tool because it allows:

Adapting the features provided by each application to each user;

Integrating external tools and applications in the PRIMAVERA work environment.

Lists
One of the most important components in the implementation of an integrated management solution is related
with the data exploration tools managed in the system and their adaptation to the needs of each user.
Since the first version of the PRIMAVERA applications, lists provide the primary method to access the main
data (the client, sales document, current account lists, etc.).
As from version 3 of the Corporate Line, the ERP PRIMAVERA includes a powerful assisted configuration
system of lists through information categories that relate all the tables in the database and allow the user to,
among other functions:

Define the fields of each table that must be presented for each list;

Pg 9

Establish automatic relations between the various tables of each category


(example: clients and salespersons);

Define filters and conditions to restrict the results and adapt them to the needs of
each user;

Define various list configuration and presentation options;

Create dynamic and parameterized lists that present different data according to the
conditions selected by the user at execution time.

User Maps
The PRIMAVERA applications provide all maps (printings) through the use of Crystal Reports.
This tool - clearly an international standard at this level - allows the various maps of the application to be
adapted (or new maps created) in accordance with the business rules of each implementation.
The PRIMAVERA Partners perform an indispensable role in PRIMAVERAS business. The acknowledgement
of that role - in the complementary solutions that they offer final clients as well as implementation services resulted in the availability, by PRIMAVERA, of technologies that facilitate the integration of its solutions with
standard solutions.
At this moment the following integration technologies are available:

The PRIMAVERA Integration Technology (TIP): allows the Integrator Partners to


develop and certify solutions that use the PRIMAVERA application engines and
are integrated (according to the defined rules) in the EXECUTIVE Platform
(namely, the Administrator);

The Document Integration Technology (TID): allows the Integrator Partners,


specialized in the development of Document Management solutions, to integrate
the features of their solutions in PRIMAVERA applications.

Integration Technologies
The PRIMAVERA Partners perform an indispensable role in PRIMAVERAS business. The acknowledgement
of that role - in the complementary solutions that they offer final clients as well as implementation services resulted in the availability, by PRIMAVERA, of technologies that facilitate the integration of its solutions with
standard solutions.
At this moment the following integration technologies are available:

The PRIMAVERA Integration Technology (TIP): allows the Integrator Partners to


develop and certify solutions that use the PRIMAVERA application engines and
are integrated (according to the defined rules) in the EXECUTIVE Platform
(namely, the Administrator);

Pg 10

The Document Integration Technology (TID): allows the Integrator Partners,


specialized in the development of Document Management solutions, to integrate
the features of their solutions in PRIMAVERA applications.

Pg 11

Module Engines
COM Technology and Windows DNA Architecture
All PRIMAVERA applications are developed based on COM technology and the Windows DNA architecture.
This architecture model in 3 levels, allows the provision of access to the intermediate layer through different
interfaces and in a way that does not allow the logic inherent to the operation of the applications to be
subverted.
This layer is composed by a set of components (routines), which make up about 70% of the code of a product,
also known as "Rules of the Business". This is a part of the application, whose code is very likely to withstand
the constant mutations of technology.

The access to information from the interface through the business objects model guarantees the fulfilment of
the business rules established in ERP PRIMAVERA as well as independence in relation to the data model.
This fact constitutes the fundamental element of the PRIMAVERA Integration Technology (TIP).
On the other hand, the use of this technology allows different objects to be shared by different applications
within ERP PRIMAVERA. For example, the access to the Movements window of the Accounting module
directly from the Sales/Orders Editor of the Sales module.

Pg 12

This possibility exists not only among the various ERP modules, but also in external applications that can use
the different Application Engines. For example, the access from Microsoft Excel or an application developed
by the user to the saving of movements in the Accounting module or invoices in the Sales module

Engine Architecture
Conceptually, the architecture of the ERP PRIMAVERA engine, structured in three layers, isolates the access
to the data, enabling its reuse by external applications without compromising the integrity of the data.
The engine of an application is composed by a set of DLLs COM that may be referenced and used from
external applications, provided they are registered in the system and included in the respective project.

User
Interface

AplUS800.dll

Business
Services

ErpBS800.dll

IAplBS800.dll

AplBE800.dll

AplBS800.dll

Data
Services

ERPDS800.dll

IAplDS800.dll

AplBE800.dll

AplDS800.dll

Data Structure

Pg 13

The previous diagram presents the architecture and organization of the engine of one or more modules that
will be composed by the following DLLs:
AplBE800.dll

Business objects.
Represent the entitites managed by the engine and the application.

ErpBS800.dll

Permits access to the Business services of each Module/Area.

IAplBS800.dll 1

Implement the interfaces for the Business Services.

AplBS800.dll 1

Business Services.
Provide all the business rules.

IAplDS800.dll 1

Implement the interfaces for the Data Services.

AplDS800.dll

Data Services.
Provide all the data loading and saving services from the database.

Business Objects (BE)


All the business objects (or entities) managed by each application are provided through simple objects with a
set of properties in DLL AplBE800.dll.
The nomenclature of the objects is as follows:
<Apl>BE<Name>
Examples:

GcpBEDocumentoVenda

(Logistics and Treasury Area)

GcpBEDocumentoCompra

(Logistics and Treasury Area)

RhpBEFuncionario

(Human Resources Area)

CblBEConta

(Accounting Area)

As an example, in the case of a Sales Document, the programmer will have access to an object type
GcpBEDocumentoVenda that is composed by a header (with several properties) and a set of details (for
example: the document lines).

The abbreviation Apl must be substituted by the nomenclature associated with each
module/area. Therefore, for example, for the Logistics & Treasury area it must be IGcpBS800,
GcpBE800,...

Pg 14

Each object will have a set of properties that basically correspond to the fields used in the database to store
the entity:

Anulado (Annulled)

Arredondamento (Rounding)

Arredondamento IVA (RoundingVat)

Cambio (Exchange Rate)

CodigoPostal (Postal Code)

CondPag (Cond Payment)

DataCarga (Date Load)

()

Business Services (BS)


The DLL ErpBS800.dll is the entry point in the ERP engine. This DLL provides access to all the engine
services for each module (AplBS800.dll) that implements all the business rules.
This will be the component used to access the application engine from an external application.

Using this component to, for example, create a new client using the Logistics & Treasury area engine, we can
guarantee that the creation of that entity will observe all the business rules required by PRIMAVERA
applications (example: validations).
Each engine service is provided through a class that can be accessed through the main class of the engine
(ErpBS). The nomenclature of those services is as follows:
I<Apl>BS<Name>
Examples:

Pg 15

IGcpBSClientes

(Logistics and Treasury Area)

IRhpBSFuncionarios

(Human Resources Area)

ICblBSDiarios

(Accounting Area)

In the case of the Logistics & Treasury area engine the services tree is similar to the following:

Each one of the service classes implements a set of typical methods that carry out the most important
operations regarding each entity type:

Actualiza

Inserts or updates a new entity.

ActualizaValorAtributo

Updates the value of an existing entity's attribute.

ActualizaValorAtributo
s

Updates the value of several attributes of an existing entity.

DaValorAtributo

Returns the value of an existing entity's attribute.

DaValorAtributos

Returns the value of several attributes of an existing entity.

Edita

Returns an existing entity.

Existe

Checks if a specific entity exists.

Remove

Removes an entity from the system.

Pg 16

ValidaActualizacao

Checks if an entity can be updated.

ValidaRemocao

Checks if an entity can be removed.

As an example, let us consider the signature of these methods for the Client services of the Logistics &
Treasury area:
Private Sub IGcpBSClientes_Actualiza(ByVal BECliente As GcpBECliente)
Private Sub IGcpBSClientes_ActualizaValorAtributo(ByVal strCliente As String, ByVal
strAtributo As String, ByVal varValor As Variant)
Private Sub IGcpBSClientes_ActualizaValorAtributos(ByVal strCliente As String, ByRef
Atributos As StdBECampos)
Private Function IGcpBSClientes_DaValorAtributo(ByVal strCliente As String, ByVal
strAtributo As String) As Variant
Private Function IGcpBSClientes_DaValorAtributos(ByVal strCliente As String, ParamArray
Atributos() As Variant) As StdBECampos
Private Function IGcpBSClientes_Edita(ByVal strCliente As String) As GcpBECliente
Private Function IGcpBSClientes_Existe(ByVal strCliente As String) As Boolean
Private Sub IGcpBSClientes_Remove(ByVal strCliente As String)
Private Function IGcpBSClientes_ValidaActualizacao(ByVal BECliente As GcpBECliente,
ByRef StrErro As String) As Boolean
Private Function IGcpBSClientes_ValidaRemocao(ByVal strCliente As String, ByRef StrErro
As String) As Boolean

Data Services (DS)


The DLL IAplDS800.dll provides all data access services (interaction with the database).
The services of this component have a direct virtual correspondence with the same services of Business
Services (BS). In reality, each BS service, whenever it needs to access the database, does so through the
corresponding service/method in the DS. This separation would permit, for example, the data source to be
changed adapting only the data layer (DS) and not changing the business rules (BS) layer.

Pg 17

Warning

This application engine component must never be referenced from external applications. Its services must always be executed
through the business layer (ErpBS).

Use of Engines in External Applications


Since the internal architecture of the ERP PRIMAVERA engine has been shown, it is useful to demonstrate its
potentialities through an example of its use from an external application.
Let us consider the following example:

The client possesses an external CRM system where the company's potential clients are recorded;

The objective is to use the Logistics & Treasury area engine to record in ERP PRIMAVERA the
clients managed in an external CRM system, when these carry out their first order.

The example presented below was developed in Visual Basic 6 for two reasons:
1) Because it is the preferred development tool used by PRIMAVERA;
2) Because it includes features that simplify the integration of COM components.
Note, however, that the PRIMAVERA engine components can be used in other programming environments. All the most recent
programming languages include features that permit COM components to be referenced in a relatively simple manner.

Integration of the Engine in the Project


To be able to use any COM component in a VB6 project it is merely necessary to add the adequate
references to the project.
Since we will be using the Logistics and Treasury area engine the necessary references are the following:

PRIMAVERA StdBE 8.00


PRIMAVERA GcpBE 8.00
PRIMAVERA ErpBS 8.00

Pg 18

Opening the Engine


Before it is possible to carry out any operation through the engine it is necessary to open the working
company using the generic "AbreEmpresaTrabalho" method:
Private Sub cmdSincro_Click()
Dim objMotorErp As ErpBS
On Error GoTo Erro
'Abertura do motor
If Not (objMotorErp Is Nothing) Then objMotorErp.FechaEmpresaTrabalho
Set objMotorErp = Nothing
Set objMotorErp = New ErpBS
objMotorErp.AbreEmpresaTrabalho tpEmpresarial, m_strEmpresa, m_strUtilizador,
m_strPassword, Nothing, m_strInstancia, False
'Fecho do motor
objMotorErp.FechaEmpresaTrabalho
Set objMotorErp = Nothing
Exit Sub
Erro:
Set objMotorErp = Nothing
MsgBox "Erro ao efectuar a sincronizao." & vbCrLf & Err.Description, vbExclamation
End Sub

Pg 19

The "AbreEmpresaTrabalho" method requires the following parameters:


TipoPlataforma

PRIMAVERA Platform Version (EXECUTIVE or PROFESSIONAL).

CodEmp

PRIMAVERA company identifier.

Utilizador

User identifier in the PRIMAVERA system.

Password

User password.

Transaccao

Only for the use of PRIMAVERA applications (use Nothing).

Instancia

PRIMAVERA instance identifier.

ModoPrimario

Must always be False.

Customer Creation
In the case of saving a new customer it will be necessary to fill in an object type GcpBECliente and execute
the Update method of IGcpBSCliente:
Private Sub cmdSincro_Click()
Dim objMotorErp
As ErpBS
Dim objCliente As GcpBECliente
Dim objClienteCRM

As Cliente

On Error GoTo Erro


'Abertura do motor
If Not (objMotorErp Is Nothing) Then objMotorErp.FechaEmpresaTrabalho
Set objMotorErp = Nothing
Set objMotorErp = New ErpBS
objMotorErp.AbreEmpresaTrabalho tpEmpresarial, m_strEmpresa, m_strUtilizador,
m_strPassword, Nothing, m_strInstancia, False
'Cliente
CarregaCliente objClienteCRM
Set objCliente = New GcpBECliente
With objCliente
.Cliente = objClienteCRM.Codigo
.Nome = objClienteCRM.Nome
.Morada = objClienteCRM.Morada
.Localidade = objClienteCRM.Localidade
.CodigoPostal = objClienteCRM.CodigoPostal
.NumContribuinte = objClienteCRM.NumContribuinte

Pg 20

.ModoPag = objClienteCRM.ModoPag
.CondPag = objClienteCRM.CondPag
.Moeda = objClienteCRM.Moeda
End With
'Gravao
objMotorErp.Comercial.Clientes.Actualiza objCliente
Set objCliente = Nothing
'Fecho do motor
objMotorErp.FechaEmpresaTrabalho
Set objMotorErp = Nothing
Exit Sub
Erro:
If Not (objCliente Is Nothing) Then Set objCliente = Nothing
If Not (objMotorErp Is Nothing) Then
objMotorErp.FechaEmpresaTrabalho
Set objMotorErp = Nothing
End If
MsgBox "Erro ao efectuar a sincronizao." & vbCrLf & Err.Description, vbExclamation
End Sub

PKB

Engines Documentation

Pg 21

Platform Engines
The PRIMAVERA Platform consists of a set of components, used by all PRIMAVERA applications, which
provide core and common features among all applications, such as for example:

Printing of maps;

Sending of E-mail messages;

Control formatting;

Transaction treatment;

Backup;

Database management;

Etc.

PRIMAVERA Administrator
The PRIMAVERA Administrator - the general system administration application, of the companies recorded in
the system and of security - is an integral part of the PRIMAVERA Platform.
The Administrator features are presented via two distinct and complementary engines:

AdmEngine800.dll old version of the engine according to the first generation of the PRIMAVERA
Integration Technology;

AdmBS800.dll new version of the Administrator engine that follows the same architecture
described for the ERP engines.

Warning

The AdmEngine engine, in spite of providing features that are not yet available in the new engine, has had its development
discontinued. It shall be completely substituted in time by the new engine version and its use is therefore not recommended.

The use of the Administrator engine is basically identical to that described for the ERP engine. Let us consider
the following example:

Obtain a list of the companies recorded on the PRIMAVERA system.

References

PRIMAVERA AdmBE 8.00


PRIMAVERA AdmBS 8.00
PRIMAVERA StdBE 8.00

Pg 22

Opening the Engine and Execution of the Service

Private Sub cmdUsers_Click()


Dim objMotorAdm
As AdmBS
Dim objListaEmpresas

As AdmBEEmpresas

Dim objEmpresa

As AdmBEEmpresa

On Error GoTo Erro


Set objMotorAdm = New AdmBS
objMotorAdm.AbrePRIEMPRE tpEmpresarial, m_strUtilizador, m_strPassword, Nothing,
m_strInstancia
Set objListaEmpresas = objMotorAdm.Empresas.ListaEmpresas
For Each objEmpresa In objListaEmpresas
'(...)
Next
Set objListaEmpresas = Nothing
objMotorAdm.FechaPRIEMPRE
Set objMotorAdm = Nothing
Exit Sub
Erro:
If Not (objListaEmpresas Is Nothing) Then Set objListaEmpresas = Nothing
If Not (objMotorAdm Is Nothing) Then Set objMotorAdm = Nothing
MsgBox "Erro ao obter a lista de utilizadores." & vbCrLf & Err.Description,
vbExclamation
End Sub

Pg 23

Platform Services (StdPlatBS)


The common services of the PRIMAVERA Platform are provided by the StdPlatBS800.dll component.
This component has a services structure similar to the following:

These services are available from the PRIMAVERA applications - in the VBA development environment
(PRIMAVERAPlatform) - but can also be used from an external application. One of the most common
examples of this practical application is the printing of maps.

References

PRIMAVERA StdBE 8.00


PRIMAVERA StdPlatBS 8.00

Service Execution
Private Sub cmdPrint_Click()
Dim objPlat
As StdPlatBS
Dim objConfApl

As StdBSConfApl

Dim strFormula

As String

Dim strSelFormula

As String

On Error GoTo Erro

Pg 24

Set objConfApl = New StdBSConfApl


objConfApl.AbvtApl = m_strApl
objConfApl.Instancia = m_strInstancia
objConfApl.Utilizador = m_strUtilizador
objConfApl.PwdUtilizador = m_strPassword
Set objPlat = New StdPlatBS
objPlat.AbrePlataformaEmpresaIntegrador m_strEmpresa, Nothing, objConfApl,
tpEmpresarial
Set objPlat.MDIForm = MDIForm1
objPlat.Mapas.Inicializar
strFormula = "NumberVar TipoDesc;NumberVar RegimeIva;NumberVar DecQde;NumberVar
DecPrecUnit;StringVar MotivoIsencao; TipoDesc:=" & 1 &
";RegimeIva:=3;DecQde:=1;DecPrecUnit:=" & 2 & ";MotivoIsencao:=' ';"
objPlat.Mapas.AddFormula "InicializaParametros", strFormula
strFormula = "StringVar Nome; StringVar Morada;StringVar Localidade; StringVar
CodPostal; StringVar Telefone; StringVar Fax; StringVar Contribuinte; StringVar
CapitalSocial; StringVar Conservatoria; StringVar Matricula;StringVar
MoedaCapitalSocial;"
strFormula = strFormula & "Nome:='HEIM'"
strFormula = strFormula & ";Localidade:='Tocadelos'"
strFormula = strFormula & ";CodPostal:='1000 Loures'"
strFormula = strFormula & ";Telefone:='219750801'"
strFormula = strFormula & ";Fax:='219750801'"
strFormula = strFormula & ";Contribuinte:='123456789'"
strFormula = strFormula & ";CapitalSocial:='123'"
strFormula = strFormula & ";Conservatoria:='321'"
strFormula = strFormula & ";Matricula:='213'"
strFormula = strFormula & ";MoedaCapitalSocial:='EUR'"
strFormula = strFormula & ";"
objPlat.Mapas.AddFormula "DadosEmpresa", strFormula
strSelFormula = "{CabecCompras.Filial}='000' And {CabecCompras.Serie}='2004' And
{CabecCompras.TipoDoc}='" & Text1.Text & "' And {CabecCompras.NumDoc}= " & Text2.Text
objPlat.Mapas.AddFormula "NumVia", "'Original'"
objPlat.Mapas.SelectionFormula = strSelFormula
objPlat.Mapas.ImprimeListagem "GCPCLS01", "TESTE", "W", 1, "S", strSelFormula,
soNenhuma, , True
objPlat.FechaPlataformaEmpresa

Pg 25

Set objPlat = Nothing


Set objConfApl = Nothing
Exit Sub
Erro:
If Not (objPlat Is Nothing) Then Set objPlat = Nothing
If Not (objConfApl Is Nothing) Then Set objConfApl = Nothing
MsgBox "Erro: " & Err.Number & " - " & Err.Description
End Sub

PKB

Engines Documentation

VBA Visual Basic for Applications


Microsoft Visual Basic for Applications (VBA) enables the extension of the PRIMAVERA solution by creating
customized features, productivity applications and solutions beyond the scope of the ERP modules.
Implementers of PRIMAVERA solutions who know the Visual Basic programming environment, will find the
VBA a familiar and comfortable environment. Given that nowadays this technology is widely disseminated as
a programming tool, it is perfectly logical that PRIMAVERA solutions provide it as a mainstream extension
technology that permits:

Access to the actual objects maintained and manipulated in the context of each of the main
operations - customer maintenance, sales editors, etc.;

Association of code to certain events triggered by the most important application operations;

Creation of user tabs for editing user fields associated to each entity;

Creation of user forms;

Integration of developments made to the PRIMAVERA solution, via User Functions which can be
associated to the Navigator or User Menus.

IDE
The IDE (Integrated Development Environment) of the VBA is a window that appears to the user separately
from the main window of the associated application.
All VBA development tools can be accessed from the IDE, including the "Project Explorer", "Object Browser",
code editor, form design interface and debugger.

Pg 26

Proprerties

Project Explorer

Form Design
Interface

Object Browser

VB Code Editor

Pg 27

VBA Project
The VBA projects perform two fundamental roles. First, they contain the project items. Second, they store all
the VBA code.
A VBA project can consist of:

Code modules: contain declarations, procedures and functions;

Class Modules: allows programming orientated by objects, grouping of procedures,


functions and declarations in a class;

Forms: allow the creation of powerful interfaces;

References: allow code from other projects to be reused.

The ERP PRIMAVERA v8.10 provides a single VBA project that aggregates all the classes of all the modules that
support VBA. Regardless of the Modules that are available in the ERP, there is only one project that provides all the
features.

Macros
A macro corresponds to a public VBA subroutine without any parameters. Macros must be defined in "Class
Modules" and serve as an entry point to a certain feature provided by the project.
The IDE of the VBA provides a specific dialogue to assist the user in manipulating this type of VBA code.

Pg 28

This dialogue enumerates all the available macros in a project, allowing their editing, removal or execution by
the user.
PKB

How to create a Macro?

Classes
All VBA projects associated to the PRIMAVERA applications provide a grass-roots set of classes enabling the
extension of the main features of the application.
These classes can be recognized in the VBA "explorer" under the first node:

All the objects provided


in a single project

Pg 29

Generically, three types of classes are provided in each area:

Files (ex.: FichaArtigos): are associated to the maintenance of the main application
tables;

Editors (ex.: EditorVendas): are associated to document editing and/or processing


features;

Other (ex.: Empresa).

Events
Conceptually, an event corresponds to an action recognized by one of the project objects - for example,
pressing a key or selecting a button and for which a code can be produced as an answer. An event can be
triggered by the system as a result of an action by the user or from code.
The VBA project provides a set of system events associated to each class previously described. These events
are the starting point for customizing the solution provided by PRIMAVERA.
The following examples illustrate the potential use of system events to change application behavior:

An event will be released whenever a customer is edited in the respective


maintenance. This event can, for example, be used to write code which changes
some of the customer properties in function of other data in the system;

When an article is identified in the lines of a sales document, the respective event
can implement additional business rules not implemented in the Logistics &
Treasury area.

Base Tables Maintenance


Each maintenance form of the base tables of PRIMAVERA applications has an associated VBA class. These
classes provide a set of standard events:

AntesDeAnular

Triggered immediately before annulling the active record;

AntesDeEditar

Triggered before editing a new record or an existing record.

AntesDeGravar

Immediately before saving the active record;

DepoisDeAnular

Triggered immediately after annulling a record;

DepoisDeEditar

Immediately after editing a record;

Pg 30

DepoisDeGravar

Imediatamente aps de gravar um registo.

TeclaPressionada

Immediately after saving a record.

AntesDeCriar

Triggered when a maintenance is oppened.

Example:

The events AntesDe


allow to cancel a
operation

Editors
The events provided in document editing or processing operations depend on each particular case.
As an example, the EditorVendas class (associated to the sales documents editing form of the Sales Module)
provides the following events:
AntesDeAnular

Before
Antes de
canceling
iniciar aaanulao
document.
do documento.

AntesDeDuplicar

Before duplicating a document.

AntesDeEditar

Before editing a document.

AntesDeGravar

Before saving the current document.

AntesDeImprimir

Before printing the current document.

Pg 31

AntesDeIntegrar

Before integrating/saving in database after showing the Accounting or


Treasury link window.

AntesDeProcessar

Before showing the Accounting or Treasury link window.

ArmazemIdentificado

When the warehouse is identified.

ArtigoInexistente

After selecting a non-existing article.

ArtigoIdentificado

After selecting the article in a document line.

ClienteIdentificado

After selecting the client associated to the document.

DepoisDeAnular

After canceling a document.

DepoisDeDuplicar

Triggered after duplicating a document.

DepoisDeEditar

After editing a document.

DepoisDeGravar

After saving a document.

DepoisDeImprimir

After printing a document.

DepoisDeIntegrar

After integrating/saving in database.

DespoisDeTransforma
r

After confirming documents transformation and entering them in the editor.

LinhaEspIdentificada

After introducing a special line in the document.

ObraIdentificada

After introducing a work/tender related to an article.

TeclaPressionada

Always whenever any key is pressed.

ValidaLinha

When validating each document line.

ErroAoGravar

Triggered when an error occurs while saving.

TipoDocumentoIdentifi
cado

When the document type is identified.

Objects
The VBA project also provides objects allowing the access and manipulation of data associated to the
respective form/feature in each system class, in addition to the respective events.
These objects can be accessed by using the identifier Me:

Pg 32

Aplicacao
The Aplicacao object provides a set of properties related to the application associated to the VBA project:

MotorERP

Application engine.

DescricaoVersao

Description of the application version.

Empresa

Active company data.

Instancia

Active PRIMAVERA instance.

TipoPlataforma

PRIMAVERA Platform Version.

Utilizador

Active user data.

VBA

VBA objects model.

VersaoVBA

VBA version.

Pg 33

PlataformaPRIMAVERA
The main features of the PRIMAVERA Platform and its engine (see StdPlatBS) are provided by this object.
This is a subset of the same methods used by the applications to:

Manipulate user fields;

Carry out user forms;

Format SQL queries;

Etc.

Pg 34

PKB

Visual Basic for Applications (VBA)

Pg 35

User Fields and Tables


The PRIMAVERA ERPA allows the creation of additional fields in the system tables. This feature allows
keeping other data - not supported by the standard solution - about any of the other entities (customers,
suppliers, employees, etc.), auxiliary tables or document or movement tables.
The PRIMAVERA Administrator provides an assistant to facilitate the creation of new user fields.

Pg 36

Immediately after the installation of the PRIMAVERA system, user fields in the main entities (articles, customers,
suppliers, etc.) become available.

Pg 37

Pg 38

Ateno

User field names must start with the CDU_ prefix to be correctly recognized by the system.

Pg 39

User Fields in Applications


The manipulation of the created user fields is carried out within the actual applications.
The way in which this manipulation will be carried out depends on the complexity of the respective table.

User Fields in Maintenance with Tabs


In more complex maintenance operations with tabs (editing pages for the various fields), user fields can be
edited directly in the form by using a tab automatically created for this purpose.

User Fields in Maintenance without Tabs


In simpler tables (without tabs), the editing of user fields is available in an autonomous form, accessible
through the "Context" button of the tools base.

Pg 40

User Fields in Documents


Given the specific characteristics of the document or movement editing windows, the user fields (associated
to the header or lines) will also be available in an autonomous form.

Pg 41

In any of the previous cases, the editing of the user fields can be modified, according to the needs of the user, through
the creation of User Tabs and the association of VBA code to implement more complex business rules.

Pg 42

User Tables
The user tables, similar to User Fields, enable the extension of a PRIMAVERA database to support the
maintenance of additional data - other entities - not provided by the standard solution.
A User Table is a set of User Fields not associated to any of the system tables.
To create a new TDU you must use the same assistant available in the Administrator, indicating the table
name, the user fields provided and the applications in which the new table will be available.

Ateno

User table names must begin with the prefix TDU_ to be correctly recognized by the system.

After creating a user table in a PRIMAVERA database, provided the mentioned rules are followed, it will
become immediately available in the respective applications and can be accessed through the "User Tables"
option in the "Tools" menu.

PKB

User Fields
User Tables

Pg 43

User Tabs and Forms


User Tabs
User Tabs (US) allow the modification of the standard user fields editing interface and the association of a
VBA code to the user field maintenance of any application entity.
After defining the first user tab for an application table, the standard automatic editing tab, previously described,
disappears and is replaced by (a) tab(s) defined by the user.

To create a User Tab


1.

Select the "User Tabs" option from the "Tools" menu of the ERP where you wish to create the user tab.
The VBA development environment will be opened to assist you in editing the tab (if it is not visible the
PRIMAVERA tools bar must make it visible):

Pg 44

2.

Select the entity for which you wish to create the tab. In the context menu, select "New" (in this example
we chose the entity "Tables - Customers"). A new empty form will be created:

Pg 45

3.

Configure tab properties:

4.

Design the tab, by adding user fields associated to the entity and other controls:

Pg 46

The VBA environment allows you to add any licensed control from third parties (manufacturers of controls for VBA).
There are control indices available on the Web. Controls can be found in these Web sites to carry out virtually any type of
operation in your user tabs.

5.

Pode, de seguida, introduzir cdigo especfico para implementar regras de negcio especficas: You
can then introduce specific code to implement specific business rules:

The PRIMAVERA solution provides the VBA environment configured to support the PRIMAVERA logical entities (user
fields, user tabs, etc.).
In the same way, in each tab, various events are provided that allow you to programme the operation of the tab in a
simplified manner.

6.

Save the VBA project and return to PRIMAVERA ERP.

Pg 47

As from this moment, if you open the modified maintenance, the created user tab will open instead of the
standard tab.

User Forms
User Forms (FDU) correspond to forms developed within the scope of the VBA project associated to each
application.
In contrast to User Tabs, they are not associated to any system tables and can therefore be used to
implement other features, such as for example:

Editing user tables;

Editing tables stored in databases that are external to the PRIMAVERA system;

Implementing specific business rules not linked to the database.

In practice, an FDU corresponds directly to a VBA "User Form". However, this concept allows the extension of
the PRIMAVERA solution in a more integrated manner, given that it is possible to associate each FDU to a
user function and, in this way, present the form to the user:

In application menus (through the User Menus concept);

From the Navigator (creating shortcuts to application menus);

From the VBA project using the objects provided by the PRIMAVERA Platform.

Create a User Form


1.

Select the "User Forms" option from the "Tools" menu of the ERP. The VBA development environment
will be opened to assist you in editing the form;

2.

Activate the "Forms" toolbar. In the context menu, select "New Form". A new empty form will be created:

Pg 48

3.

Configure form properties;

4.

Design the form, by adding the necessary controls:

Pg 49

5.

You can then introduce specific code to implement specific business rules:

Pg 50

6.

Save the VBA project and return to the PRIMAVERA application.

As from this moment, the new form is available to be associated to a User Function.

PKB

User Tabs
User Forms

User Functions
A User Function (XDU) corresponds to a certain action - carried out by the PRIMAVERA system to
implement a certain business rule.
This new concept - central in the applications as from version 6.0 - allows extending the PRIMAVERA solution
to guarantee all the business rules specific to each company. For example:

Sending customized E-mail or SMS messages to each company;

Execution of stored procedures or queries on the company database;

Execution of user forms or VBA macros;

Exporting and/or sending by E-mail user maps;

Execution of other external utilities or documents.

The PRIMAVERA Platform provides the following types of User Functions:

Email

To send messages by E-mail.

SMS

To send SMS messages.

Aplicao Externa

To execute applications or external documents.

Macro VBA

To execute macros defined in the company VBA project.

Formulrio do Utilizador

To execute User Forms.

Mapa do Utilizador

To export and/or send by E-mail user maps.

Pg 51

Stored Procedure

To execute existing stored procedures in the company database;

User Defined Function

To execute existing user defined functions in the company database (only


available in SQL Server 2000 or later);

Query SQL

To execute ad-hoc SQL queries.

Depending upon its type, each User Function allows the definition of:

Entry parameters: allow making it dynamic and adaptable to various similar


situations;

Results: in the form of discrete values (numeric or alphanumeric), lists of values or


lists of records.

The following topics analyze the creation of each of the types of available user functions, definition of
parameters and their results, as well as their execution in PRIMAVERA applications.
The concept of User Functions serves as a base for the implementation of User Menus and Processes.

Examples of User Functions


E-mail Message
To create a User Function for sending E-mail messages, follow the following steps:
1.

Select the "User Functions" option from the "Tools" menu in the ERP;

2.

The following window presents all the available user functions in the system. Select "New...":

Pg 52

3.

Na janela seguinte pode definir as propriedades da funo do utilizador. Na primeira pgina introduza o
nome da funo, seleccione o tipo E-mail e introduza uma descrio mais detalhada.

Field
Name
Type of Function
Active

Description
Function Name
Function Type
When active, the function can be executed

Pg 53

4.

the "Definition" page you must configure the message:

Field
To
Subject
Message
Attachments
5.

Description
Message Destination
Message Subject
Message content
Allows to attach files

Select Confirm.

In this example, the result would be a User Function that would permit sending an E-mail message to the
destination financial.director@cliente.pt. That function could then be executed in the PRIMAVERA ERP from
the user functions window, from a user menu or from a shortcut in the Navigator.

Pg 54

However, an XDU of this type would not have much practical utility because it would only allow sending an Email to a specific fixed destination (or several fixed destinations).
The PRIMAVERA Platform, in fact, allows this concept to be extended through the definition of parameters. In
this way, the same user function can be used to send payment warnings to any customer.

Parameters Definition
In the E-mail type user functions, the parameters must be declared by the user, in any of the definition fields,
using a specific syntax (@@NameOfParameter@@).
Returning to the previous example, let us suppose that you wanted the user function to allow:

Sending payment warnings to any customer;

Adapting the content of the message to each case;

Its execution regardless of the working company.

To reach those objectives, the previous definition could be altered as follows:

Pg 55

Parameters that define


the message destination
according to the
customer.

Parameter that will


adapt to the name of
the working company

Customer statement

As the user defines the parameters using the expected syntax, the application will carry out their recognition
and these will be presented on the "Parameters/Result" page:

Parameters defined by
user

Associated values

Types of data and size

Pg 56

At this point you can define all the characteristics of each one of the User Function parameters (type of data, default
value, list of values, etc.). For more information, consult the section regarding "Parameters".
Result Definition:

"Email" type functions do not allow the defining the results of their execution.

External Application
To create a User Function that permits the execution of applications or documents external to the
PRIMAVERA solution, follow the following steps:
1.

Select the "User Functions" option from the "Tools" menu in the ERP;

2.

The following window presents all the available user functions in the system. Select "New...":

3.
In the following window you can define the properties of the user function. On the first page introduce
the name of the function, select the "External Application" type and introduce a more detailed description:

4. On the "Definition" page you must indicate the location of the external application:

Pg 57

Field
Command
Parameters
Initial Dir.
Execute (Window)

Description
Application Location
Parameters
Initial Directory
Initial windows status

5. Select "Confirm".

Parameters Definition:

The execution of external applications must be parameterized by the user.


The previous example could be configured to allow the dynamic opening of spreadsheets:

Pg 58

Result Definition:

The execution of external applications allows defining how to process the result:

Definition of the User


Function execution
result

Pg 59

Two types of result can be specified:

None: the execution result will not be processed by the execution engine;

Full: the executed application will produce an "exit code" which will be processed
by the engine at the end of the execution.

Macro VBA
To create a User Function for the execution of macros defined in the VBA project, follow the following steps:
1.

Select the "User Functions" option from the "Tools" menu in the ERP;

2.

The following window presents all the available user functions in the system.
Select "New...":

3.

In the following window you can define the properties of the user function.
On the first page introduce the name of the function, select the "Macro VBA"
type and introduce a more detailed description:

4.

On the "Definition" page you must select the macro to be executed:


VBA Project

List of available macros in


the current VBA project

Pg 60

6.

Select Confirm.

Atention

The definition of the macros must be carried out previously in the VBA project of the application or in the shared (among all
applications) project.
The list of macros will include all the macros (procedures without parameters or results), public procedures (with or without
parameters) and public functions (with or without parameters) defined in the VBA project of the application or in the common project
for the active company.

Definition of Parameters:

The function parameters will be defined by the selected macro:

Pg 61

This Macro has as initial parameter in the VBA code the String type variable User.
Result Definition:

The result of the user function will also be determined by the definition of the macro. The returned value of this
Macro is a Boolean.

Query SQL
To create a User Function to execute SQL queries, follow the following steps:
1.

Select the "User Functions" option from the "Tools" menu in the ERP;

2.

The following window presents all the available user functions in the system.
Select "New...":

3.

In the following window you can define the properties of the user function.
On the first page introduce the name of the function, select the "SQL Query"
type and introduce a more detailed description:

4.

On the "Definition" page you must specify the SQL Query to be executed:

Allows verification of the


syntax of the SQL
instruction

Pg 62

SQL instruction to be
executed

5.

Select Confirm.

Parameters Definition:

The User Function parameters can be defined according to the previously described syntax:

Pg 63

Definition of the Result:

The result of the User Function must be defined by the user.


The way in which the recordset resulting from the SQL query will be interpreted by the execution engine
depends on the type of result selected by the user:

Pg 64

None: the SQL query does not return any result;

Text, Integer, Numeric, Date, Boolean: the query returns a recordset with only one
record with only one column, which must be interpreted according to the type of
data selected;

List of records: The query returns a recordset with various records and various
columns.

Parameters
The following information is associated to each user function parameter:

Name: defines a single identifier for each function;

Type of Data: defines the interval of possible values;

Size: defines (for types of data where this is significant) the size of the maximum
value;

Mandatory: defines if the parameter is necessary for the function to be carried out;

Value: defines the discrete value associated to each parameter at the moment of
carrying out the function.

The following types of data are supported:

Text (ex.: F0001);

Integer (ex.: 120);

Numeric (ex.: 120,58);

Date (ex.: 12-12-1973);

Boolean (ex.: "True").

Generically, in order for the user function to be carried out correctly, it is necessary for the value
corresponding to each mandatory parameter to be defined at the moment of execution. However, the
configuration module of User Functions allows defining the default value, the possible values or carrying out
the calculation of the value as a result of expressions.

Fixed Value
In this case, a discrete value will be attributed to the selected parameter which can, or does not have to, be
later modified by the user at the moment of execution of the function;

Pg 65

By selecting this option, the


user can modify the value at
the moment of execution

List of Fixed Values


You can also define a list of possible fixed values for the selected parameter. In this case, immediately before
the function is executed, the user will have the possibility of selecting the value from the list.

List of fixed values

Default value

Possible values

Pg 66

Allow, or not, the user to


introduce a value that is
not on the list.

List Defined By an SQL Query


You can also define a list of possible values from a query carried out on the database immediately before
executing the user function:

Table

Fields to be included in the


SQL query

Pg 67

The SQL query can also be edited manually:

SQL Query used to fill in


the list of possible values

Finally, it is necessary to indicate the query field that must be used to determine the value of the parameter
and other options:

Allow, or not, the user to


introduce a value that is
not on the list

Field to be used to
determine the parameter's
value

Default value

Pg 68

Formula
In this case, the parameter value is determined by the result of the execution of a formula.

The value resulting from the expression will be determined immediately before the function is carried out; the
expression can include:

Operators (ex: +);

Context-dependent fields (ex.: %%UTILADMIN%%);

Functions (ex.: IIF).

The Platform provides the following type of fields:


Empresa

Values dependent on active company (Code, Name, etc.).

Aplicao

Values dependent on active application (Abbreviation, Name, etc.).

Utilizador

Values dependent on active user (User, Name, etc.).

Perfil

Values dependent on user profiles (Profile and Description).

Base de Dados

Values dependent on active database (Name and Server).

The following types of functions are also supported:


Converso

Data conversion functions (ex.: Asc).

Data / Tempo

Functions on dates or time (ex.: DateSerial).

Pg 69

Genricas

Generic functions (ex.: IIF).

Matemticas

Mathematical functions (ex.: Power).

Texto

Functions on text (ex.: UCase).

Ateno

The expression/formula associated to the parameter value must observe the VBScript syntax.
The context fields are identified by the syntax @@FieldName@@.

Function
In this case, the parameter value will be determined by the result of the execution of another user function:

User functions with parameters defined in this manner trigger the execution of all dependent user functions
immediately before their own execution.

Execution
A user function can be executed (Execute button):

From the function configuration form:

Pg 70

As a result of a user menu;

From Navigator;

Resulting from the execution of a user process.

With the exception of the last case referred to above, the execution of the user function will be carried out
immediately, interacting with the user to:

Request the values of all parameters (not completely defined in the configuration);

Present the results (when applicable) to the user.

Example

To exemplify this behavior let us consider the definition of a user function with the following characteristics:
1.

The aim is to obtain a list of customers that have a sales volume in excess of
a certain value for a specific month;

2.

For this purpose, a Stored Procedure Top_Clients - in the database was


defined with two parameters: the month for which you intend to obtain the
list of customers and the minimum sales value to consider;

3.

The result is also intended to be presented to the user.

The definition of the user function would be:

Pg 71

Pg 72

Pg 73

Immediately before the execution of the function, all parameters would then be requested from the user in a
form similar to the following:

List of possible values

Fixed value

The result of the function - in this case, a list of records, is then presented to the user:

Records resulting from the


execution of the function

Available operations on the


list of records

Sending SMS messages is carried out synchronically. In other words, whenever a user function of the "SMS" type is
carried out, the respective message will be placed in a waiting line to be sent. Actual sending will be carried out by the
"PRIMAVERA Process Management" application in accordance with its defined execution scheduling.

Pg 74

PKB

User Functions

Pg 75

User Menus
This tool allows extending the menus of any PRIMAVERA application, adding new commands associated to
user functions for carrying out certain actions when selected by the user.
The user can create a new submenu which will then appear immediately in the User Menus area of the ERP.
The user can configure other submenus and commands.

Pg 76

Each of the commands - the menu items that execute something when selected - will be associated to a user
function (responsible for the execution).

To create a Submenu
1.

Select "User Menus" from the "Tools" menu in the ERP; The user menus configuration form will be
opened:

2.

Seleccione o sub Select the submenu under which you intend to create the new submenu and select
"Submenu";

3.

In the following window introduce the title of the submenu and the associated "tooltip":

Pg 77

4.

Select "Confirm" to return to the initial form:

You can change the title of the "Others" menu, by selecting the corresponding node in the previous window and choosing
"Properties".
After defining the user menus, it is necessary to access the Administrator to define the access permissions. Until then,
only system administrators will have access to the new menus.
You can reorganize the order of the items of each submenu by using the arrows provided in the previous window.

To create a Command
1.

Select the submenu under which you intend to create the new command and select "Command";

Pg 78

2.

In the following window introduce the title of the command, the associated tooltip and the user function
to be executed:
This list presents all the
available user functions in the
system

Use these buttons to create a


new function while editing the
selected function

Pg 79

The User function can receive parameters and produce a result.


When the user selects a certain command, all the necessary parameters will be requested before execution. After the
function has been executed the respective result (if produced) will be presented.

3.

Select "Confirm" to return to the initial form:

Select "Properties to edit the


selected element

Choose "Remove" to remove


the selected element.

The Properties button allows editing the selected item, the Remove button allows removing the selected
item.

PKB

User Menus

Pg 80

User Processes
User Processes (PDU) complement User Functions, allowing the scheduled execution of sequences of
actions (functions) in a server, without user intervention.
Using this mechanism, the user is provided with a tool for the automation of repetitive tasks, able to implement
specific business rules.
In order to illustrate this concept, the following can be considered as examples of programmable tasks in the
form of User Processes:

Automatic Orders: monitoring of all articles which are out of stock and consequent
creation of automatic orders;

Notifications by E-mail: sending of notification messages whenever a certain


condition/event occurs (ex.: creation of a new client, sale of a certain product, login
of a certain user);

Publication of sales maps: periodic sending of management maps to the sales


force.

Apart from complementing the User Function concept, a User Process extends the PRIMAVERA solution
because it provides an alternative implementation tool to the VBA. Although the VBA can be used to
implement very complex business processes, in most cases, User Processes facilitate this task:

Because the configuration environment does not require programming skills, and is
therefore more accessible to less experienced users;

Due to providing a programmed and scheduled execution environment in an


autonomous and scalable server (with the appropriate resources);

Because they are carried out without the need for user intervention;

Due to including basic "workflow" mechanisms.

Conceptually, a User Process consists of:

One or more steps (each of which corresponds to a User Function) carried out
sequentially;

Zero or more conditions allowing the process execution to be adapted, according to


the result of each step;

The definition of the entry parameters and the results of each step (merged into
one another);

A calendar which defines the moment of execution;

A set of other properties (notifications, handling of errors, descriptions, etc.)


allowing configuration of its behavior.

Pg 81

Ateno

The use of user functions in user processes is subject to the following limitations:
(1) VBA Macro - only functions of this type can be used provided they point to macros defined in the ERP project;
(2) User Maps - only functions of this type can be used provided they are configured to send by E-mail and/or export the map to a disc
directory.

Configuration Environment
The configuration environment of User Processes is available in the "Tools" menu.
By selecting this option in the main menu, the user will have access to the User Process definition window. It
will be possible to create new processes, execute, modify, duplicate or eliminate existing processes from this
form.

To create a new process just select the option "New...". The assisted configuration environment then appears.

Pg 82

Toolbar

User Functions "Toolbox"

Design Area

Execution State

This environment is eminently visual and has the following characteristics:

Toolbar: contains a set of options to save, configure and execute the user process;

"Toolbox": contains all the necessary elements for creating new steps or conditions
in the process;

Design Area: visual area allowing the configuration of steps and the process
execution flow;

Execution state: record of process executions;

"Start of Process": initial state of process (allows accessing its properties);

"End of Process": final state of process (marks the end of the execution).

The main component of the environment is the design area - all process configurations are carried out here.
You can create new steps or conditions by dragging the respective element to the white area. You can
change each element by using the "Properties" option in the context menu. And you can change the execution
flow, by linking each step and/or condition.

Pg 83

To define the main properties of the Process


1.

Select the "Start of Process" element;

2.

In the context menu, select "Properties".

You will have access to the properties form of the User Process:

Name and
description of
the process

Activate this
option to permit
the scheduled
execution of the
process

Automatic
notifications
during
execution

Definition of the
execution
calendar

Pg 84

Steps Definition
After defining the main properties of the process, the next step must be the definition of the steps that
compose the process. To illustrate this procedure let us consider the example of automatic orders once
again. The assumptions are the following:

There are two Stored Procedures in the database (MissingQuantity and


AutoOrder);

The first procedure does not require any parameter and returns a numerical value
that corresponds to the necessary number of units to replace the stock of article
A1;

The second procedure accepts two parameters - the article code and the number
of units to be ordered - and produces an order from a supplier for that article.

To create a user process that automates this procedure, it is necessary to follow the following steps:
1.

Select the "User Processes" option from the "Tools" menu in the ERP;

2.

Select "New":

3.

Select the "Start of Process" node and choose "Properties" in the context menu;

4.

Define the main properties of the process:

5.

Active a pgina Activate the "Scheduling" page, activate "Execute Periodically" and choose "Change":

Pg 85

7.

Define the process schedule and choose "Confirm";

8.

Choose "Confirm" once again in the properties window;

9.

In the toolbox, select the "Stored Procedure" element and drag it to the design area (a new step will be
created and the properties window of that step will be automatically opened);

10.

Introduce the name and description of the new step:

This command
allows a new
user function to
be created

Pg 86

11.

Select the creation of a new user function option;

12.

Define the properties of the user function and confirm:

Pg 87

13.

Once again, select the recently created function in the step properties:

14.

The "Configuration" page indicates the parameters and the result of the step (from the definition of the
User Function). Choose "Confirm" (a new node will be created in the design area of the process
corresponding to the new step):

Pg 88

15.

Create a new step corresponding to the execution of the second stored procedure:

Pg 89

Pg 90

Pg 91

16.

Must define the parameters of the second step as follows:

Pg 92

Pg 93

17.

Next, define the execution flow, connecting the various nodes between themselves:

18.

Save the User Process.

Definition of Conditions
An essential tool to make the User Processes more adaptable to each situation is related with the definition of
conditions that change the execution flow according to specific criteria.
Consider the following example:

You want to implement a sales analysis process capable of carrying out the
processing of bonuses (if sales exceed the budget value) or sending notifications
(in the opposite case);

There is a step - implemented as a stored procedure - that compares the sales


value with the budget value. Returns 0 if below budget or 1 if above;

This process will execute the second step depending on the first (the sales
analysis).

Pg 94

The definition of the Process would be similar to the following:

This example illustrates the use of a condition to adapt the same process to two distinct situations.
The definition of the condition would be as follows:

Pg 95

Definition of the step


previous to the condition

Condition to be applied
to the result of the
previous step

Actions dependent on
the result of the
condition

Definition of Parameters and Results


The definition of parameters and results of each one of the steps of a process is similar to what must be
carried out for the User Functions.
The following types of parameters are supported:
Defeito

The value of the parameter will be determined by its definition in the User
Function associated to the step.

Frmula

The value will be calculated based on a formula.

Funo

The value will be determined by the result of a specific user function.

Resultado do passo
anterior

The value will be determined by the result of the previous step.

Valor fixo

The value must be defined by the user and will be fixed in any execution
process.

The result of the step is always determined by the definition of the associated user function.

Pg 96

The result of the step is always determined by the definition of the associated user function. The types of values
associated to the parameters will depend on the type of parameter data and the remaining steps already defined. For
example, if there is no step that returns a value of the "Integer" type, it will not be possible to define, for a parameter of
that type, a "Result of the previous step" value.

Execution Environment
User processes are usually carried out by the PRIMAVERA Process Management application, in a machine
configured as a server.
Its execution will be carried out according to the defined schedule, as soon as the server is available (for
example, after terminating the execution of another process or the sending of SMS messages).
For the purposes of testing, it is possible to execute a user process from the configuration environment
(described in the previous points).
Finally, a process can be explicitly carried out upon user request, from a shortcut configured in the Navigator.
In this case, its calendar will be ignored and the process carried out immediately.

PKB

User Processes

Pg 97

User Alerts
The User Warnings are the new way of defining warnings, much more parameterisable, providing the user
with much more detailed control over a set of critical information about which it is indispensable to obtain
periodic warnings.
The periodicity of the warnings is itself also definable at the moment of its configuration, thus adapting it to the
needs of each user profile.
To illustrate this feature, let us consider some examples of information adaptable to a User Alert:

Non-invoiced Measurement Reports;

Opening of Proposals, Public Tenders, over the next 5 days;

Payable overdue Current Account documents;

Outstanding orders to be received;

Overdue Employee Long Service Bonuses;

Recalculation with negative stock;

Review of prices not invoiced in Works.

For each piece of information indicated above it is possible to create a User Alert.
The configuration and User Alert visualization environment is available in the "Tools" menu.
By selecting this option, the user will have access to the User Alerts presentation window.

Pg 98

It will be possible to create new warnings, execute, modify, duplicate or eliminate existing warnings from this
form.
To create a new process just select the option "New". An assistant then appears that will help you create a
new Warning.

Warning Definition
To better explain the various steps needed to create a User Warning, we shall use an example.
Example

We shall create a warning that allows users to obtain periodic information on the anniversaries of company
employees.

Pg 99

Optionally, you can create a new list to subsequently associate to the warning by selecting the option "New".
In this case, the option "Filter" is selected to define the category of the correct list. The intended list is
obtained through a Stored Procedure previously created in the Exercise. All existing Stored Procedures are
presented in the <Queries SQL> category.

Pg 100

You select the corresponding list: "Anniversary Warnings".

Optionally, you can choose to proceed with the default configuration by passing directly to the definition of
users with access to the warning. In this example, you deactivate the option to be able to carry out a more
detailed configuration.

Pg 101

The way the results are to be presented is defined. The results of the last warning execution are presented or
a warning with alert is marked when There are results/There are no results.

It is indicated whether the results must be sent as notification and if they must be published. For both options,
their behaviour must be defined.

Pg 102

Indicate if the warning is a:


- Private use Warning: only the current user has access;
- Public use Warning: indicate which are the profiles and respective users with access to the warning.

All profiles defined


in the system.

All existing users

Optionally, define if the warning is independent from the user that executes it. Define if it can or can not be
executed manually and after how long the warning becomes out of date. It is also possible to schedule the
warning execution.

Pg 103

It is possible to
schedule the
warning execution
automatically to
be carried out by
the Windows
Scheduler.

Indicate the name, description, priority and the respective category of the User Warning.

Optionally, activate the warning created and/or add it to the Business Monitor.

Pg 104

The new warning appears associated to the corresponding category.

Pg 105

Indicates that the


alert is not a
system alert, but
created by a user.

Indicates that the


alert is in the
business monitor.

Adds the alert to


the Business
Monitor.

Execution Environment
In spite of being a warning with a scheduled execution it is possible to immediately execute (processing) its
associated information, being immediately sent by E-mail to the respective recipients.
For this you just have to use the "Execute" option from the toolbar or the context menu.

Pg 106

We can as mentioned previously, during the creation of the Warning, or later by editing a created warning,
carry out the scheduling of its execution.

Pg 107

Results
The next time any of the recipient users of the Warning enters the ERP, they will be presented with the
Business Monitor that will contain, among other information, a specific location for the viewing of their
warnings.
The Business Monitor is accessible by the "Business Monitor" option from the "User" menu in the ERP.

PKB

User Alerts

Pg 108

User Indicators
The User Indicators are a feature that allows each user to observe, in a quick and easily perceptible way, a
set of pertinent information.
The User Indicators configuration and visualization environment is available in the "Tools" menu.
By selecting this option, the user will have access to the presentation window of the existing User Indicators.

To illustrate this feature, let us consider some examples of information that can be visualised in the form of a
User Indicator for two distinct areas of the ERP:
Human Resources Area

Seniority;

Qualifications;

Effective Number by Sex;

Absenteeism Rates;

Resignations

Sales Area

Pg 109

Growth of sales (%);

Sales - TOP 5 Customers (current month);

Sales - TOP 10 Articles (current month);

Monthly profitability (current and previous year).

For each piece of information indicated above it is possible to create a User Indicator.
From the User Indicators configuration form it is possible to create new indicators, execute, modify, duplicate
or eliminate existing indicators.
To create a new indicator just select the option "New". An assistant then appears that will help the user
configure a new indicator.

Indicator Definition
To better explain the various steps needed to create a User Indicator, we shall use an example.
Example

We are going to create an indicator that allows users to obtain information about the Articles that are in the
Top 10, for the current month. Obviously, this indicator will probably present different information throughout
the month since the analysis will be carried out whenever the respective indicator is executed. If we choose a
daily execution, we will obtain an updated daily image in relation to the intended information.

Pg 110

Select the source of the indicator data:


- List of records: by default, presents the lists of the "Article Category" category;
- SQL Commands: permits the introduction of an SQL query.
In this case, this is information obtained by an SQL command.

Pg 111

Optionally, proceed with the default option if you want to use the most common options to define a simple
indicator. Here you do not intend to proceed with the default configuration. In this way, the option is
deactivated.

Indicate the actions to be carried out automatically, by the system, after executing the indicator:
- Send result notifications using: enables sending results, via SMS/E-mail, to users who have the
indicator in the Business Monitor;
- Publish results to: enables publishing the results in a file or FTP site.
Both options must be duly configured by accessing and filling in the "Options" data.

Pg 112

Specify the scope of the indicator:


- Private use indicator: only the actual user will have access to the indicator;
- Public use indicator: profiles/users with access to the indicator are defined.

Pg 113

Schedule the execution of the indicator to occur every day at 00:00 AM. In this way, the indicator's graphic
result obtains its data from the information of sales closed the previous day.

Indicate the indicator's general data: name, description, presentation of results (Graph or List of Records) and
category.

Pg 114

Finally, one must choose the type of graph that will support the presentation of the Indicator's graphic results.

Pg 115

The Indicator will be provided in the list of User Indicators, where it can eventually be carried out.
Consequently, it can include the Indicator for monitoring the Business Monitor service.

PKB

User Indicators

Pg 116

Navigator
The Navigator offers users the possibility of configuring the work environment in each module, adapting it to
their needs. By using this feature, users can:

Configure their own views of the most important data of the ERP;

Consult and edit records (of basic tables and/or documents);

Add shortcuts to applications or external documents.

From the perspective of the system administrator, responsible for the configuration of the PRIMAVERA
solution, the Navigator supplies the necessary tools to adapt it to each profile of users:

Guaranteeing that each user has access to all the relevant information for their
work, in the correct format;

Allowing the implementation of additional security rules;

Providing all the extensibility tools in a way that is totally integrated with the
application.

As a productivity tool, the Navigator is, generically, a shortcut and list configuration. It is integrated in each
application, as demonstrated by the following image:
Show/Hide Browser

Context button.

Shortcut to all ERP


modules (see next image)

Pg 117

ERP modules with tree


navigation

PKB

Browser

Pg 118

Shortcuts
The user may create the following types of shortcuts:

Lists;

External applications;

Documents;

Web Pages;

Application menus;

User Functions;

User Processes;

Companies.

All shortcuts can be organized and grouped into folders, in a similar structure to that available in Windows to
organize files.

To create a shortcut to an external application


1.

Activate the Navigator;

2.

In the context menu of the Navigator, select New/External Application;

3.

In the following window, select the external application and define the remaining shortcut properties:

Pg 119

4.

The shortcut is available in My favorites menu

Pg 120

To create a shortcut to a Web page


1.

In the context menu of the Navigator, select New/Web Page;

2.

In the following window, introduce the address of the page or select one of the available pages in
Internet Explorer favorites:

Pg 121

To create a shortcut for an application menu


1.

In the context menu of the Navigator, select New/Menu;

2.

In the following window, select the application menus for which you want to create shortcuts in the
Navigator (can be created several shortcuts at the same time):

To create a shortcut to a User Function


1.

In the context menu of the Navigator, select New/User Function;

2.

In the following window, select the function to be associated to the shortcut:

List of all the available


user functions.

Pg 122

To create a shortcut to a User Process


1.

In the context menu of the Navigator, select New/User Process;

2.

In the following window, select the process to be associated to the shortcut:

List of all the available


user processes.

To create a shortcut to a Company


1.

In the context menu of the Navigator, select New/Company;

2.

In the following window, select the company to be associated to the shortcut:

Pg 123

Creating shortcuts to companies provides a mechanism for quickly opening a specific company. This tool is particularly
useful in installations with many companies, such as for example, accounting offices.

PKB

Navigator

Lists
Information Categories
The creation of lists allows:

Access to all the data of a specific entity, in addition to the concept of tables;

The configuration of filters, conditions and sorting of the data of each entity;

Other data manipulation features such as, for example, exporting.

In this way, all the data of each Module/Area are organized into Categories that group all the relevant tables to
obtain the relevant information on a specific entity.
In practice, this means that the Customers category provides all the data related with customers. In addition to
the associated table, it will include data on salespeople, sales, contacts, currencies, etc.
The Navigator thus becomes the main source of data for the user and an indispensable tool to configure the
solution and adapt it to each specific situation.
The available categories will depend on each of the applications. As an example, below are presented some
of the categories of the Logistics & Treasury area:
SOME OF THE
LOGISTICS
AND
TREASURY
CATEGORIES

Warehouses;
Banks;
Bank Accounts;
Purchase Documents;
Stock Documents;
Sales Documents;
Expedition Modes;
Bank Movements;
Purchase Movements;

Pg 124

Purchase Movements (lines transf);


Current Account Movements - Lines;
Treasury Movements - Lines;
Sales Movements;
Sales Movements (lines transf);
Partners;
Tables - Articles;
Tables - Customers;
Tables - Contacts;
Tables - Other Third Parties;
Salespersons;
Zones.

Creation of Lists
To create a new list, follow the following steps:
1.

In the Navigator context menu, select New Shortcut/List;

2.

In the following window, select the category for which you want to create a new list and select "New...":

Information categories
of the active
application.

All the lists already


defined for the selected
category.

Pg 125

3.

In the first step of the list creation assistant, select "Next":

4.

The first step allows you to select the list columns from each table that compose the information
category:

All the available tables


in the selected
category.

All the available fields in


the selected table.

Additional options that


allow the definition of
sortings, aliases and
expressions.

Pg 126

5.

In the following step, you can define conditional sentences to filter the data on the list according to
specific criteria.

Filters on the data of


the list.

6.

Next, you can define totalizers over the previously selected numerical columns:

Pg 127

7.

Next, you can define logical groupings over the records:

8.

In the next step, you can define the conditional formatting to apply to the list records:

Pg 128

9.

Indicate whether you want to preview the result or not:

Pg 129

In this step, you can also define the following advanced options of the list:

Maximum number of
records

Allows limiting the maximum number of records presented in the list result.
This option can be useful in lists with many records and in which, in
principle, it is possible to predict that the searched record is among the first
records.

Eliminate duplicate
records

Allow eliminating all the repeated records in the list by presenting only one.

List opening mode

Define if the pagination of the records is carried out in memory in the


customer or in the server. The first option offers the maximum performance
for lists with few records or in lists in which it is common to scroll through all
the records. The second option is recommended for lists with many records
and whenever it is possible to foresee the immediate use of existing
records in the first pages (reducing the communication and data transferred
from the server).

Pg 130

10.

By selecting the preview option, you will be presented with the result in the next step:

Result of the application


of the conditional
formatting.

11.

Finally, you must indicate the name of the new list and the respective availability for the remaining
users:

Pg 131

Pg 132

After the assistant has concluded, the new list is available to be added in the Navigator:

To add the new list to the Navigator, choose it from the list and select "Confirm":

Sorting of Records
You can define up to five sorting criteria for the records on the list.

Sorting records

Pg 133

To define the sorting criteria, you must indicate each sorting field and the respective rank:

Each one of these


lists presents all the
visible fields in the
list.

Sorting Columns
The rank of the list columns can be defined in the list creation form:

Pg 134

Aliases
In certain situations, namely, in lists resulting from the aggregation of various tables, it may be necessary to
rename some columns:
12.

Select the column to be renamed and choose the respective button:

Expressions (Calculated Values)


You can also define columns in the list as a result of expressions calculated (from other columns in the list).
To add a new expression you must select the respective button in the list creation assistant:

Pg 135

A form will be presented that allows you to define the calculated expression:
Available columns in
the list.

Operators

Expression

Name of
theexpression.
Alias

Pg 136

Conditions
A conditional expression allows the definition of a condition which will filter list results according to a certain
criterion.
This is one of the lists most important features, because it allows the user to define lists configured exactly in
accordance to the users information needs, facilitating:

Focus on the most relevant data;

Obtaining all relevant information on each entity;

Formatting different views of the same data;

General performance of the application given that, by filtering the data, the quantity
of information accessed at any moment is reduced, accelerating its processing;

The list configuration module allows you to define as many conditions as


necessary, supporting combinations of expressions using the AND and OR logical
operators.

To create a new conditional expression:


1.

In the list of conditional expressions, select "New...":

2.

Select the column which you want to apply the condition to:

Pg 137

Select the table


among those that
compose the
category.
Select the column
which you want to
apply the condition
to.

Conditional operator
(the available
operators depend on
the type of data of
the selected column).

Condition Type. You


can define a fixed
value, relate the
column with another
or define a
parameterisable
condition.

3.

Define the condition and choose "Confirm":

To create a subexpression:
The various conditions defined can be combined in subexpressions to which the AND or OR logical operators
will be applied.
To create a new subexpression, follow the following steps:
1.

Choose the "Subexpression" option in the conditions configuration window;

2.

Select the type of subexpression to create:

3.

Define all the conditions to be combined in the subexpression:

Pg 138

To create a parameterisable expression:


Something which makes this module particularly functional is the possibility of parameterising each of the
conditions by defining a list of possible values for the condition.

Use this option to


define the list of
possible column
values.

Pg 139

You have two different columns.

You can create a list of fixed values:

Or create a list of values resulting from the execution of a query in the database:

Pg 140

This configuration results in a parameterized list. Whenever the user starts editing, all parameterized values
will be requested. This enables the user to, for example, define generic lists adapted to the users needs at
any moment.

Pg 141

Aggregate Totals
You can define totalizers over any one of the numerical fields defined in the list. The following operations are
available:

Counter;

Sum;

Average;

Minimum;

Maximum;

Standard Deviation;

Value Counter.

Conditions on Aggregate Totals


Conditions can be defined without aggregate totals:

Pg 142

The way of parameterising the obtainment of results is identical to the options previously explained in the
"Conditions" section.

Grouping
You can define automatic groupings over the records resulting from the list:

Pg 143

This feature is limited to a maximum number of four groupings.


The grouping result will be similar to the following:

Pg 144

Conditional formatting
Conditional formatting enables highlighting the records in the list which obey a certain condition.
To create a new conditional formatting:
1.

In the list of conditional formatting, select "New...":

2.

Select the column which you want to apply the formatting to;

3.

Define the condition;

4.

Select the letter and background colors to apply to the records that fulfill the criterion:

Pg 145

Various conditional formatting can be combined in the same list.


Each conditional formatting will be applied sequentially to each of the list records in the order defined in the configuration
assistant.

Pg 146

List Query
All the lists configured by the user can be accessed/consulted from:

The Navigator from shortcuts;

The associated maintenances (on the toolbar):

From queries (F4) carried out from several application forms:

Pg 147

F4

Operations on a List
More than a tool to consult data, lists provide the user with a set of features enabling the manipulation of data
so as to obtain additional information, carry out its publication and use it to support a wide variety of
management functions.
The operations on lists and their data are available in the toolbar and in the context menu:

Category Lists;

Editing Records;

Quick Filters;

Quick Searches;

Searches;

Drilldown;

Sorting of Records;

List printout;

Printout of Maps;

Exporting of Records;

Sending of E-mail Messages;

Creation of Shortcuts to Records;

Pg 148

Default Searches and Lists


All record searches, made to any of the application forms, will be carried out to the lists defined for the
respective category.
For example, in the sales editor of the Sales module, client search (using F4) will be carried out to one of the
lists defined in the client category. If there is no list defined by the user, the system list will be used.
Otherwise, that which has been defined as the default list by the active user will be used.
The default list for each category can be defined in two ways:

In the PRIMAVERA Administrator, by the system administrator, for each company


and for the different users registered in the system;

In the system preferences (available in the application) for each user, provided they
have permission for this.

The first option is particularly useful from the perspective of the user responsible for the initial configuration of
the system.

Pg 149

The second option must be used by users with more advanced permissions and/or with additional needs for
flexibility in the use of the application.

PKB

Lists

Pg 150

Categories
It is possible to condition results through the application of conditions during the list creation process or in the
editing of its properties. A conditional expression consists in the definition of a restriction which filters list
results through a criterion. This is one of the most important features regarding lists, since it allows the user to
define lists configured exactly in accordance with the user's information.
However, there may be situations /decisions when this procedure is applied transversally, that is, for the
actual category information. This scenario consists essentially in one or more conditional expressions
transversal to all the lists associated to a category. In summary, the lists always have a conditional expression
specified in the category.

PKB

How to apply conditions to the categories?

Pg 151

User Maps
PRIMAVERA products allow the user to configure any map or list according to their tastes. The possibilities
provided by the report generating tool, Crystal Reports, by the acknowledged world producer Business
Objects - of which PRIMAVERA Business Software Solutions is the exclusive Portuguese representative - are
immense.
All the maps or lists generated from the PRIMAVERA software use Crystal Reports. The programmes provide,
at each option, a configuration, which was typified as <SIST>, that is, the system configuration, the
configuration according to PRIMAVERA Business Software Solutions. That report must not be changed by the
user who, for this effect, must duplicate it by giving it another name and carry out the necessary changes on
the duplicate. In this way, it is guaranteed that the user will not damage, by accident, the base maps that
were delivered with the programmes.

To duplicate a Map
1.

In the Map Maintenance window select the map that you want to duplicate;

2.

Choose the "Duplicate" option and confirm your intention;

3.

Give a name to the new map and confirm. Upon exiting the option, the new map appears in the Map
Maintenance window.

Pg 152

To change the design of a Map


1.

Select the Map whose configuration you want to change;

2.

Choose the Properties option. Access the following window:

3.

Access Crystal Reports through the "Editing" option. If the programme is not installed on your system,
the application will warn you of that fact;

4.

After changing the map, save the changes in Crystal Reports and exit the programme. From this
moment on, you can use your map whenever you want.

The manual accompanying the product presents an explanation for handling Crystal Reports, in digital format or through
the help programme. Crystal Reports is a product developed in English and the level of difficulty regarding its use varies
from extremely simple to extremely complex, depending on the users' intentions.

PKB

User Maps

Pg 153

Pg 154

Anda mungkin juga menyukai