Skip to main content

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";
}

}

 

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.

 

 

 


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?

 

 


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

 

Thanks 


Reply