Acumatica 从图表中删除

Acumatica Delete from Graph

我想从图表中删除一条记录,我可以很容易地添加一条记录,但是删除一条带过滤器的语法是什么 Immatriculation 字段:

添加示例

ZVEHICULEGRAPH graph = PXGraph.CreateInstance<ZVEHICULEGRAPH>();
ZVEHICULE dac = new ZVEHICULE();
dac.Fichiernom="FICHIER.CSV";
dac.Fichierligne=55;
dac.Immatriculation= "AA-HH-38";

graph.ListViewZVEHICULE.Insert(dac);
graph.Actions.PressSave();

有了这张图

namespace FLEXFORYOU
{
  public class ZVEHICULEGRAPH : PXGraph<ZVEHICULEGRAPH>
  {
    public SelectFrom<ZVEHICULE>.View ListViewZVEHICULE;
    public PXSave<ZVEHICULE> Save;
    public PXCancel<ZVEHICULE> Cancel;
  }
}

谢谢 泽维尔

主要有两种方法。

调用 delete 将记录作为参数传递给视图。

 ZVEHICULEGRAPH graph = PXGraph.CreateInstance<ZVEHICULEGRAPH>();
    ZVEHICULE dac = graph.ListViewZCLIENT.Current = graph.ListViewZCLIENT.Search<ZVEHICULE.immatriculation>("AA-HH-38");
                graph.ListViewZCLIENT.Delete(dac);
                graph.Save.Press();

调用删除传递键字典。您需要使用字典调用 delete 方法。例如:

cache.Delete(keys, values); // Where keys are the [IsKey] properties of your dac and values their values.