Hello!

 

I want to add a pop-up whenever a process starts. For example, I have a process that deleted an opportunity. This will open another process. Through code, I want the pop-up to appear when that second process starts or ends.

 

Does anybody know how I can do this?

 

Thank you!

Like 0

Like

3 comments

Dear Diana,

 

Thanks for your question.

 

 

To have a pop-up windows element in business processes you can use the following marketplace solution: 

https://marketplace.creatio.com/template/popup-element-business-process…

 

Hope this recommendation is helpful to you!

 

Best regards,

Anastasiia

Hi!

 

This add-on doesn't work, that's why I want to add the pop-up through code

Ghiu Diana Stefania,

 

You can refer the following article to understand the logic of how to send websocket message from a process script task and receive the message on the client side.

 

Add message publication logic through WebSocket

 

Hope this helps.

 

Regards,

Sourav

 

Show all comments

Hi!

 

Does anybody know how I can create a function, in Lead Page for example, that will start a process?

 

Thank you!

Like 0

Like

3 comments

Hello,

 

Can you please give us more details on what logic exactly you are trying to achieve?

 

Best regards,

Mira

Mira Dmitruk,

Hi!

 

I created a custom button on the Lead page. In the Lead I had a process that runs manually when pressing the "Run Process" button. I want to move this process to start when clicking my custom button.

 

I tried to use this but it doesn't do anything:

 

onOpenGroupSearchClick: function() {
                //this.showInformationDialog();
                
                var args = {
                    // The name of the process that needs to be launched.
                    sysProcessName: "LeadGroupSearch"
                };
                // Launch of the custom business process.
                ProcessModuleUtilities.executeProcess(args);
            },

 

But clicking the button works. You can see that I added a pop-up and it appears. The problem is that the process doesn't start.

 

In the "Run Process" I have to start the process when the LeadId is read. Should I add this to the code?

 

Thank you!

Ghiu Diana Stefania,

This article shows how to start a process from client-side code: 

https://customerfx.com/article/programmatically-starting-a-process-from…

Ryan

Show all comments

Hello!

 

I have a process that needs to check the value of a field. If the value is correct, another field will be unlocked, if it is not, a popup will appear.

 

The problem is that sometimes the pop-up appears before the page gets refreshed. I have the "Refresh active page" add-on inserted in the process that updates that field.

 

I think sometimes the pop-up is quicker than the refresh. The pop-up has been implemented by code. 

 

Thank you!

Like 0

Like

1 comments
Best reply

Hello Diana,

 

As a suggestion you can add a timer after the "Refresh active page" element, and set it to two seconds for example.

This way you could ensure that the element is completly executed in the background and only then the pop-up is displayed.

 

 

This add-on was developed by a third party, so if you would like to receive assistance regarding how does it work in detail, please contact  info@solutionsmetrix.com . Unfortunately we can not ensure how will behave the business process with third party custom developments.

 

Best regards,

Dariy

Hello Diana,

 

As a suggestion you can add a timer after the "Refresh active page" element, and set it to two seconds for example.

This way you could ensure that the element is completly executed in the background and only then the pop-up is displayed.

 

 

This add-on was developed by a third party, so if you would like to receive assistance regarding how does it work in detail, please contact  info@solutionsmetrix.com . Unfortunately we can not ensure how will behave the business process with third party custom developments.

 

Best regards,

Dariy

Show all comments
Question

Hi! I wanted to hide a process button and I found a code that could work but I am not sure where to put the name of my button.

 

This is the code: 

 

define("ContactSectionV2", [],
    function() {
    return {
        entitySchemaName: "Contact",
        attributes: {

            "ButtonVisible": {
                "dataValueType": Terrasoft.DataValueType.BOOLEAN,
                "type": Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,
                "value": true
            }
        },
        messages: {},
        methods: {
             onCardRendered: function() {
                 this.callParent();
                 this.set("ButtonVisible", false);
             }
        },
        diff: /**SCHEMA_DIFF*/[
            {
                "operation": "insert",
                "parentName": "ActionButtonsContainer",
                "propertyName": "items",
                "name": "MainContactSectionButton",
                "values": {
                    itemType: Terrasoft.ViewItemType.BUTTON,
                    caption: { bindTo: "Resources.Strings.TestButton" },
                    "visible": {bindTo: "ButtonVisible"},
                    "layout": {
                        "column": 1,
                        "row": 6,
                        "colSpan": 1
                    }
                }
            }
        ]/**SCHEMA_DIFF*/
    };
});

 

Thank you!

Like 0

Like

9 comments

Hi,

I don't really understand what you mean by putting the name of the button, but, if you want to hide you need to find it in the diff section of the page where your button is located and add to it a parameter "visible", as shown on your code.

This parameter is bound to a method "ButtonVisible" and in it, you can return true or false based on the needed condition.

Dmytro Vovchenko,

Thank you! You're right. But I have one problem, I can't find my button in diff. It is a run process button. I searched for this type of button in other sections also, but I can't find it there also. I don't know if process buttons are made differently.

In that case, can you please show the button you are talking about?

 

This one: (Run process)

Ghiu Diana Stefania,

With this button you can simply add to diff of the needed page this statement:

			{
				"operation": "merge",
				"name": "ProcessButton",
				"values": {
					"visible": false
				}
			},

Or instead:

"visible": {bindTo: "ButtonVisible"},

Small remark, this button is not your average one, so probably the best way is to bind the visible parameter to a method. In this method return true or false based on your condition.

It still doesn't work

Try opening your record page and refresh it with F5, I bet that the button will disappear. As I said, this button is pretty special. First of all, its realization is buried somewhere in the base page logic and if it is displayed on any section then it will be shown on both section and record pages. When you are opening the record page from the section than the system will remember some aspects from the section page, which includes the values of this button. In that case, try adding the same diff to the section page as well. Also, this button will disappear by itself if you don't have any business-processes attached to the section.

Dmytro Vovchenko,

I made it work to hide it but I need to put a condition also.  If I put it in methods it does nothing. I can only make the button visible or invisible. Do you have any idea?

 

As I said, you need to bind the parameter "visible" to a method and in that method write a condition that will return true or false.

"visible": { bindTo: "isVisible" }

 

isVisible: function() {
             if ( ---- )  

                     return true;

             return false;
}

Note, this must be present on both pages.

If this won't work, then I believe with the current logic of this button it would be impossible to hide it with your conditions (or this task will require a lot of modifications of base logic, and I'm not sure it is worth it)

Show all comments

Hello community,

 

I need to filter a detail grid in order to show only a specific type of object.
To be more precise: the detail CI Users displays Contacts and Accounts...

Has anybody done anything similar and could you provide me with a code sample?

 

Thank you in advance, have a nice day

Like 0

Like

3 comments
Best reply

If you'd like to filter out the record, rather than just hide them, you can filter the detail using a filter method. I have outlined how to do that here: https://customerfx.com/article/filtering-a-detail-list-in-creatio-forme…

Ryan

Solved like this: 

methods: {
			prepareResponseCollectionItem: function(item) {
				var account = item.$Account && item.$Account.value; 
				debugger;
				if(account){
					item.customStyle = {
						"display":"none"
					}
				}
			}
		},

 

If you'd like to filter out the record, rather than just hide them, you can filter the detail using a filter method. I have outlined how to do that here: https://customerfx.com/article/filtering-a-detail-list-in-creatio-forme…

Ryan

Thank you Ryan!

Show all comments

Hi community !

 

I wanted to implement an auto-incrementing "Code" field for the "Opportunity" section. I managed to do so following the documentation (https://academy.creatio.com/documents/technic-sdk/7-16/how-add-auto-num…). I just have a problem that I can't solve right now, everything works but when the Client create a new opportunity and then cancels it (clicks on the button "Cancel" and tries to add a new opportunity again, the auto-incrementation is done but I don't want so. I want that the Code increments only if the opportunity related to the previous code already exists in the "Opportunity" section.

 

Here is my actual code :

 

 

Hope my explaniations are clear enough !

 

Thanks for your help :)

Like 0

Like

6 comments
Best reply

Hello Jonathan,

 

About the questions related to the  "Numerator for Creatio" add-on it's better to contact the responsible support team (their support team's mailbox: support@samarasoft.com).

 

And coming back to the previous quesion on how to move the auto-numbering logic the object level: for that you can try to create an event in the needed object which will be saved according to your configurations, for example, it's event of saving the record. For that you need to go to Advanced settings and find the needed object, then open it and go to the "Events" item and add the needed event there:

 

In your task it should be "After Record Saved" (OpportunitySaved). Than you need to save changes (click "Save" button) and in the same object click the "Open Process" item (on the top bar). After the process designer will be opened you will be able to create a process which will be triggered by the newly created event (in our example, when the Opportunity record will be saved). For that you need to add the "Event sub-process" element and set Message as OpportunitySaved (your event).

 

 

Once it's done you can add the script task/code which is responsible for  auto-incrementing logic:

 

 

So after that, the object process  will be triggered every time after the Opportunity record was saved and your custom code will assign the needed number to that record. 

 

More useful infromation can be found in our Academy in the links below:

Kind regards,

Roman

Hello Jonathan,

 

Hope you're doing well.

 

For the task, you have described the auto-numbering logic should be moved to the object level, so the user will receive the appropriate number after saving that record. First of all, you can try to replace the method in JS responsible for auto-numbering entries on the page. Also as an option, there can be created the SQL trigger for new records.

 

Additionally, for your business task, you can try to use the "Numerator for Creatio" add-on. Using this addon the system will form the number automatically according to your own preferences and settings.

 

Best regards,

Roman

Roman Rak,

 

Thanks a lot for your answer.

How could I change the auto-numbering logic to be moved to the object level so that the user will receive the appropriate number only after saving that record and not when creating a new record ? 

 

I'm new to the dev side in Creatio, sorry for that. In a normal code situation, I could just compare if the UsrCode already exists in my opportunites and if it already exists I don't increment the UsrCode. But how to do that with objects in Creatio ? An example could be really useful. 

 

Why would I need to replace the method in JS for auto-numbering entries on the page ? Why could it be useful in my case ?

 

I basically only need to add the Code number and increment it only if the user saves the record, otherwise I don't want to increment it. Isn't there a method like "this.isAddMode" for the "Cancel" button ? (like if(this.cancel) { do something } or, with the same logic, this.save ?

 

If you have a coding solution with some examples to help me out I would be grateful :)

 

Thanks !

Jonathan,

 

Thank you for your reply.

 

Please check the following Community posts it might cover your questions:

Also, please try to use this  "Numerator for Creatio" add-on, and in case it doesn't fit your business task requirements, don't hesitate to contact us.

 

Best regards,
Roman

Roman Rak,

 

I'm trying to use the "Numerator for Creatio" add-on and it is really great ! However I encounter the same problem as before, when a user cancels the opportunity it continues to increment the number.

 

Furthermore, if you look at this screenshot :

I want that my text field "SOT-" to be static, but my "Sequence number" field to be dynamic and it must auto-increment every time a user saves the opportunity. Furthermore, why does the sequence number start at "00012" and not "00000" ? Any suggestion ?

 

Thanks really a lot for the help you are providing ! :)

Hello Jonathan,

 

About the questions related to the  "Numerator for Creatio" add-on it's better to contact the responsible support team (their support team's mailbox: support@samarasoft.com).

 

And coming back to the previous quesion on how to move the auto-numbering logic the object level: for that you can try to create an event in the needed object which will be saved according to your configurations, for example, it's event of saving the record. For that you need to go to Advanced settings and find the needed object, then open it and go to the "Events" item and add the needed event there:

 

In your task it should be "After Record Saved" (OpportunitySaved). Than you need to save changes (click "Save" button) and in the same object click the "Open Process" item (on the top bar). After the process designer will be opened you will be able to create a process which will be triggered by the newly created event (in our example, when the Opportunity record will be saved). For that you need to add the "Event sub-process" element and set Message as OpportunitySaved (your event).

 

 

Once it's done you can add the script task/code which is responsible for  auto-incrementing logic:

 

 

So after that, the object process  will be triggered every time after the Opportunity record was saved and your custom code will assign the needed number to that record. 

 

More useful infromation can be found in our Academy in the links below:

Kind regards,

Roman

Roman Rak,

 

You reply is just awesome. Really. It will help me with more than a problem for the implementation of future things ! It's really smart to do a sub-process with a script so that the script is triggered only when a certain action is done.

 

Last question, in the script code task, how could I implement the same logic ? I can't get the value of the "UsrCode" field for instance or I can't use the this.getIncrementCode method because i'm not overriding the Terrasoft.BasePageV2 getIncrementCode method. I can't add a field to read the data too to get my UsrCode. How can I get all these values to implement my auto-incrementation logic ?

 

Thanks a lot for your advices !

Show all comments

Hi,

 

I have a business process where I need to read the read element values in a script task.

When the read element is set to "read a collection of records" I'm using the following code:

var AccountsData = Get<ICompositeObjectList<ICompositeObject>>("ReadDataUserTask12.ResultCompositeObjectList");
var AccountData = AccountsData.First();

var AccountAddress="";
AccountData.TryGetValue<string>("Address", out AccountAddress);

 

What change do I need to do when the read element is set to "read the first record"?

 

Thanks,

Raz

 

 

Like 0

Like

3 comments

 

 

 

 

 

 

 

 

string name = string.Empty;
string email = string.Empty;
Guid RecordId = Guid.Empty;
 
/**
 * This approach should not be used in production
 * Please create process parameters and set values with standard tools (i.e. Formula)
 * ReadDataUserTask1 is the Code of "Read One Contact" element
 */
var re = context.Process.FindFlowElementByName("ReadDataUserTask1").GetPropertyValue("ResultEntity");
 
if (re.TryGetPropertyValue("Email", out object _email))
{
	email = _email.ToString();
}
 
if (re.TryGetPropertyValue("Name", out object _name))
{
	name = _name.ToString();
}
 
if (re.TryGetPropertyValue("Id", out object _id))
{
	if(Guid.TryParse(_id.ToString(), out Guid Id))
	{
		RecordId = Id;
	}
}
 
//Set values to process parameters
Set&lt;string&gt;("Name", name);
Set&lt;string&gt;("Email", email);
Set&lt;Guid&gt;("RecordId", RecordId);
 
return true;

 

 

 

Kirill Krylov CPA,

Hi Kirill,

 

I don't understand you code.

So if shouldn't use this code in production.

 

what should I do?

 

I don't manage to get the values from ResultEntry.

 

Thanks,

Raz

Kirill Krylov CPA,

Your code is exactly what I need if I don't want to use "get a set of records" and if I don't what to use the "Formula" process element.

Why not to use it in production?

Show all comments

Hi,

I'm looking for an example code of using the aspose pdf libraries inside creatio's code.

Thanks,

Raz

Like 0

Like

10 comments

Are we talking about this Marketplace add-on? https://marketplace.creatio.com/app/asposepdf-connector-creatio

 

Did you read the Installation > Guides and manualsRead Manuals on the marketplace page?

1. Register at Aspose.PDF service (https://products.aspose.cloud/pdf/net), add an application (My Apps> Add an App), get access keys (Client Secret, Client ID).

2. Fill in the system settings "Aspose API Access Key" (= Client Secret) and "Aspose Security Identifier (App SID)" (= Client ID) with the data from item 1, respectively. Logout and login to the Creatio app again.

3. Go to System Designer > Lookups > the ‘Printables’ lookup, select the printable, and open the printable setup page, select the ‘Convert to PDF’ checkbox and save changes. Note that the ‘Convert to PDF’ checkbox is available only on the printable setup page in the new UI.

4. The add-on shows an error message if a printable conversion fails on the Aspose side (Aspose service is unavailable, service access is not paid, etc.). Detailed error description is available in the browser console.

What sort of code do you need?

Julius,

Hi Julius,

 

Yes, I'm taking about this addon.

The thing is that this connector only allows me to create a pdf document.

I want to merge 2 pdf documents to 1.

So I thought about using the aspose cloud API SDK for .Net.

 

I've read in the academy that I can include external libraries, so I've been thinking using aspose libraries to do so.

 

So my question is related to the usage of aspose API SDK Libraries in creatio.

 

Raz

Hi Raz,

 

You can find an example of the Aspose API library call from Creatio in the 'AsposeCloud' package. Additional information on Aspose API SDK is available here - https://products.aspose.cloud/pdf/net.

 

Hope it helps.

Svetlana Kobizka,

Hi Svetlana,

 

Thank you very much for the reply.

I managed to find the AsposeCloud :)

 

The thing is that when I download the Apospe dll the libraries are different.

 

I need to use the service to merge documents, but it's not working.

 

I attached the code and the library that I'm using.

 

I appreciate if you could assist me

 

https://www.dropbox.com/s/2lplgni2wsi5piy/Aspose.PDF.dll?dl=0

 

This is the code

PdfApi api = new PdfApi("11d276990520041f6cda09531e25aabb", "9568f0a0-cf77-4836-97d2-fd1389338080");

 

Hi Raz,

 

The responsible team checked that the Aspose connector uses Aspose.Words.Cloud.Sdk.dll, which does not include the method that you need. You can find the description of the .Pages.Add() method that you need here: https://docs.aspose.com/pdf/net/merge-pdf-documents. Please install the required library and follow the Aspose official guidelines.

 

We have asked the team about possible development assistance, unfortunately, they cannot assist.

Why don't you just make an extra printable template for this purpose?
A printable template which includes all the pages you need

Julius,

What do you mean by "extra printable"?

I need the two printables merged together in the same document.

Alexander Demidov,

Hi,

 

Thank you very much for the detailed answer.

All the documentation that I've found about merging files through the Aspose Words Cloud eventually needs a directory to put the file.

Or in the other way a filestream to create the file from and I can't do that, because my creatio  application is a cloud base.

Am I missing something?

Hi Raz,

 

I have forwarded your question to the relevant team. We will get back to you once we have more information.

Show all comments