Время создания
Filters

Not able to get SAVE button in the pop-up window.

Like 0

Like

0 comments
Show all comments

Hamacher Resource Group, a leader in retail solutions, was challenged by their outdated CRM limiting sales visibility, forecasting, and operational efficiency. Needing a modern solution to manage their complex processes, HRG turned to Creatio's no-code platform—and the results have been extraordinary! 

 

Creatio, implemented by TechnoSystems, delivered a customized CRM that centralized data, automated sales processes, and provided real-time insights. With Creatio, HRG now enjoys: 

  • - Record-Breaking Sales: Highest numbers in company history 

  • - End-to-End Sales Visibility: Comprehensive pipeline tracking 

  • - Improved Collaboration: Seamless alignment across sales, marketing, and project management 

  •  

Creatio's no-code flexibility allowed HRG to tailor the platform precisely to their needs, revolutionizing how they operate and driving their growth. 

 

Learn from the winners – read the success story to see how HRG achieved these amazing results: https://www.creatio.com/page/hrg  

Like 13

Like

Share

0 comments
Show all comments

Hi Creatio Community,

I am working on extending the existing implementation of the Execute method in the web service designer, which is part of a base package in Creatio. My goal is to modify the method to add additional functionality: specifically, I want to save the web service response as a record using an EntitySchemaQuery (ESQ), so that the response can be displayed in a custom section inside Creatio.

However, I am encountering a compilation error:

Error:
cannot convert from 'System.Collections.Generic.IEnumerable<Terrasoft.Configuration.ServiceSchemaParameter>' to 'System.Collections.Generic.IEnumerable<Terrasoft.Configuration.ServiceSchema.ServiceSchemaParameter>'

It appears that the system is having difficulty converting between two types that have the same name but are possibly from different namespaces. I am using ServiceSchemaParameter in my custom implementation, but the IServiceSchemaClient.Execute() method is expecting the parameter to be of a slightly different type.

Here’s an overview of my approach:

  1. I've modified the Execute method to include an ESQ that logs the web service call and stores the response.
  2. The issue arises when passing the parameters (of type List<ServiceSchemaParameter>) to the Execute method, where it's expecting IEnumerable<ServiceSchema.ServiceSchemaParameter>.
  3. I believe the conflict is due to namespace ambiguity or mismatched types between base and custom implementations.

    My code: 
     
  4. namespace Terrasoft.Configuration
    {
     
     
        using System;
        using System.Linq;
        using System.Collections.Generic;
        using System.Runtime.Serialization;
        using System.ServiceModel;
        using System.ServiceModel.Web;
        using System.ServiceModel.Activation;
        using Terrasoft.Core.Factories;
        using Terrasoft.Services;
        using Terrasoft.Web.Common;
        using Terrasoft.Core;
        using Terrasoft.Core.Entities;
        using Terrasoft.Configuration.ServiceSchema;
     
    	#region Class: CallServiceSchemaService
     
    	[ServiceContract]
    	[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]
    	public class CallServiceSchemaService : BaseService
    	{
    		#region Methods: Public
     
    		[OperationContract]
    		[WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Wrapped,
    			ResponseFormat = WebMessageFormat.Json)]
    		public CallServiceSchemaResponse Execute(string serviceName, string methodName, List<ServiceSchemaParameter> parameters) {
    			if (parameters == null) {
    				parameters = new List<ServiceSchemaParameter>();
    			}
    			try {
    				UserConnection.DBSecurityEngine.CheckCanExecuteOperation("CanManageSolution");
     
    				// Getting the builder and client from the ClassFactory
    				var builder = ClassFactory.Get<IServiceSchemaParameterBuilder>();
    				var serviceSchemaClient = ClassFactory.Get<IServiceSchemaClient>();
     
    				// No need to cast, List<T> already implements IEnumerable<T>
    				var serviceResponse = serviceSchemaClient.Execute(UserConnection, serviceName, methodName, builder.Build(parameters.AsEnumerable()));
     
    				// Log the request and response
    				LogWebServiceCall(serviceName, methodName, parameters, serviceResponse);
     
    				return new CallServiceSchemaResponse(serviceResponse);
    			} catch (Exception e) {
    				return new CallServiceSchemaResponse(e);
    			}
    		}
     
    		#endregion
     
    		private void LogWebServiceCall(string serviceName, string methodName, List<ServiceSchemaParameter> parameters,
                IServiceClientResponse response = null, Exception error = null) {
                var entitySchema = UserConnection.EntitySchemaManager.GetInstanceByName("UsrWebServiceLog");
                var assignersEntity = entitySchema.CreateEntity(UserConnection);
                assignersEntity.SetDefColumnValues();
     
                assignersEntity.SetColumnValue("UsrServiceName", serviceName);
                assignersEntity.SetColumnValue("UsrMethodName", methodName);
                // Log additional columns if needed, as seen in your commented code
                assignersEntity.Save();
            }
     
    	}
     
    	#endregion
     
    	#region Class: CallServiceSchemaResponse
     
    	[DataContract(Name = "CallServiceSchemaResponse")]
    	public class CallServiceSchemaResponse : ConfigurationServiceResponse
    	{
    		#region Constructor: public
     
    		public CallServiceSchemaResponse(IServiceClientResponse serviceResponse) {
    			StatusCode = serviceResponse.StatusCode;
    			Success = serviceResponse.Success;
    			ResponseBody = serviceResponse.Body;
    			ResponseRawData = serviceResponse.RawDataResponse;
    			RequestBody = serviceResponse.RequestBody;
    			RequestRawData = serviceResponse.RawDataRequest;
    			ParameterValues = Newtonsoft.Json.JsonConvert.SerializeObject(serviceResponse.ParameterValues);
    		}
     
    		public CallServiceSchemaResponse(Exception e) : base(e) {}
     
    		#endregion
     
    		#region Properties: Public
     
    		[DataMember]
    		public int StatusCode;
     
    		[DataMember]
    		public string ParameterValues;
     
    		[DataMember]
    		public string RequestRawData;
     
    		[DataMember]
    		public string RequestBody;
     
    		[DataMember]
    		public string ResponseRawData;
     
    		[DataMember]
    		public string ResponseBody;
     
    		#endregion
    	}
     
    	#endregion
     
    	#region Class: ServiceSchemaParameter
     
    	[DataContract]
    	public class ServiceSchemaParameter
    	{
    		#region Properties: Internal
     
    		[DataMember(Name = "code")]
    		public string Code;
     
    		[DataMember(Name = "value")]
    		public object Value;
     
    		[DataMember(Name = "nested")]
    		public List<List<ServiceSchemaParameter>> NestedParameters;
     
    		#endregion
    	}
     
    	#endregion
    }

 

Request:
Could anyone guide me on how to properly resolve this type conversion issue? If there is a better way to manage the namespace or cast the types correctly, I would appreciate any advice or best practices to ensure compatibility between the types.

Thank you for your help!

Code Context:
CallServiceSchemaService.svc 
Service Designer Package

Looking forward to your suggestions and insights!

Like 0

Like

0 comments
Show all comments

I'm trying to create a case using fetch from the front end, and I wonder if it's possible to do this when important fields need to be filled in during creation. Would that pose a problem?

Like 0

Like

1 comments

Hi!

Creating a case using fetch from the front end is possible, but you need to ensure that all required fields are properly filled in during the creation process. If any important fields are missing or not correctly filled, it could result in errors or incomplete records.

Here are some steps to ensure a smooth process:
 

  1. Identify Required Fields: Determine which fields are mandatory for creating a case. This typically includes fields like case title, description, contact information, etc.
     
  2. Validate Input: Before sending the request, validate the input on the front end to ensure all required fields are filled out correctly.
     
  3. Construct the Fetch Request: Create a fetch request that includes all the necessary fields in the body of the request.
     
  4. Handle Responses: Implement error handling to manage any issues that arise if the case creation fails due to missing or incorrect information.

    Best regards,
    Anton
Show all comments

Hello. I need to create a QuickFilter on a Freedom UI Page whose value will change dynamically. I found a post https://customerfx.com/article/using-custom-attributes-on-a-creatio-fre… so I try to use the attribute but it does not work. Could you help me please?

{
    "filterType": 1,
    "comparisonType": 3,
    "isEnabled": true,
    "trimDateTimeParameterToDate": false,
    "leftExpression": {
        "expressionType": 0,
        "columnPath": "MyColumn"
    },
    "isAggregative": false,
    "dataValueType": 1,
    "rightExpression": {
        "expressionType": 2,
        "parameter": {
            "dataValueType": 1,
            "value": "$MyAttribute"
        }
    }
}
Like 0

Like

0 comments
Show all comments