Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
619 views
in Technique[技术] by (71.8m points)

acumatica - Unable to update Reason dropdown values in Cases

I am trying to update the dropdown values for Reason field in Cases if Status is set to Open.

    {
        if (InvokeBaseHandler != null)
            InvokeBaseHandler(cache, e);
        var row = (CRCase)e.Row;
        if (row == null) return;
        if (row.Status == CRCaseStatusesAttribute._OPEN)
        {
            PXStringListAttribute.SetList<CRCase.resolution>(cache, row,
                new string[] { "IP", "AD", "ES", "QQ", "CC" },
                new string[] { "In Process", "Updated", "In Escalation", "Pending Quote", "Pending Closure"}
                );
        }
    }

But it doesn't seem to be reflecting on the UI.

enter image description here

I checked if anything else is overriding my code in CRCaseMaint graph but couldn't find any which seem to be affecting the List.

I couldn't see anything off in Field definition though.

#region Resolution
        public abstract class resolution : PX.Data.BQL.BqlString.Field<resolution> { }

        [PXDBString(2, IsFixed = true)]
        [CRCaseResolutions]
        [PXUIField(DisplayName = "Reason")]
        [PXChildUpdatable]
        [PXMassUpdatableField]
        public virtual String Resolution { get; set; }
        #endregion
public sealed class CRCaseResolutionsAttribute : PXStringListAttribute
    {
        public const string _CUSTOMER_PRECLOSED = "CC";
        public const string _CUSTOMER_REPLIED = "AD";
        public const string _RESOLVED = "RD";
        public const string _ASSIGNED = "AS";
        public const string _UNASSIGNED = "UA";
        public const string _UPDATED = "AD";

        public CRCaseResolutionsAttribute();

        public sealed class CustomerPreclosed : BqlType<IBqlString, string>.Constant<CustomerPreclosed>
        {
            public CustomerPreclosed();
        }
        public sealed class CustomerReplied : BqlType<IBqlString, string>.Constant<CustomerReplied>
        {
            public CustomerReplied();
        }
        public sealed class Resolved : BqlType<IBqlString, string>.Constant<Resolved>
        {
            public Resolved();
        }
        public sealed class Assigned : BqlType<IBqlString, string>.Constant<Assigned>
        {
            public Assigned();
        }
        public sealed class Unassigned : BqlType<IBqlString, string>.Constant<Unassigned>
        {
            public Unassigned();
        }
        public sealed class Updated : BqlType<IBqlString, string>.Constant<Updated>
        {
            public Updated();
        }
    }

I think I can definitely use different labels and values than the one listed above. Is there anything else that I am missing and/or need to look into?

Note: Acumatica 2019 R1 (Build 19.112.0045) is the version that I am working on.

question from:https://stackoverflow.com/questions/65641865/unable-to-update-reason-dropdown-values-in-cases

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...