Substitute schema not invoked

Hello, 

 

We have a substitute source code schema which is not getting invoked. The same substitute schema is getting invoked in an older version of Creatio. We have followed the instructions mentioned in the following academy articles yet the substitute schema isn't getting involved. 

 

Older version: 7.11.0 (substitution works as expected)

New version: 7.15.2 (substitution doesn't work)

 

https://academy.creatio.com/documents/technic-sdk/7-16/replacement-class-object-factory 

https://academy.creatio.com/documents/technic-sdk/7-16/creating-replacement-classes-packages 

 

Both the parent schema (ReportHelper) and the substitute schema (SpecialNamingOrderInvoiceReportHelper) are attached.

 

The code below that is making the call to the ReportHelper in which we are expecting the overriden method in substitute class SpecialNamingOrderInvoiceReportHelper to be called:

 

public string CreateReport(string entitySchemaUId, string reportSchemaUId, string templateId, string recordId, string reportParameters, bool convertInPDF)

{

     var reportHelper = ClassFactory.Get<ReportHelper>();

     string key = reportHelper.CreateReport(entitySchemaUId, reportSchemaUId, templateId, recordId, reportParameters, convertInPDF);

     return key;

}

 

Any pointers on how to resolve this would be highly appreciated.

File attachments
Like 0

Like

1 comments

Dear Hatim,

 

I’ve implemented the same functionality on my local instance and it worked properly. Unfortunately, it is hard to determine the root cause of the issue without having an access to the instance.

 

However, I can recommend you to do the following things in order to resolve the issue:

1. Please check that a package that contains a replacement class has a dependency for the package that contains the replaceable class.

2. Please try to compile the application (the “Compile all” action).

 

Best regards,

Norton

Show all comments