有没有一种简单的方法可以自定义Acumatica内置下拉列表? [英] Is there a easy way to customize Acumatica build-in dropdown list?

查看:56
本文介绍了有没有一种简单的方法可以自定义Acumatica内置下拉列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

例如,在屏幕CR301000中,源字段现在有5个项目,但是我想在这里列出6个不同的项目,请提出建议。谢谢。

For example, in screen CR301000, source field is having 5 items right now, but I want to have 6 different items listing here, please advice how to do it. Thanks.

推荐答案

您可以使用几种方法。

1)进行定制以创建定制字符串/整数列表,然后在BLC中覆盖dac属性以指向您的定制列表。

1) Customization to create a custom string/int list then override the dac attribute in the BLC to point to your custom list.

首先创建定制字符串列表:

First create the custom stringlist:

public class CustomSourceAttribute : PXStringListAttribute
{
    public const string _LEADPROSPECT = "1";
    public const string _INITIALCONTACT = "2";
    public const string _QUALIFIED = "3";
    public const string _INITIALPRICE = "4";
    public const string _PROPOSALSENT = "5";
    public const string _POSITIVEPROPOSAL = "6";
    public const string _VERBALCOMMIT = "7";
    public const string _READYFORCONTRACT = "R";
    public const string _CONTRACTSENT = "8";
    public const string _CONTRACTSIGNED = "9";
    public const string _CLOSEDLOST = "0";
    public const string _TARGET = "T";
    public CustomSourceAttribute()
        : base(new string[]
    {
        _LEADPROSPECT,
        _INITIALCONTACT,
        _QUALIFIED,
        _INITIALPRICE,
        _PROPOSALSENT,
        _POSITIVEPROPOSAL,
        _VERBALCOMMIT,
        _READYFORCONTRACT,
        _CONTRACTSENT,
        _CONTRACTSIGNED,
        _CLOSEDLOST,
        _TARGET
    },
            new string[]
    {
        "Lead/Prospecting",
        "Initial Contact",
        "Qualified",
        "Initial Pricing Sent",
        "Proposal Sent",
        "Positive Proposal Discussions",
        "Verbal Commitment",
        "Ready for Contract",
        "Contract Sent",
        "Contract Signed",
        "Closed Lost",
        "Target"
    })
    {
    }
}

然后在BLC扩展名中覆盖dac属性:

Then override the dac attribute in a BLC Extension:

        [PXDBString(1, IsFixed = true)]
    [PXUIField(DisplayName = "Stage")]
    [CustomSourceAttribute]
    [PXDefault(CustomSourceAttribute._INITIALCONTACT)]
    [PXMassUpdatableField]
    protected void CROpportunity_StageID_CacheAttached(PXCache cache)
    { 
    }

此示例来自商机屏幕,但包含潜在客户也是如此

This sample is from the Opportunity screen but the same holds true w/ leads

2)自动化步骤以提供新的价值观。

2) Automation step to provide the new values.

请参见此处了解自动化步骤位置

第二种方法不需要自定义,但是如果已经定义了自动化步骤,则需要做更多的工作。您需要为存在的每个步骤创建自定义列表。

the second way doesn't require customization but does take more work if there is already automation steps defined. You need to create the custom list for each step that exists.

对于诸如Leads之类的东西,由于存在大量步骤,我会选择选项1

For something like Leads, I'd go with option 1 as there is tons of steps

这篇关于有没有一种简单的方法可以自定义Acumatica内置下拉列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆