back to top

Breaking Change on the LeadSearchAndConvert.ascx.cs file in Infor CRM 8.3x

Breaking Campaign Target Logic
In older version of the custom smart part LeadSearchAndConvert, there is code in the ConvertLeadToNewAccountAndContact method that converts lead campaign target data into the newly created contact record.
In older version this code look like:

        IList<ICampaignTarget> campaignTargets = EntityFactory.GetRepository<ICampaignTarget>().FindByProperty("EntityId", lead.Id.ToString());
        foreach (ICampaignTarget campaignTarget in campaignTargets)
            lead.ChangeCampaignTargetEntityID(contact, campaignTarget);

In 8.3 that Lead business rule no longer exists. Instead there is a new method in the ICampaignTarget entity. Now that section of code looks like:

        IList<ICampaignTarget> campaignTargets = EntityFactory.GetRepository<ICampaignTarget>().FindByProperty("EntityId", lead.Id.ToString());
        foreach (ICampaignTarget campaignTarget in campaignTargets)
			campaignTarget.ChangeEntityId(contact);

In the ConvertLeadToContact method there is also code that converts lead campaign target data into the newly created contact record, like in the ConvertLeadToNewAccountAndContact method.

                foreach (IAttachment attach in attachment)
                    sourceLead.AddAttachmentsContactID(contact, account, null, attach);

Again, in 8.3 that Lead business rule no longer exists. Instead there is a new method in the ICampaignTarget entity. Now that section of code looks like:

                foreach (IAttachment attach in attachment)
                    attach.AddContactId(contact, account, null);

Breaking Attachment Logic
Also, in the ConvertLeadToContact method there is code that takes attachments from the lead record and moves them to the newly create Contact record.

In older version this code looked like:

                foreach (IAttachment attach in attachment)
                    sourceLead.AddAttachmentsContactID(contact, account, null, attach);

In 8.3 that Lead business rule no longer exists. Instead there is a new method in the IAttachment entity. Now that section of code looks like:

                foreach (IAttachment attach in attachment)
                    attach.AddContactId(contact, account, null);

There is also similar logic in the AddAttachmentsToLead method.

    private void AddAttachmentsToLead(ILead sourceLead, IAccount account, IContact contact, IOpportunity opportunity)
    {
        IList<IAttachment> attachments = EntityFactory.GetRepository<IAttachment>().FindByProperty("LeadId", sourceLead.Id.ToString());
        foreach (IAttachment attachment in attachments)
            sourceLead.AddAttachmentsContactID(contact, account, opportunity, attachment);
    }

Now needs to be

    private void AddAttachmentsToLead(ILead sourceLead, IAccount account, IContact contact, IOpportunity opportunity)
    {
        IList<IAttachment> attachments = EntityFactory.GetRepository<IAttachment>().FindByProperty("LeadId", sourceLead.Id.ToString());
        foreach (IAttachment attachment in attachments)
            attachment.AddContactId(contact, account, opportunity);
    }

Just Plain Breaking to Break Logic
Finally, the the MergeRecords method, there is a call made to a Lead business rule.
In older versions this rule was named “ManualMergeLeadwithLead” in 8.3 this rule is now named “ManualMergeLeadWithLead” (capital W in the name).
And just as a final bonus that MergeRecords method also contains the attachment and campaign target code change requirements detailed above.

The result of this is if you bring over your previously customized ConvertLeadToNewAccountAndContact.ascx.cs file you will get an error like this in the web client:

‘~/SmartParts/Lead/LeadSearchAndConvert.ascx’ could not be loaded [Saleslogix Error Id=SLXE348A4029B757BD2]
System.Web.HttpCompileException (0x80004005): d:\Saleslogix\Inetpub\wwwroot\SlxClient\SmartParts\Lead\LeadSearchAndConvert.ascx.cs(919): error CS1061: ‘Sage.Entity.Interfaces.ILead’ does not contain a definition for ‘ChangeCampaignTargetEntityID’ and no extension method ‘ChangeCampaignTargetEntityID’ accepting a first argument of type ‘Sage.Entity.Interfaces.ILead’ could be found (are you missing a using directive or an assembly reference?)

or

‘~/SmartParts/Lead/LeadSearchAndConvert.ascx’ could not be loaded [Saleslogix Error Id=SLXE348A4029B757BD2]
System.Web.HttpCompileException (0x80004005): d:\Saleslogix\Inetpub\wwwroot\SlxClient\SmartParts\Lead\LeadSearchAndConvert.ascx.cs(1015): error CS1061: ‘Sage.Entity.Interfaces.ILead’ does not contain a definition for ‘AddAttachmentsContactID’ and no extension method ‘AddAttachmentsContactID’ accepting a first argument of type ‘Sage.Entity.Interfaces.ILead’ could be found (are you missing a using directive or an assembly reference?)

This kind of thing really frustrates us as Business Partners and our clients. Why make such breaking changes, and why are they not documented??

Come on Infor.

Contact Customer FX for your CRM project
We let our expertise speak for itself - let us know how our all-star team can help on your CRM project
About the Author
Kris Halsrud
Kris Halsrud
Kris Halsrud is a Senior Analyst / Developer for Customer FX Corporation.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Infor CRM Sync for Exchange: Action Required by August 31, 2026

Using Infor CRM Sync for Exchange with Microsoft 365? Your Exchange administrator must update tenant settings by August 31, 2026 to prevent sync disruption.

[Webinar] What’s Coming Next for Infor CRM SLX and Why v10 Matters

See what’s coming next for Infor CRM SLX, including new marketing workflows, automation improvements, and reasons to consider upgrading to v10.

Disable Caching in Infor CRM SLX Web Client

In the rare case caching is causing issues in the Infor CRM SLX web client, it is possible to disable specific types of caching by making edits using Application Architect, and then deploying.

Exploring AI Options for Infor CRM v10

I've started taking a closer look at the AI capabilities built into Infor CRM v10. Over the next several posts, I'll share what I learn. From the built-in features and supported AI providers to implementation considerations, costs, and practical use cases.

Infor CRM SLX 10.0: Delegate Ownership Changes for “Everyone” Records

Learn how the new EveryoneOwnerAssignment secured action in Infor CRM SLX 10.0 allows designated users to change ownership of Everyone-owned records without requiring Administrator access.

Related Articles

Infor CRM Sync for Exchange: Action Required by August 31, 2026

Using Infor CRM Sync for Exchange with Microsoft 365? Your Exchange administrator must update tenant settings by August 31, 2026 to prevent sync disruption.

[Webinar] What’s Coming Next for Infor CRM SLX and Why v10 Matters

See what’s coming next for Infor CRM SLX, including new marketing workflows, automation improvements, and reasons to consider upgrading to v10.

Disable Caching in Infor CRM SLX Web Client

In the rare case caching is causing issues in the Infor CRM SLX web client, it is possible to disable specific types of caching by making edits using Application Architect, and then deploying.

Exploring AI Options for Infor CRM v10

I've started taking a closer look at the AI capabilities built into Infor CRM v10. Over the next several posts, I'll share what I learn. From the built-in features and supported AI providers to implementation considerations, costs, and practical use cases.

Related Videos