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);
_AllowedValuese_AllowedValues.Length - 2] = Email;
_AllowedValuese_AllowedValues.Length - 1] = Text;
Array.Resize(ref _AllowedLabels, _AllowedLabels.Length + 2);
_AllowedLabelsl_AllowedLabels.Length - 2] = "Email";
_AllowedLabelsl_AllowedLabels.Length - 1] = "Text";
}
}