Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Acumatica pxuibql语句_Acumatica - Fatal编程技术网

Acumatica pxuibql语句

Acumatica pxuibql语句,acumatica,Acumatica,页码:AR303000 我需要将我的BQL语句从where更改为where2。 我的最终目标是,如果customerClassID为02或03,则需要注意字段 以下是需要固定的位置2: [PXUIRequired(typeof(Where2<Where <Customer.customerClassID, Equal<attentionRequiredCustomerClass02>>, Or<Customer.customerClassID, Equal&l

页码:AR303000 我需要将我的BQL语句从where更改为where2。 我的最终目标是,如果customerClassID为02或03,则需要注意字段

以下是需要固定的位置2:

[PXUIRequired(typeof(Where2<Where
<Customer.customerClassID, Equal<attentionRequiredCustomerClass02>>, Or<Customer.customerClassID, Equal<attentionRequiredCustomerClass03>>>))]
[PXUIRequired(typeof(Where2))]
这是代码片段:

    //create constant class to check the CustomerClassID that is a string
    public const string AttentionRequiredCustomerClass02 = "02";
    public class attentionRequiredCustomerClass02 : PX.Data.BQL.BqlString.Constant<attentionRequiredCustomerClass02>
    {
        public attentionRequiredCustomerClass02() : base(AttentionRequiredCustomerClass02) {; }
    }

    //create constant class to check the CustomerClassID that is a string
    public const string AttentionRequiredCustomerClass03 = "03";
    public class attentionRequiredCustomerClass03 : PX.Data.BQL.BqlString.Constant<attentionRequiredCustomerClass03>
    {
        public attentionRequiredCustomerClass03() : base(AttentionRequiredCustomerClass03) {; }
    }



    //Contact.Attention
    //merge the attribute with the existing, setting the making Attention required when CustomerClassID = 2
    [PXMergeAttributes(Method = MergeMethod.Merge)]
    [PXDefault(PersistingCheck = PXPersistingCheck.Nothing)]
    //selector follows the contact's baccount to get the customer class, and compares it to the bql constant created above.
    //[PXUIRequired(typeof(Where2<Where<Customer.customerClassID, Equal<attentionRequiredCustomerClass02>>, Or<Customer.customerClassID, Equal<attentionRequiredCustomerClass03>>>))]
    [PXUIRequired(typeof(Where<Selector <Contact.bAccountID,Customer.customerClassID>, Equal<attentionRequiredCustomerClass02>>))]
    protected virtual void Contact_Attention_CacheAttached(PXCache cache)
    { }
//创建常量类以检查作为字符串的CustomerClassID
public const string attention requiredCustomerClass02=“02”;
要求参加公开课的客户类别02:PX.Data.BQL.BqlString.Constant
{
public attentionRequiredCustomerClass02():基本(attentionRequiredCustomerClass02){;}
}
//创建常量类以检查作为字符串的CustomerClassID
public const string Attention RequiredCustomerClass03=“03”;
要求参加公共课堂的客户课堂03:PX.Data.BQL.BqlString.Constant
{
public attentionRequiredCustomerClass03():基本(attentionRequiredCustomerClass03){;}
}
//联络,注意
//将属性与现有属性合并,设置CustomerClassID=2时需要注意的事项
[PXMergeAttributes(Method=MergeMethod.Merge)]
[PXDefault(PersistingCheck=PXPersistingCheck.Nothing)]
//选择器跟随联系人的baccount来获取customer类,并将其与上面创建的bql常量进行比较。
//[PXUIRequired(类型(其中2))]
[PXUIRequired(类型(其中))]
受保护的虚拟无效联系人\u注意\u缓存已连接(PXCache缓存)
{ }
未注释掉的[PXUIRequired]正在工作。我需要将AttentitionRequiredCustomerClass03纳入我的声明中


我的最终目标是,如果customerClassID为02或03,则需要注意字段

,PXUIRequired方法在我这方面也不起作用

另一种方法在创建新客户的过程中正常工作:

protected virtual void Contact_RowSelected(PXCache sender, PXRowSelectedEventArgs e)
{
        if (e.Row == null)
            return;

        Customer row = this.Base.CurrentCustomer.Current; 
         PXDefaultAttribute.SetPersistingCheck<Contact.attention>(sender, e.Row, row.CustomerClassID == "02" || row.CustomerClassID == "03" ? PXPersistingCheck.NullOrBlank : PXPersistingCheck.Nothing);
 }


[PXMergeAttributes(Method = MergeMethod.Merge)]
[PXDefault(PersistingCheck = PXPersistingCheck.Nothing)]
protected virtual void Contact_Attention_CacheAttached(PXCache cache)
{ }
protected virtual void Contact\u RowSelected(PXCache发送方,PXRowSelectedEventArgs e)
{
如果(e.Row==null)
返回;
客户行=this.Base.CurrentCustomer.Current;
PXDefaultAttribute.SetPersistingCheck(发送方,例如行,行.CustomerClassID==“02”| |行.CustomerClassID==“03”?PXPersistingCheck.NullOrBlank:PXPersistingCheck.Nothing);
}
[PXMergeAttributes(Method=MergeMethod.Merge)]
[PXDefault(PersistingCheck=PXPersistingCheck.Nothing)]
受保护的虚拟无效联系人\u注意\u缓存已连接(PXCache缓存)
{ }


请注意,对于现有记录,如果更改了自定义类,则不会执行验证,除非更改了联系人表单中的任何其他字段。很可能是因为缓存未被修改,因此其相应的事件不会执行。

请提供更多详细信息:您收到了什么错误?你想做什么?我想我使用where 2的方式不正确,因为当我使用where 2时,PXUIRequired不起作用,而是使用正常的where。我希望将where更改为where2,以便查看customerClassID是02还是03您当前是否收到错误?或者数据没有被过滤(就好像PXUIRequired不存在一样)?没有错误,就好像没有PXUIRequired一样。我的最终目标是,如果customerClassID为02或03,则需要注意字段