Hi Team,

I am passing a message from business process via script task and receiving the same in the edit page. On receiving, I am displaying a pop up message. Though it is working functionally, I am getting error attached. I have also attached script task and message receiving code.

I am able to capture the message ("PreviewEmail") and getting the pop up as well. However, I am getting the error in console after this. kindly help me on this regard.

Thanks,

Gokul

Guid CurrentUserId = Get<Guid>("CurrentUserId");
string sender = "PreviewEmail";
// Example for message
//string message = "Please check email preview to approve the lead.";
string message = JsonConvert.SerializeObject(new {
    RecordId = Guid.NewGuid(), // your record Id
    Name = "Please confirm the email template to approve the lead"
    // some other parameters
});
 
// For specific user with sysAdminUnitId
IMsgChannel channel = MsgChannelManager.Instance.FindItemByUId(CurrentUserId);
if (channel != null) {
    var simpleMessage = new SimpleMessage() {
        Id = CurrentUserId,
        Body = message,
        Header = {
            Sender = sender
        }
    };
    channel.PostMessage(simpleMessage);
}
 
 
return true;
onMessageReceived: function(sender, message) {
	try
	{
 
 
		if (message && message.Header && message.Body) {
 
			if (message.Header.Sender === "UpdateLeadSection") {
				var result = this.Ext.decode(message.Body);
				if(this.get("Id") === result.RecordId)
					this.reloadEntity();
			}
 
			if(message.Header.Sender === "PreviewEmail")
			{
				this.log("received message");
				var resultMsg = this.Ext.decode(message.Body);
				this.showInformationDialog(resultMsg.Name);
 
			}	
 
		}
	}catch(e)	
	{this.log(e);}
 
 
},

Like 0

Like

1 comments

Hi Gokul,

 

There is an easier approach for the message to be sent to the current user. In your case you receive undefined as a message and as a result you receive a JSON decode error (the client-side logic tries to deserialize an undefined object). Please use the approach below:

 

1) Business process script-task:

string sender = "PreviewEmail";
string message = JsonConvert.SerializeObject(new {
    RecordId = Guid.NewGuid(),
    Name = "Please confirm the email template to approve the lead"
});
MsgChannelUtilities.PostMessage(UserConnection, sender, message);
return true;

add the following usings to the process:

Terrasoft.Configuration;
Terrasoft.Messaging.Common;
Newtonsoft.Json

2) Create a replacing view module for the ClientMessageBridge module with the following code:

 define("ClientMessageBridge", ["ConfigurationConstants"],
    function(ConfigurationConstants) {
        return {
            messages: {
                "PreviewEmail": {
                    "mode": Terrasoft.MessageMode.BROADCAST,
                    "direction": Terrasoft.MessageDirectionType.PUBLISH
                }
            },
            methods: {
                init: function() {
                    this.callParent(arguments);
                    this.addMessageConfig({
                        sender: "PreviewEmail",
                        messageName: "PreviewEmail"
                    });
                }
            }
        };
    });

3) In the replaced schema of the edit page add the following code:

messages:{
			"PreviewEmail": {
				"mode": Terrasoft.MessageMode.BROADCAST,
				"direction": Terrasoft.MessageDirectionType.SUBSCRIBE
			}
		},
		methods: {
			init: function() {
                    this.callParent(arguments);
                    this.sandbox.subscribe("PreviewEmail", this.onMessageReceived, this);
                },
			onMessageReceived: function(sender) {
				if(sender.Header.Sender === "PreviewEmail"){
					this.log("received message");
					var resultMsg = sender.Name;
					this.showInformationDialog(resultMsg);
				}
			},
		},

As a result the message will be successfully posted via WebSockets:

it will be correctly processed by the onMessageReceived method and there won't be console errors:

and the popup will appear:

The general recommendation is: please debug the logic when you receive something that is not expected.

 

Best regards,

Oscar

Show all comments

Hello Team, 

Any ones know if we can add details in to a section (BaseSectionPageV2)?

Like 0

Like

1 comments

Hello Federico,

Unfortunately, you can't add details into a section BaseSectionPageV2, due to the basic logic of the application.

Best regards,
Bogdan

Show all comments

Hi all, 

Does any idea how it would be possible to hide past colleagues from the owners list when filtering on opportunites ?

(version 17.18.2)

Like 0

Like

3 comments

Dear Damien,

 

Thank you for your question!

The best way to accomplish the [Hide] option is to use certain Business Rules.

 

You may find more on this here:

https://academy.creatio.com/docs/user/no-code_customization/ui_and_busi…

 

Hope this helps!

 

Thank you!

 

Danyil

Hi,

@Danyil :  Thanks for helping out :)

What I mean is that it is showing all users of the system - active and non active licences on the opportunity list - not on the page of a specific opportunity - how do I filter those to a specific group "active" group - such as sales people for example, so that we do not get our marketing or operations or non-active people showing up ?

 

Am I not mistaken that business rules work on the individual opportunity page itself, not the section ?

 

Damien Collot,

 

Hello,

 

This logic of filtration is specified in the filters property of the lookupListConfig of the "Owner" attribute on the BaseOpportunityPage:

So in case you need to modify this filter you need to either replace the OpportunityPageV2 in the Custom package (and specify this attribute in the replaced schema) and specify new filtration for the attribute or you can override  getOwnerFilter method from the PartnersOwnerMixin and add additional filtration by disabled\enabled system user. Here is also an example of the filtration based on the attribute value: https://community.creatio.com/questions/lookup-filtering-distinct-values

 

Best regards,

Oscar

Show all comments

Hi All,

 

We are doing a feasibility study to export Products that were linked with Lead. As per current available feature, we could get the Products count that were added to a Lead but we are looking for the products list for each Lead exported to excel. 

Appreciate your valuable input.

 

Thanks

Anupama

Like 0

Like

4 comments

Hi Anupama, 

 

As far as I understand you need to export a list of leads with a list of products for each lead there as well all in one file? Or do you just need to export a list of products for one particular lead?

 

Best regards,

Max.

Hi Max,

 

Thanks for the reply. 

 

Yes the first one is what we are looking for. Export a list of leads with a list of products for each lead and all in one file.

 

Thanks

Anupama

Anupama,

Unfortunately, Creatio does not provide such functionality. However, you can install SQL Executor for Creatio (SQL scripts console) from the marketplace. There you can write SQL requests to the database and then save the results as a CSV file. It will require some basic SQL knowledge.

 

The request would look something like this for the Orders with products:

 

SELECT * from "Order" JOIN "OrderProduct" ON "Order"."Id" = "OrderProduct"."OrderId"

 

You can choose which columns to select, and how to join the tables. 

 

Best regards,

Max.

Max,

We wanted this feature as a functionality for client where as an end user at specific time interval, they could generate the products list by exporting from Lead.

Show all comments

Hi team,

I'm using this app https://marketplace.creatio.com/app/excel-reports-builder-creatio for generating Excel reports, but since recent update to 7.18.1. "Upload template"  function stopped working. When I click on the button and select an Excel with formatting as a template nothing happens.

Could you please check it fo me?

Like 0

Like

4 comments

Hi Alex,

 

I have uploaded the report template to the trial version of Creatio 7.18.1 successfully. We recommend installing the up-to-date package from Creatio Marketplace and checking the updates.

Hi Ivan,

thank you for your reply. I'm sure we have up-to-date version of the app, because on the marketplace it says "Date last updated: 27.10.2020" and we installed it after this date. 

I've also tried to install the latest version from the marketplace to the instance on 7.18.1 where I have the issue and it has not helped to solve it. 

This is what I see in JS console when I try to upload a template https://prnt.sc/1j24jwx

Any suggestions?

Kind regards,

Alex

Hi Alex,

 

The responsible team fixed the issue in March 2021 and published the updated package in April 2021.

 

After the latest version is installed, please make sure that the Date last updated in the [Installed applications] section is '15/04/2021'. In addition, we recommend that you log out and log back into the Creatio application to apply the changes.

Have you uploaded a new version to the marketplace today? https://prnt.sc/1jh4lqe

Show all comments

Hi Guys,

 

I have a customer who had the map widget for Creatio installed.

They uninstalled it and re-installed the application, but now, when creating a dashboard, they do no longer have the map option.

 

The installation did not give any error messages.

The environment has been compiled.

 

Customer has Dutch (NL) environment, it all worked before they've uninstalled it and re-installed it.

 

Anything I can try?

 

Like 0

Like

5 comments

Hi Davey,
Please specify the Creatio product and version so that we can reproduce the issue. 

Alexander Demidov,

Hi Aleksandr,

Thank you for looking into this.

 

Sales Creatio Team edition

Version: 7.18.1.2800

 

To be clear, it worked, got un-installed, re-installed and stopped working.

Hello Davey,

 

 

The add-on uses the 'BootstrapModulesV2' module. Another base replacement of this module was added in versions 7.18.1 and later.

 

I have forwarded the issue to the relevant team for further review. I will keep you updated. 

Ivan Leontiev,

Any update or work arounds for this to work in current Creatio versions? 

Thanks,

Ryan

Looks like it was the Playbook that broke this, since it also creates a BootstrapModulesV2. As a workaround to get this to work, for now, you can create a new replacing view module for BootstrapModulesV2 (in Custom package, or any package that is further down in the dependencies than Playbook and the BpmCharts packages) with the following code added (*this adds what is in the maps package as well as what is in the Playbook package)

define("BootstrapModulesV2", ["DashboardMapEnums", "DashboardDesignerViewModelOverride", "PlaybookMiniPageContainerViewModel"], function() {
	return {};
});

Then maps and Playbook will both work. However, it would be great for Playbook to change and no longer use a BootstrapModulesV2 override if possible.

Ryan

Show all comments

Hi Team,

 

We have renamed Activities section to Interaction Logs and also configured fields using mobile application wizard under Main workplace. But when we install the package in cloud instances, the Activities section is not getting replaced with the fields that are configured in local. I have bound the "Main workplace" in SysMobileWorkplace once again with force update on Name.
I would like to know about binding the sections within the Main workplace in Mobile Workplace Setup.

Product and version : 7.17 - Sales Team Edition

Like 0

Like

3 comments

 

Hi DhariniS, 

The output of the section is stored in the mobile application manifest, therefore, if you transferred all the records about the section and the manifest, then the section in the mobile application will also be transferred.

 

Please check out the information about mobile application manifest:

 

https://academy.creatio.com/docs/developer/mobile_development/mobile_ap…

 

DATA BINDING NEW WORKPLACE:

 

https://community.creatio.com/questions/data-binding-new-workplace

Here are some guides of how to work and set up mobile application:

Set up mobile app workplaces : 

 

https://academy.creatio.com/docs/user/no-code_customization/mobile_app_…

 

Set up mobile application section list: 

 

https://academy.creatio.com/docs/user/no-code_customization/mobile_app_…

 

Set up mobile application section page:

 

https://academy.creatio.com/docs/user/no-code_customization/mobile_app_…

 

Best Regards, 

 

Bogdan L.

 

Bogdan Lesyk,

Thanks for the detailed reply Bogdan. We have transferred all the files related to mobile application and workplace. As we use the default workplace the 

MobileApplicationManifestDefaultWorkplace is getting transferred.

All sections and its page setup got transferred as part of the package except for "Interaction Logs" which is nothing but "Activities" section with some customizations. Is there a way we can data bind this?

DhariniS,

 

It seems not possible to bind just one section. Just import the package like you did before. If you are going to do it, please firstly make sure that you have this section on your dev/prod app, from which you import it.

 

Actually we performed some tests and most likely the problem in Manifest file.

 

Please check your MobileApplicationManifestDefaultWorkplace file in configurations and make sure that you don't have any comments here(because json doesn't like any comments).Make sure that you have "Interaction Logs" instead of  my "Activity" here. Also please check if the attribute "Hidden" is false and you have the same json properties. Screen below: 

 

 

 

Also please check out the this link, here is manifest file with all needed properties which were created automatically in manifest json file. Please compare it to your manifest and you might find the error there:

 

https://privnote.com/NqERjrFa#YgxHVVEQp

 

Regards, 

 

Bogdan L. 

 

 

Show all comments

We have implemented custom section for opportunity similar to OOTB with DCM. The stage movement is restricted to few users as per acess rights. 

  1. The stage movement happens on click and should be allowed only when reason is provided which is captured as detail through pre-config page in business process
  2. if it s cancelled it is reverted back to previous stage.

(Business process is called when on change of value in DCM stage look up happens- through js code in edit page)

 

Right now it is allowing users without edit access to edit the DCM though insuffient permissions error shows up.


Can someone guide me implementing the same or suggest any alternate approach?

Also let us know if this stage  movement can de denied to other valid users unless the current user initiates movement and gives reason or cancels it.

 

Thanks,

Gokul

Like 0

Like

1 comments

Hello,

 

The users can update the record with the processes, even if they do not have rights to edit the record manually. This is longstanding logic. In your case it is better to add some some condition with code. The idea is the following - if the user has to modify the record (the condition is met) - the button becomes visible and user can update the record with the process. Else - the button is not visible on the page.

One more idea is to restrict process launch completely in the process properties. This feature is available in 7.18.0

 

Regards,

Dean

Show all comments

Hi,

I'm trying to run from a script task a postgres stored procedure, but the postgres database return an error "call" is missing,
What Am I doing wrong ?

bool retCode = false;
var userId = Get<Guid>("UtenteId");
var year = Get<int>("Anno");
 
var userConnection = Get<UserConnection>("UserConnection");
StoredProcedure storedProcedure = new StoredProcedure(userConnection, "SifLoadSurvey");
storedProcedure.WithParameter("Year", year);
storedProcedure.WithParameter("UserId", userId);
storedProcedure.InitializeParameters();
storedProcedure.PackageName = userConnection.DBEngine.SystemPackageName;
 
using (var dbExecutor = userConnection.EnsureDBConnection()) {
	try {
        dbExecutor.CommandTimeout = 0;
        dbExecutor.StartTransaction();
        storedProcedure.Execute(dbExecutor);
        dbExecutor.CommitTransaction();
        retCode = true;
    } catch(Exception ex) {
        dbExecutor.RollbackTransaction();
        retCode =  false;
    }
}
return retCode;

 

Like 0

Like

4 comments

Hi, 
I solved it by converting the postgres procedure in a function

Hi, Stefano!
Did you call postgres function in C# code as StoredProcedure?

Stefano Bassoli, did you call your postgres function as a StoredProcedure ?

Stefano Bassoli, 

did you call the postgres function as StoredProcedure ?

Show all comments

Dear Community,

I have tried adding new communication option under lookup "Communication option types". but I want it grouped under existing "Phone" type. Please help in implementing the same.

Thanks,

Gokul

Like 0

Like

3 comments

Dear Gokul, 

In order to add the new value to the group, please open the lookup  "Communication option types", open the new record you've added and add "Communication option" on the detail(see the screenshots below) 

As a result, your group will look like this. 

Best regards, 
Yurii. 
 

Thank you Yurii. Incase of databinding lookup to package, Is it enough if I data bind "Communication option types" alone? because addition in communication type is not reflecting. should I add it directly in respective instance?

Gokul, 
In order to export communication properly please bind both CommunicationType and ComTypebyCommunication.
As a result your communication options will be exported grouped by communication types. 

Best Regards,
Yurii. 

Show all comments