How to create an integration project with Visual Studio?
This document describes the necessary steps to create an application that integrates with the PRIMAVERA ERP. Step 1 - Base references 1. To access the entity services exposed by the different modules, add a reference to the ErpBSxxx.DLL assembly. 2. To access the services exposed by the platform, add a reference to the StdBSxxx.DLL assembly. 3. To access enumerated items, collections, etc. add a reference to the StdBExxx.DLL assembly. Step 2 - Module references 1. To access the system's base entities and services (customers, items, unit, etc.), add a reference to the BasBExxx.DLL assembly. 2. To access, for example, the entities and services exposed by the sales module, you must add references to the VndBExxx.DLL and IVndBSxxx.DLL assemblies. Step 3 - Opening the company 1. Opening the company is the first step to take before using API. This method is used to authenticate the user and validate company access permissions (database), thus ensuring access to the services exposed by the modules. Step 4 - Opening the platform 1. This step is only necessary if you need to access technological services, such as the using the lists, reporting, security, dialogs, etc. 2. Below please find the complete initialization flow of the ERP API: See the code examples available on GitHub that will give you support in your integrations.Requirements
public static PriEngine CreatContext(string Company, string User, string Password)
{
StdBSConfApl objAplConf = new StdBSConfApl();
StdPlatBS Plataforma = new StdPlatBS();
ErpBS MotorLE = new ErpBS();
EnumTipoPlataforma objTipoPlataforma;
objTipoPlataforma = EnumTipoPlataforma.tpEmpresarial;
objAplConf.Instancia = 'Default';
objAplConf.AbvtApl = 'ERP';
objAplConf.PwdUtilizador = Password;
objAplConf.Utilizador = User;
objAplConf.LicVersaoMinima = '10.00';
StdBETransaccao objStdTransac = new StdBETransaccao();
try
{
Plataforma.AbrePlataformaEmpresa(Company, objStdTransac, objAplConf, objTipoPlataforma);
}
catch (Exception ex)
{
throw (ex);
}
if (Plataforma.Inicializada)
{
MotorLE.AbreEmpresaTrabalho(objTipoPlataforma, Company, User, Password, objStdTransac, 'Default');
Platform = Plataforma;
Engine = MotorLE;
EngineStatus = true;
}
return engineInstance;
}
login para deixar a sua opinião.