Skip to main content
Answer

Trouble Appending Dropdown Values

  • October 12, 2022
  • 3 replies
  • 166 views

Forum|alt.badge.img+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";
}

}

 

Best answer by Naveen Boga

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.

 

 

 

3 replies

Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • Answer
  • October 12, 2022

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.

 

 

 


Forum|alt.badge.img+1
  • Author
  • Varsity I
  • October 12, 2022

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?

 

 


Forum|alt.badge.img+1
  • Author
  • Varsity I
  • October 12, 2022

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

 

Thanks