What are the options available to create a new receipt from an isolated .NET DLL. I was able to create a new mandant object and also used the DcmContextBelegProxyServiceCall to initialize a beleg. But the BelId is always set to zero. Doesn't Sage automatically create a BelID? Is there any such parameters for it?
Here is what I have tried.
Session session;
Mandant mandant;
session = ApplicationEngine.CreateSession("ccc", ApplicationToken.Abf, null, new NamePasswordCredential("Sage", ""));
mandant = session.CreateMandant(1);
var beleg = new Sagede.OfficeLine.Wawi.BelegEngine.Beleg(mandant, Erfassungsart.Verkauf);
var data = new DataContainer();
var context = new DcmContextBelegProxyServiceCall(beleg, new NamedParameters(), "", data, false);
context.SetSystemContext(DcmDefinitionManager.DcmListId.BelegProxyAfterServiceCall, "VVA", new ParameterBag(), false, mandant);
Does anyone have a working code snippet to create a new beleg using .net library classes. Also, will be same approach be applicable to other objects such as Customers, Adress and so on?
Thanks
Here is what I have tried.
Session session;
Mandant mandant;
session = ApplicationEngine.CreateSession("ccc", ApplicationToken.Abf, null, new NamePasswordCredential("Sage", ""));
mandant = session.CreateMandant(1);
var beleg = new Sagede.OfficeLine.Wawi.BelegEngine.Beleg(mandant, Erfassungsart.Verkauf);
var data = new DataContainer();
var context = new DcmContextBelegProxyServiceCall(beleg, new NamedParameters(), "", data, false);
context.SetSystemContext(DcmDefinitionManager.DcmListId.BelegProxyAfterServiceCall, "VVA", new ParameterBag(), false, mandant);
Does anyone have a working code snippet to create a new beleg using .net library classes. Also, will be same approach be applicable to other objects such as Customers, Adress and so on?
Thanks