PrimaverabssDeveloper / ERP10Integration

In this repository you will find several resources and code samples to accelerate your integration with PRIMAVERABSS ERP V10.
32 stars 26 forks source link

Object reference not set to an instance of an object. #8

Closed allanShady closed 4 years ago

allanShady commented 4 years ago

Clonei o repositório, adicionei referenciei as dll dentro da pasta Apl no projecto Primavera.Sales e ao executar (no VS studio 2019) uma exception é lançada, logo ao fazer login com o mesmo user (Super admin e técnico), password e a empresa que uso sempre para os testes no ERP.

Exception thrown: 'Primavera.Platform.Exceptions.ExpectedException' in StdPlatBS100.dll
Exception thrown: 'Primavera.Platform.Exceptions.ExpectedException' in Primavera.Sales.exe   
allanShady commented 4 years ago

Figured it out, it was the company type. I changed the line 31 to

objTipoPlataforma = EnumTipoPlataforma.tpProfissional;

Maybe the exception should be reviewed to not take us a few minutes to found out what is going on. Or put the company type on login form. I believe this way does not take user few second of thinking.