Reputation: 139
I'm trying to create a function to feed a log, I can't because I don't know how to pass the base parameter, I tried: Base, this, this.Base :)
Error : The name 'Base' does not exist in the current context
Thanks
namespace ZLOG
{
public class INSERTLOG
{
public string exec(string traitement, string detail)
{
ZZLOGGRAPH graph = PXGraph.CreateInstance<ZZLOGGRAPH>();
ZZLOG dac = new ZZLOG();
dac.Logdate=DateTime.Now;
PX.SM.Branch un_etab = PXSelect<Branch, Where<Branch.branchID, Equal<Current<AccessInfo.branchID>>>>.Select(Base);
if (un_etab!=null) {dac.Logetab=un_etab.BranchCD;}
graph.ListViewZZLOG.Insert(dac);
graph.Actions.PressSave();
return "OL";
}
}
}
Upvotes: 0
Views: 200
Reputation: 1311
Just use the ZZLOGGRAPH instance - graph.
PX.SM.Branch un_etab = PXSelect<Branch, Where<Branch.branchID, Equal<Current<AccessInfo.branchID>>>>.Select(graph);
Upvotes: 2