Acumatica 我添加了这个评论。@BrianStevens-关于这个问题的解决方案,也给你通知。圣诞节来得早!非常感谢。一个输入错误:公共虚拟字符串应为String(小写)。@Customizer-您所做的唯一更改是IsKey属性吗?@Customizer,此处无输入错
Acumatica 我添加了这个评论。@BrianStevens-关于这个问题的解决方案,也给你通知。圣诞节来得早!非常感谢。一个输入错误:公共虚拟字符串应为String(小写)。@Customizer-您所做的唯一更改是IsKey属性吗?@Customizer,此处无输入错,acumatica,Acumatica,我添加了这个评论。@BrianStevens-关于这个问题的解决方案,也给你通知。圣诞节来得早!非常感谢。一个输入错误:公共虚拟字符串应为String(小写)。@Customizer-您所做的唯一更改是IsKey属性吗?@Customizer,此处无输入错误。我从类LandedCostCode复制了属性。string是string的别名:)@Lucian-whoops!我的错!再次感谢你!我也做类似的事情。当您显示初始值的默认值时,它似乎仍然像我所观察到的那样。。。默认情况下,在中获取值。在我的
我添加了这个评论。@BrianStevens-关于这个问题的解决方案,也给你通知。圣诞节来得早!非常感谢。一个输入错误:公共虚拟字符串应为String(小写)。@Customizer-您所做的唯一更改是
IsKey
属性吗?@Customizer,此处无输入错误。我从类LandedCostCode复制了属性。string是string的别名:)@Lucian-whoops!我的错!再次感谢你!我也做类似的事情。当您显示初始值的默认值时,它似乎仍然像我所观察到的那样。。。默认情况下,在中获取值。在我的例子中,我使用一个对话框作为公共对话框,但我需要根据正在执行的操作类型默认一个原因代码。今天我将再次尝试此操作,以确保它如我所记得的那样工作,但您可以使用FieldDefaulting事件为默认值添加智能。那么过滤器的缓存就不会脏了,它应该允许用户条目被传递给后续的业务逻辑!非常感谢。一个输入错误:公共虚拟字符串应为String(小写)。@Customizer-您所做的唯一更改是IsKey
属性吗?@Customizer,此处无输入错误。我从类LandedCostCode复制了属性。string是string的别名:)@Lucian-whoops!我的错!再次感谢你!我也做类似的事情。当您显示初始值的默认值时,它似乎仍然像我所观察到的那样。。。默认情况下,在中获取值。在我的例子中,我使用一个对话框作为公共对话框,但我需要根据正在执行的操作类型默认一个原因代码。今天我将再次尝试此操作,以确保它如我所记得的那样工作,但您可以使用FieldDefaulting事件为默认值添加智能。那么过滤器的缓存就不会变脏,它应该允许将用户条目传递给后续的业务逻辑。
<px:PXSmartPanel runat="server" ID="PanelAskForLCCode" LoadOnDemand="True" AutoRepaint="True" Key="LandedCostCodeSelection" CaptionVisible="True" Caption="Select Landed Cost Code" AcceptButtonID="CstButton4" CancelButtonID="CstButton5">
<px:PXPanel runat="server" ID="CstPanel9">
<px:PXFormView runat="server" ID="CstFormView10" SkinID="Transparent" Width="100%" SyncPosition="True" DataMember="LandedCostCodeSelection" DataSourceID="ds">
<Template>
<px:PXSelector runat="server" ID="CstPXSelector11" DataField="LandedCostCodeID" CommitChanges="True" DataSourceID="ds">
</px:PXSelector>
</Template>
</px:PXFormView>
</px:PXPanel>
<px:PXPanel runat="server" ID="LandedCostCodeSelectionButtons" SkinID="Buttons">
<px:PXButton runat="server" ID="CstButton4" DialogResult="OK" Text="OK" />
<px:PXButton runat="server" ID="CstButton5" DialogResult="Cancel" Text="Cancel" />
</px:PXPanel></px:PXSmartPanel>
public PXSelect<LandedCostCode> LandedCostCodeSelection;
if (LandedCostCodeSelection.AskExt() == WebDialogResult.OK)
{
//rest of code here
}
public PXFilter<LandedCostCode> LandedCostCodeSelection;
<px:PXSmartPanel runat="server" ID="PanelAskForLCCode" Key="LandedCostCodeSelection" CaptionVisible="True" Caption="Select Landed Cost Code" AcceptButtonID="CstButton4" CancelButtonID="CstButton5" Width="300px" AutoRepaint="True" LoadOnDemand="True">
<px:PXFormView runat="server" ID="CstFormView18" CaptionVisible="False" Caption="LC Code Selection" DataSourceID="ds" DataMember="LandedCostCodeSelection">
<Template>
<px:PXLayoutRule runat="server" ID="CstPXLayoutRule19" StartColumn="True" ControlSize="XM" LabelsWidth="S"/>
<px:PXSelector runat="server" ID="CstPXSelector20" DataField="LandedCostCodeID" CommitChanges="True" DataSourceID="ds" DataMember="LandedCostCodeSelection"/>
</Template>
<CallbackCommands>
<Search CommitChanges="True"/>
</CallbackCommands>
</px:PXFormView>
<px:PXPanel runat="server" ID="LandedCostCodeSelectionButtons" SkinID="Buttons">
<px:PXButton runat="server" ID="CstButton4" DialogResult="OK" Text="OK"/>
<px:PXButton runat="server" ID="CstButton5" DialogResult="Cancel" Text="Cancel"/>
</px:PXPanel>
</px:PXSmartPanel>
if (LandedCostCodeSelection.AskExt((graph, view) =>
{
LandedCostCodeSelection.Cache.Clear();
},true) == WebDialogResult.OK)
{
}
if (LandedCostCodeSelection.AskExt((graph, view) =>
{
LandedCostCodeSelection.Cache.Clear();
LandedCostCodeSelection.Current.LandedCostCodeID = "XYZ";
},true) == WebDialogResult.OK)
{
}
[Serializable]
[PXHidden]
public partial class LandedCostCodeFilter: IBqlTable
{
#region LandedCostCodeID
public abstract class landedCostCodeID : PX.Data.BQL.BqlString.Field<landedCostCodeID> { }
[PXString(15, IsUnicode = true)]
//[PXUnboudDefault("APPLE")] //optional, to preselect a value
[PXUIField(DisplayName = "Landed Cost Code",Visibility=PXUIVisibility.SelectorVisible)]
[PXSelector(typeof(Search<LandedCostCode.landedCostCodeID>))]
public virtual String LandedCostCodeID {get; set}
#endregion
}
public PXFilter<LandedCostCodeFilter> LandedCostCodeSelection;
public PXAction<POLandedCostDoc> SelectLandedCost;
[PXButton]
[PXUIField(DisplayName = "Select Landed Cost Code", MapEnableRights = PXCacheRights.Delete, MapViewRights = PXCacheRights.Delete)]
protected void selectLandedCost()
{
if(LandedCostCodeSelection.AskExt(true) != WebDialogResult.OK) return;
// do some stuff here
}
<px:PXSmartPanel runat="server" ID="PanelAskForLCCode" Caption="Select Landed Cost Code" CaptionVisible="True" Key="LandedCostCodeSelection">
<px:PXFormView runat="server" ID="CstFormView2" DataMember="LandedCostCodeSelection" SkinID="Transparent" DataSourceID="ds" Height="100%" Width="100%">
<Template>
<px:PXLayoutRule runat="server" ID="CstPXLayoutRule3" StartColumn="True" />
<px:PXSelector runat="server" ID="CstPXSelector4" DataField="LandedCostCodeID" CommitChanges="True" AutoRefresh="True" />
<px:PXPanel runat="server" ID="LandedCostCodeSelectionButtons" SkinID="Buttons">
<px:PXButton runat="server" ID="CstButton6" DialogResult="OK" Text="OK" />
<px:PXButton runat="server" ID="CstButton7" DialogResult="Cancel" Text="Cancel" /></px:PXPanel></Template></px:PXFormView></px:PXSmartPanel>