Issue when using "Creating quotes for opportunities" Add-on from Marketplace

Hi, 

We noticed a bug relating to the add-on https://marketplace.creatio.com/template/creating-quotes-opportunities

on Creatio version 7.18.2 (can be reproduced on Demo Sales Entreprise 7.18.2, for ex).

 

When we add/update/delete a product in a Quote record, it creates an empty Opportunity record in Opportunity section.

 

I guess that it might be linked to the fact that the same object OpportunityProductInterest is used for the list of products in Opportunities and in Quotes sections. 

And there are the processes in OpportunityProductInterest object triggered upon add/update/delete .



Please note that the error didn't occure on version 7.17.1.

I can see that the object OpportunityProductInterest was modified on 2.2.2021 in Opportunity package so probably the error occures since this update.

Would it be possible for a support of DevLabs to check this issue?

 

Thank you,

Best regards,

Anna

Like 1

Like

4 comments

Hi Anna,

 

I managed to reproduce this issue and forwarded it to the relevant team for further review. We will contact you if we have feedback.

We are also experiencing this problem in CRM bundle 7.18 in .net core setup. Is there any solution or workaround present for this issue?

Hi Ivan Leontiev,

 

Are there any update from the team regarding the issue or  any workaround suggested from the team.

Hi, everyone!

We are working on this issue.

We will resolve it in the new version, however it will be incompatible with the current version. 

Also, we have a workaround for the old version:

1. Create a replacing object for OpportunityProductInterest.

 



 

2. Save it.

3. Click "Open Process"

4. Replace code in the "methods" section with this:

 





 

namespace Terrasoft.Configuration
{
 
                using DataContract = Terrasoft.Nui.ServiceModel.DataContract;
                using Newtonsoft.Json;
                using Newtonsoft.Json.Linq;
                using System;
                using System.Collections.Generic;
                using System.Collections.ObjectModel;
                using System.Data;
                using System.Drawing;
                using System.Globalization;
                using System.IO;
                using System.Linq;
                using Terrasoft.Common;
                using Terrasoft.Common.Json;
                using Terrasoft.Core;
                using Terrasoft.Core.Configuration;
                using Terrasoft.Core.DB;
                using Terrasoft.Core.DcmProcess;
                using Terrasoft.Core.Entities;
                using Terrasoft.Core.Factories;
                using Terrasoft.Core.Process;
                using Terrasoft.Core.Process.Configuration;
                using Terrasoft.GlobalSearch.Indexing;
                using Terrasoft.UI.WebControls.Controls;
                using Terrasoft.UI.WebControls.Utilities.Json.Converters;
 
                #region Class: OpportunityProductInterest_CustomEventsProcess
 
                public partial class OpportunityProductInterest_CustomEventsProcess<TEntity>
                {
 
                                #region Methods: Public
 
                                public override void CalckOpportunityAmount(Guid opportunityId) {
                                                if (opportunityId != Guid.Empty) {
                                                                var select = new Select(UserConnection)
                                                                                .Column(Func.Sum("Amount")).As("Amount")
                                                                                .From("OpportunityProductInterest")
                                                                               .Where("OpportunityId").IsEqual(Column.Parameter(opportunityId)) as Select;
                                                                double amount = 0;
                                                                select.ExecuteReader((reader => {
                                                                                amount = reader.GetColumnValue<double>("Amount");
                                                                }));
                                                                var opportunity = UserConnection.EntitySchemaManager.GetInstanceByName("Opportunity")
                                                                                .CreateEntity(UserConnection);
                                                                opportunity.FetchFromDB(opportunityId);
                                                                opportunity.SetColumnValue("Amount", amount);
                                                                opportunity.Save(false);
                                                }
 
                                }
 
                                #endregion
 
                }
 
                #endregion
}





5. Save and publish the process.

Note that this solution will take effect on basic logic for Opportunity

Show all comments