Solved

Trouble Appending Dropdown Values

  • 12 October 2022
  • 3 replies
  • 103 views

Userlevel 3
Badge +1

Hello,

Trying to update the Lead Source Dropdown with a few additional options.

I would think the two following classes would work, but I do not get any UI changes. I think I am missing something simple.

    public class CRLead_Existing : PXCacheExtension<PX.Objects.CR.CRLead>
{
public static bool IsActive() => (true);

#region Source
[PXRemoveBaseAttribute(typeof(CRMSourcesAttribute))]
[PXMergeAttributes(Method = MergeMethod.Append)]
[PXDBString(1, IsFixed = true)]
[GPLeadSource]
public string Source { get; set; }
#endregion

}

 

 public class GPLeadSourceAttribute : CRMSourcesAttribute
{
public const string Email = "E";

public const string Text = "T";

public GPLeadSourceAttribute()
{
Array.Resize(ref _AllowedValues, _AllowedValues.Length +2);
_AllowedValues[_AllowedValues.Length - 2] = Email;
_AllowedValues[_AllowedValues.Length - 1] = Text;
Array.Resize(ref _AllowedLabels, _AllowedLabels.Length + 2);
_AllowedLabels[_AllowedLabels.Length - 2] = "Email";
_AllowedLabels[_AllowedLabels.Length - 1] = "Text";
}

}

 

icon

Best answer by Naveen Boga 12 October 2022, 05:03

View original

3 replies

Userlevel 7
Badge +17

Hi @Leif 

Values for the Source field are controlled in the workflow, see the screenshot below.  You must extend the Default workflow and include new values for various States and publish package.

 

 

 

Userlevel 3
Badge +1

Okay, 

I have extended the workflow, however the dialog that you show does not provide a method for adding new fields. Do I also need the DAC Extensions I included initially?

 

 

Userlevel 3
Badge +1

I added the DAC Ext back and that allowed me to enable/add the new values.

 

Thanks 

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved