私のカスタム属性を使ってイベントをトリガする必要があります。この場合、usrTextileItemTypeフィールドをvisible = trueにトリガするには、usrTextileItem == trueが必要です。イベントハンドラでacumaticaカスタム属性を使用するにはどうすればよいですか?
はここ
[PXBool]
[PXUIField(DisplayName="Textile Item")]
ここテキスタイルアイテムの種類の拡張子の私の宣言
[PXDBString(1)]
[PXUIField(DisplayName="Textile Item Type", Visible=false)]
[PXDefault("C")]
[PXStringList(
new string[]{
"C","Y","B","F"
},
new string[]{
"Cotton", "Yarn","Beam","Finish Goods"
})]
の繊維アイテムのための拡張の私の宣言だとこれが私の現在のInventroyMaint__Extension
protected void InventoryItem_UsrTextileItem_FieldUpdated(PXCache cache, PXFieldUpdatedEventArgs e)
{
InventoryItem row = (InventoryItem)e.Row;
InventoryItemExt ext = cache.GetExtension<InventoryItemExt>();
if(ext.usrTextileItem==true){
PXUIFieldAttribute.SetVisible<InventoryItemExt.usrTextileItemType>(cache, row, true);
}
}
とIです拡張機能の値を取得できません、と私は言う3つのエラー: 最初のエラー:
'PX.Data.PXCache' does not contain a definition for 'GetExtension' and the best extension method overload 'PX.Data.PXCacheEx.GetExtension(PX.Data.IBqlTable)' has some invalid arguments in file: Code#InventoryItemMaint(37)
Instance argument: cannot convert from 'PX.Data.PXCache' to 'PX.Data.IBqlTable' in file: Code#InventoryItemMaint(37)
'usrTextileItem': cannot reference a type through an expression; try 'PX.Objects.IN.InventoryItemExt.usrTextileItem' instead in file: Code#InventoryItemMaint(39)