Acumatica供应商ID段键与BIZZACCOUNT段长度不同
我想知道是否可以使用比BiZAccounts更少的字符数设置供应商ID段键。。 例如,我已经创建了像USBRANCH1这样的分支键,但现在我想创建像V001这样的供应商ID,但不允许用户输入超过4个字符? 我不知道为什么BIZaccount在段密钥方面与供应商、客户、员工联系在一起,因为这降低了灵活性,并减少了密钥长度和类型的更改Acumatica供应商ID段键与BIZZACCOUNT段长度不同,acumatica,Acumatica,我想知道是否可以使用比BiZAccounts更少的字符数设置供应商ID段键。。 例如,我已经创建了像USBRANCH1这样的分支键,但现在我想创建像V001这样的供应商ID,但不允许用户输入超过4个字符? 我不知道为什么BIZaccount在段密钥方面与供应商、客户、员工联系在一起,因为这降低了灵活性,并减少了密钥长度和类型的更改 谢谢您可以执行以下操作以实现此目标: 1.创建自己的分段关键点,如下所示: using PX.Data; using PX.Data.EP; using PX.Obj
谢谢您可以执行以下操作以实现此目标:
1.创建自己的分段关键点,如下所示:
using PX.Data;
using PX.Data.EP;
using PX.Objects.AP;
using PX.Objects.CR;
using PX.Objects.GL;
using System;
namespace ClassLibrary1.DAC
{
public class VendorExt:PXCacheExtension<Vendor>
{
[MyVendorRaw(IsKey = true)]
[PXDefault]
[PXFieldDescription]
public virtual string AcctCD { get; set; }
}
[PXDBString(30, IsUnicode = true, InputMask = "")]
[PXUIField(DisplayName = "Vendor", Visibility = PXUIVisibility.Visible)]
public sealed class MyVendorRawAttribute : AcctSubAttribute
{
public MyVendorRawAttribute() : this(null)
{
}
public MyVendorRawAttribute(Type where)
{
Type type = BqlCommand.Compose(new Type[]
{
typeof(Search2<, , >),
typeof(Vendor.acctCD),
typeof(LeftJoin<Contact, On<Contact.bAccountID, Equal<Vendor.bAccountID>, And<Contact.contactID, Equal<Vendor.defContactID>>>, LeftJoin<Address, On<Address.bAccountID, Equal<Vendor.bAccountID>, And<Address.addressID, Equal<Vendor.defAddressID>>>>>),
(where == null) ? typeof(Where<Match<Current<AccessInfo.userName>>>) : BqlCommand.Compose(new Type[]
{
typeof(Where2<, >),
typeof(Where<Match<Current<AccessInfo.userName>>>),
typeof(And<>),
where
})
});
PXDimensionSelectorAttribute pxdimensionSelectorAttribute;
this._Attributes.Add(pxdimensionSelectorAttribute = new PXDimensionSelectorAttribute("MYVENDOR", type, typeof(Vendor.acctCD), new Type[]
{
typeof(Vendor.acctCD),
typeof(Vendor.acctName),
typeof(Vendor.vendorClassID),
typeof(Vendor.status),
typeof(Contact.phone1),
typeof(Address.city),
typeof(Address.countryID)
}));
pxdimensionSelectorAttribute.DescriptionField = typeof(Vendor.acctName);
this._SelAttrIndex = this._Attributes.Count - 1;
this.Filterable = true;
((PXDimensionSelectorAttribute)this._Attributes[this._SelAttrIndex]).CacheGlobal = true;
}
public const string DimensionName = "MYVENDOR";
}
}
BIZACCT
继承的默认Vendor
分段密钥更改为您的MYVENDOR
,如下所示:
using PX.Data;
using PX.Data.EP;
using PX.Objects.AP;
using PX.Objects.CR;
using PX.Objects.GL;
using System;
namespace ClassLibrary1.DAC
{
public class VendorExt:PXCacheExtension<Vendor>
{
[MyVendorRaw(IsKey = true)]
[PXDefault]
[PXFieldDescription]
public virtual string AcctCD { get; set; }
}
[PXDBString(30, IsUnicode = true, InputMask = "")]
[PXUIField(DisplayName = "Vendor", Visibility = PXUIVisibility.Visible)]
public sealed class MyVendorRawAttribute : AcctSubAttribute
{
public MyVendorRawAttribute() : this(null)
{
}
public MyVendorRawAttribute(Type where)
{
Type type = BqlCommand.Compose(new Type[]
{
typeof(Search2<, , >),
typeof(Vendor.acctCD),
typeof(LeftJoin<Contact, On<Contact.bAccountID, Equal<Vendor.bAccountID>, And<Contact.contactID, Equal<Vendor.defContactID>>>, LeftJoin<Address, On<Address.bAccountID, Equal<Vendor.bAccountID>, And<Address.addressID, Equal<Vendor.defAddressID>>>>>),
(where == null) ? typeof(Where<Match<Current<AccessInfo.userName>>>) : BqlCommand.Compose(new Type[]
{
typeof(Where2<, >),
typeof(Where<Match<Current<AccessInfo.userName>>>),
typeof(And<>),
where
})
});
PXDimensionSelectorAttribute pxdimensionSelectorAttribute;
this._Attributes.Add(pxdimensionSelectorAttribute = new PXDimensionSelectorAttribute("MYVENDOR", type, typeof(Vendor.acctCD), new Type[]
{
typeof(Vendor.acctCD),
typeof(Vendor.acctName),
typeof(Vendor.vendorClassID),
typeof(Vendor.status),
typeof(Contact.phone1),
typeof(Address.city),
typeof(Address.countryID)
}));
pxdimensionSelectorAttribute.DescriptionField = typeof(Vendor.acctName);
this._SelAttrIndex = this._Attributes.Count - 1;
this.Filterable = true;
((PXDimensionSelectorAttribute)this._Attributes[this._SelAttrIndex]).CacheGlobal = true;
}
public const string DimensionName = "MYVENDOR";
}
}
使用PX.Data;
使用PX.Data.EP;
使用PX.Objects.AP;
使用PX.Objects.CR;
使用PX.Objects.GL;
使用制度;
命名空间ClassLibrary1.DAC
{
公共类VendorText:PXCacheExtension
{
[MyVendorRaw(IsKey=true)]
[默认值]
[现场描述]
公共虚拟字符串AcctCD{get;set;}
}
[PXDBString(30,IsUnicode=true,InputMask=”“)]
[PXUIField(DisplayName=“Vendor”,Visibility=PXUIVisibility.Visible)]
公共密封类Myvendorrawate属性:AcctSubAttribute
{
public MyVendorRawAttribute():this(null)
{
}
公共MyVendorRawaAttribute(在何处键入)
{
Type Type=BqlCommand.Compose(新类型[])
{
类型(搜索2),
类型(供应商账户),
typeof(LeftJoin)