Custom fields on Sales invoice

Hi!

We need to add some custom fields to the Invoice.

We are reading that we can do this without updating SSRS and by extending the DocDataSourceProviderSrsReporting class for D365FO in Visual Studio, and in fact this is preferred because we aren’t adding custom code to D365 (always easier for updates).

However, It seems the templates have been deprecated. Can you point us in the right direction?

Thank you kindly.

The approach with extending the DocDataSourceProviderSrsReporting class is correct when we talk about a general case, i.e. configuring a new report which doesn’t already exist among the Docentric replicas. But as you are talking about the Invoice report, for which the Docentric replica is provided, the preferred way is to extend the report-specific DSP class for this report, which is also part of our replica model. The class in question is DocSalesInvoiceReportDSP and as your developer will notice, it extends indirectly from the previously mentioned (base) class DocDataSourceProviderSrsReporting.

Here are some most important facts that we explain in more detail during the technical training (you had only the designer and functional training, while the technical training is for your or your partner’s developers):

  • Our replica template is designed based on the report datasource coming out of the DocSalesInvoiceReportDSP class, which significantly reshapes the original datasource created by SSRS. Namely, it is close to impossible for the non-technical people to deal with the original datasource for the invoice. On the other hand, the DocDataSourceProviderSrsReporting class leaves the original SSRS datasource untouched, that is why our replica template doesn’t recognize the structures coming out of the DocDataSourceProviderSrsReporting class and you don’t get the expected result.
  • Our recommendation is to customize our replica report-specific DSP class (when it exists), in this case, DocSalesInvoiceReportDSP. That will allow you to use our replica template for the invoice as a starting point for the customization, instead of starting from scratch. Not only that there won’t be a need for customizing the standard D365 artefacts, but adding the custom fields “in a Docentric way” is much more elegant with less overhead (changes are done only in one class, instead of adding the custom fields to the temporary tables and customizing the DP class).
  • Different clients and partners of ours use different approaches in customizing our DSP classes, these are the typical ones:
    1. Overlayering – directly adding the custom code into our DSP class. That is perfectly fine because replica classes aren’t part of our D365FO product (and therefore aren’t subject to new product releases). You can rather think of them as complementary code snippets that we provide our customers with as a starting point, so from the moment you download them, they become your code. This approach is the simplest one, because it doesn’t require any extension techniques, but it does require that you put our replica model under the version control so that you handle the future replica model versions (there are new replica model releases when we create a new replica or fix some bug, or support some changes in the newer platform versions). We sometimes see this approach when end-client (for Docentric that would be OrbitOnline) has its own development.
    2. Copying our DSP class into a new one with a different name, which is maintained in a separate model, and directly modifying that class.
    3. Cleanest, recommended by us, and mostly used by implementation partners: in a separate model create just an extension of our report-specific DSP class and implement customizations such as adding new fields in the extension by using CoC.

I would suggest that you connect us to your developer so that we can give him a short technical training of “the Docentric approach” to adding the custom fields and answer any additional questions that he or she may have.

Thank you for such a quick and excellent response! We will get signed up for the technical training for sure.

Question – what do we need to have in place for the technical training? Do we need Visual Studio connected to our D365 environment, or something like that?

During the evaluation phase, we want to ensure that you have all the necessary information and knowledge to conduct the evaluation in a way that allows you to make an informed decision that is best for your organisation.

Do you have in-house development or rely on your implementation partner? If you plan to do the customizations discussed earlier in-house, you will need a Visual Studio on your DEV environment.

The technical training is done as a demonstration for which you make a recording and have time later to repeat the steps at your own pace.