VBA Migration to C # - V10 (CustomerID)

2

I needed help in validating a small customization of VBA for C #. In this case does CDU_CabVar1 not get the value of the CabecDoc.ModoPag field? The messages appear with correct value but the field does not get the value when the client is identified.

using System.Text;
using System.Threading.Tasks;
using Primavera.Extensibility.BusinessEntities.ExtensibilityService.EventArgs;
using Primavera.Extensibility.Sales.Editors;
using Primavera.Extensibility.BusinessEntities;
using StdPlatBS100;
using VndBE100;
using BasBE100;
using StdBE100;
using VndBS100;

namespace Primavera.Logistics.Extensibility
{
    public class SalesEditor : EditorVendas
    {
        public override void ClienteIdentificado(string Cliente, ref bool Cancel, ExtensibilityEventArgs e)
        {
            PSO.Dialogos.MostraAviso("ModoPag: " + this.DocumentoVenda.ModoPag);

            this.DocumentoVenda.CamposUtil["CDU_CabVar1"].Valor = this.DocumentoVenda.ModoPag;

            PSO.Dialogos.MostraAviso("Valor do campo CABVAR1: " + this.DocumentoVenda.CamposUtil["CDU_CabVar1"].Valor);

            base.ClienteIdentificado(Cliente, ref Cancel, e);
        }
    }
}
    
asked by anonymous 04.07.2018 / 10:58

2 answers

2

Operating on previous versions, the problem is at the V10 engine level.

In the case of CDU fields (user fields) it could be because the field is not registered (created directly in SQL Server and not added to "Stdcamposvar"). But in this case the field "CDU_CabVar1" already comes by default.

    
04.07.2018 / 13:28
1

As Mr Joao said, this problem has been solved internally and will be available in early August.

Unfortunately, the only workaround possible is to change another property of the sales document object in addition to the user field. This will force the update on the tab.

    
19.07.2018 / 17:22