Skip to main content
Question

Not able to customize Lead screen Source dropdown


Error: The entry form (ID: CR301000, title: Leads) cannot be automated. An item with the same key has already been added.

 

 

Actual Code in CRLead DAC:


// Summary:
// The source of the lead.
//
// Value:
// The field can have one of the values listed in the PX.Objects.CR.CRMSourcesAttribute
// class. The value of the field is automatically changed when the PX.Objects.CR.CRLead.ClassID
// property is changed.
CRMSources(BqlTable = typeof(CRLead))]
PXDBString(1, IsFixed = true)]
PXFormula(typeof(BqlOperand<Selector<classID, CRLeadClass.defaultSource>, IBqlString>.When<BqlChainableConditionBase<TypeArrayOf<IBqlBinary>.FilledWith<And<Compare<False, Equal<Use<IsImport>.AsBool>>>>>.And<Brackets<BqlChainableConditionBase<TypeArrayOf<IBqlBinary>.FilledWith<And<Compare<EntryStatus, Equal<EntryStatus.inserted>>>>>.Or<BqlOperand<Current<source>, IBqlString>.IsNull>>>>.Else<source>))]
PXMassMergableField]
PXUIField(DisplayName = "Source")]
public override string Source { get; set; }

 

My DACExtension Code:

 

public class CRLeadExt : PXCacheExtension<PX.Objects.CR.CRLead>
{
#region
NewSources]
PXMergeAttributes(Method = MergeMethod.Append)]
PXRemoveBaseAttribute(typeof(CRMSourcesAttribute))]
public string Source { get; set; }
#endregion
}

 

0 replies

Be the first to reply!

Reply