Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/flutter/11.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中添加自定义新屏幕的通用搜索_Acumatica_Acumatica Kb - Fatal编程技术网

我们如何在Acumatica中添加自定义新屏幕的通用搜索

我们如何在Acumatica中添加自定义新屏幕的通用搜索,acumatica,acumatica-kb,Acumatica,Acumatica Kb,用户需求是为新屏幕添加通用搜索,在库存模块下添加了我们的新屏幕。此外,新屏幕不是入口屏幕,它与用户视图屏幕类似,因此在注释id的DAC字段中,我们添加了可搜索属性,但它不起作用 有人能帮我提供示例代码或纠正我哪里做错了吗。 另外,请让我知道是否可以为新屏幕添加可搜索属性,或者不在Acumatica中 提前谢谢 #region Noteid public new abstract class noteid : PX.Data.BQL.BqlGuid.Field<noteid

用户需求是为新屏幕添加通用搜索,在库存模块下添加了我们的新屏幕。此外,新屏幕不是入口屏幕,它与用户视图屏幕类似,因此在注释id的DAC字段中,我们添加了可搜索属性,但它不起作用

有人能帮我提供示例代码或纠正我哪里做错了吗。 另外,请让我知道是否可以为新屏幕添加可搜索属性,或者不在Acumatica中

提前谢谢

 #region Noteid
        public new abstract class noteid : PX.Data.BQL.BqlGuid.Field<noteid> { }
        protected Guid? _Noteid;
        [PXSearchable(PX.Objects.SM.SearchCategory.All , "{0}", new Type[] { typeof(KWLotSerialDetails.lotSerialNbr) },
            new Type[] { typeof(KWLotSerialDetails.lotSerialNbr), typeof(KWLotSerialDetails.inventoryID)},
            NumberFields = new Type[] { typeof(KWLotSerialDetails.lotSerialNbr) },
              Line1Format = "{0}{1}", Line1Fields = new Type[] { typeof(KWLotSerialDetails.lotSerialNbr), typeof(KWLotSerialDetails.inventoryID)},
              Line2Format = "{1}{2}", Line2Fields = new Type[] { typeof(KWLotSerialDetails.lotSerialNbr), typeof(KWLotSerialDetails.inventoryID) })]

        public virtual Guid? Noteid
        {
            get
            {
                return this._Noteid;
            }
            set
            {
                this._Noteid = value;
            }
        }
        #endregion
#区域注释ID
公共新抽象类noteid:PX.Data.BQL.BqlGuid.Field{}
受保护的Guid_Noteid;
[PXSearchable(PX.Objects.SM.SearchCategory.All,“{0}”,新类型[]{typeof(KWLotSerialDetails.lotSerialNbr)},
新类型[]{typeof(KWLotSerialDetails.lotSerialNbr),typeof(KWLotSerialDetails.inventoryID)},
NumberFields=新类型[]{typeof(KWLotSerialDetails.lotSerialNbr)},
Line1Format=“{0}{1}”,Line1Fields=new Type[]{typeof(KWLotSerialDetails.lotSerialNbr),typeof(KWLotSerialDetails.inventoryID)},
Line2Format=“{1}{2}”,Line2Fields=new Type[]{typeof(KWLotSerialDetails.lotSerialNbr),typeof(KWLotSerialDetails.inventoryID)}]
公共虚拟Guid?注
{
得到
{
返回此。\u Noteid;
}
设置
{
这是。_Noteid=值;
}
}
#端区

您完全可以将通用搜索添加到自定义表中。搜索被添加到DAC,而不是屏幕,所以在“用户视图屏幕”中使用它并不重要。重建全文索引时,NoteID字段将被处理到SearchIndex表中

我可能错了,但我也认为您需要将Noteid字段转换为Noteid/Noteid才能正常工作。C#区分大小写,FullIndexRebuild.cs包含: entity.GetNestedType(“noteID”) ... 因此,我认为它找不到Noteid/Noteid字段就是因为这个原因

我的一个自定义可搜索NoteID字段:

#region NoteID
[PXNote]
[PXSearchable(PX.Objects.SM.SearchCategory.IN, "{0}",
    new Type[] { typeof(SSINItemManufacturer.manufacturerItem) },
    new Type[] { typeof(SSINItemManufacturer.manufacturerItem) },
    NumberFields = new Type[] { typeof(SSINItemManufacturer.manufacturerItem) },
    Line1Format = "{0}", Line1Fields = new Type[] { typeof(SSINItemManufacturer.manufacturerItem) },
    Line2Format = "{0}", Line2Fields = new Type[] { typeof(SSINItemManufacturer.manufacturerItem) },
    WhereConstraint = typeof(Where<Current<SSINItemManufacturer.isActive>, NotEqual<False>>),
    MatchWithJoin = typeof(InnerJoin<InventoryItem, On<InventoryItem.inventoryID, Equal<SSINItemManufacturer.inventoryID>>>),
    SelectForFastIndexing = typeof(Select2<SSINItemManufacturer, InnerJoin<InventoryItem, On<SSINItemManufacturer.inventoryID, Equal<InventoryItem.inventoryID>>>>)
    )]
public virtual Guid? NoteID { get; set; }
public abstract class noteID : PX.Data.BQL.BqlGuid.Field<noteID> { }
#endregion
#区域注释ID
[注]
[PXSearchable(PX.Objects.SM.SearchCategory.IN,“{0}”,
新类型[]{typeof(SSINItemManufacturer.manufacturerItem)},
新类型[]{typeof(SSINItemManufacturer.manufacturerItem)},
NumberFields=新类型[]{typeof(SSINItemManufacturer.manufacturerItem)},
Line1Format=“{0}”,Line1Fields=新类型[]{typeof(SSINItemManufacturer.manufacturerItem)},
Line2Format=“{0}”,Line2Fields=新类型[]{typeof(SSINItemManufacturer.manufacturerItem)},
WhereConstraint=类型(其中),
MatchWithJoin=typeof(InnerJoin),
SelectForFastIndexing=typeof(Select2)
)]
公共虚拟Guid?NoteID{get;set;}
公共抽象类noteID:PX.Data.BQL.BqlGuid.Field{}
#端区
同时检查“重建全文实体”屏幕是否“已知”您的DAC。检查屏幕SM209500以确保您的DAC已列出,如果已列出,请尝试在其上重建全文索引