I need to customize the Lead's “Convert to Opportunity” Action (convertToOpportunityAll) to map the Lead Class to the Opportunity Class and then als the related attributes.
I’m trying to create a LeadMaint Graph Extension in a Customization project in 2022 R2.
Problems:
1. When I try to Inspect the Element for the convertToOpportunityAll Action Button and click ACTIONS and choose CUSTOMIZE BUSINESS LOGIC it creates a Code file like this:
using PX.Data;
using PX.Data.BQL;
using PX.Data.BQL.Fluent;
using PX.Objects.AR;
using PX.Objects.CR.Extensions.CRDuplicateEntities;
using PX.Objects.CR.Extensions.SideBySideComparison;
using PX.Objects.CR.Extensions.SideBySideComparison.Merge;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using PX.Objects;
using PX.Objects.CR;
namespace PX.Objects.CR
{
public class LeadMaint_Extension : PXGraphExtension<PX.Objects.CR.LeadMaint>
{
#region Event Handlers
#endregion
}
}
but when I click OVERRIDE METHOD there are no Methods listed for the convertToOpportunityAll Action...
Why is this missing?
2. I dug around the Source Code and found a namespace PX.Objects.CR.Extensions.CRCreateActions with a method ConvertToOpportunityAll which looks like it should work.
I've tried to pair it down and create that as an extension for LeadMaint (as follows) but it has lots of Publish errors and I'm really not sure what to do next.
using PX.Data;
using PX.Data.BQL;
using PX.Data.BQL.Fluent;
using PX.Objects.AR;
using PX.Objects.CR.Extensions.CRDuplicateEntities;
using PX.Objects.CR.Extensions.SideBySideComparison;
using PX.Objects.CR.Extensions.SideBySideComparison.Merge;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using PX.Objects;
using PX.Objects.CR;
namespace PX.Objects.CR.Extensions.CRCreateActions
{
public class CRCreateOpportunityAllAction_Extension : PXGraphExtension<CRCreateOpportunityAllAction, TGraph, TMaster, TOpportunityExt, TAccountExt, TContactExt>
{
[PXOverride]
public delegate IEnumerable ConvertToOpportunityAll(PXAdapter adapter);
[PXButton]
[PXUIField]
public IEnumerable ConvertToOpportunityAll(PXAdapter adapter, CRCreateOpportunityAllAction BaseMethod)
{
//Logic Here
return BaseMethod.Invoke(adapter);
}
}
}
I and a colleague have spent a couple of days researching and watching training videos but nothing seems to show us how to implement this customisation?
Any help would be fantastic!
Best answer by crowers
View original