Hello Community!

I am developing a functionality such as, a data grid within a detail, is populated when I Click a button. In the same time when I click the button I want to reload the grid data. Which is the proper syntax for the callback function in Creatio, because i havent seen many examples in the Community.

 
			onGenerateButtonClick: function(callback,scope)
			{
				var currentRecordId = this.get("MasterRecordId");
				var args = {
                    sysProcessName: "FZProcess_dc5a9de",
                    parameters: {
                        RecordId: currentRecordId,
						Amount: FZAmount,
						Interes: FZInteres,
						StartPaymentDate: FZStartPaymentDate,
						Tenor: FZTenor		
                    } 		
                }                
				this.reloadGridData();
                ProcessModuleUtilities.executeProcess(args);  
 
			}

I want to use this.reloadGridData(); inside a callback, after the   ProcessModuleUtilities.executeProcess(args) is finished , which is the proper way to do this ? 

Like 0

Like

6 comments
Best reply

Petrika,

In your case the button appears to be a part of the page schema, not a part of the detail schema. For you to refresh the detail you'd need to use:

this.updateDetail({ detail: "NameOfDetail" });

You can find the "NameOfDetail" value to use by looking at the details section of the page code for your detail (it's not the name of the detail schema, but the name or Id it gave it when it added it to the page). The reloadGridData function only works from within the detail schema code itself. 

Hello Petrika,

Calling this.reloadGridData() is the proper function to use to refresh the detail grid from within the detail schema itself. However, you do need to call after the process completes. 

I have an article here that shows how to use a callback when executing a process: https://customerfx.com/article/programmatically-starting-a-process-from…

If you put the call to reloadGridData inside the callback then it will refresh  when the process has completed.

Ryan

Ryan Farley,

Hello Ryan,

Firstly thanks for the quick reply, your posts are very useful, each time i have a developing problem in creatio.

In this case i saw the post before. I have try it. When I use the callback like the article the page only reloads and never stops, thats why i thought of another callback syntax.

Ryan Farley,

To be more specific

I have created this button Generate on the Main Page(parent). When this button is clicked , it calls a bussines Process, which on the other hand executes a Stored Procedure(populates dhe datagrid of the details).

onGeneratePrecalButtonClick: function()
			{
var currentRecordId = this.get("Id");
		var args = {                                                                  
		sysProcessName: "FZProcess_dc5a9de",
			parameters: {
				RecordId: currentRecordId,
				Amount: this.$FZAmount,
				Interes: this.$FZInteres,
				StartPaymentDate: this.$FZStartPaymentDate,
				Tenor: this.$FZTenor		
					}
				};
              ProcessModuleUtilities.executeProcess(args);  
}

When the Business Process finishes, i want to reload the grid data of the Details, so that I dont have to press the green Button below

How can this be done ?

 

Petrika,

 

Hello,

 

There are two possible ways:

 

1) Call this method after the executeProcess method call:

this.updateDetail({
 
                        detail: "DetailNameHere"
 
                    });

2) At the end of your business process execution you need to send some message using MsgChannelUtilities class and PostMessageToAll method, create a replacing ClientMessageBridge, add your message there, add the message to the page where the detail is located, subscribe to the message and specify a handler for the received message (a simple example is here). Once the message is received the handler should call the same updateDetail method as above.

 

Best regards.

Oscar

Petrika,

In your case the button appears to be a part of the page schema, not a part of the detail schema. For you to refresh the detail you'd need to use:

this.updateDetail({ detail: "NameOfDetail" });

You can find the "NameOfDetail" value to use by looking at the details section of the page code for your detail (it's not the name of the detail schema, but the name or Id it gave it when it added it to the page). The reloadGridData function only works from within the detail schema code itself. 

Thanks very much Oscar and Ryan ! Your help was great.

Show all comments

Hello all,

 

I am trying to display the relationship information within the newer connected to diagram as a list such as how the older detail used to be able to be used.

Is there a way to display the information as a list so that it can be easily viewed in a list and exported out to excel?

 

I have tried to create a list report based off the underlying object for the diagram but I have been unable to find the correct object to use.

Like 0

Like

1 comments

Hello Kevin,

 

Thank you for your question!

 

Unfortunately, the list view and export are not available in the new UI for "Connected to" diagram. We've already registered this idea in our R&D team backlog for consideration and implementation in future application releases. As an option, it's possible to disable the new UI for "Connected to" diagram and get back to the old one. However, the data inserted in the new UI will be lost while getting back to an old UI, same if you decide later to change the UI to the new one, changes applied in the old one - will not be saved. If you want this to be done, please reach out to us at support@creatio.com and we will disable UseRelationshipDesigner feature for you.

 

Kind regards,

Anastasiia

Show all comments

Hi community

I'm using the new relationship feature to connect accounts 

In the account's "connected to" tab, I setuped which is the parent account of current account.

I'm looking for a method for extract all accounts which have a parent account assigned, using advanced filter.

Missing the view to configure the filter on new tables?

 

Like 0

Like

4 comments

Hello, 

Thank you for your question. 

In order to get the wanted filter please choose the correct column called "Parent account". 

Please refer to the screenshot below: 

 

 

Thank you, 

Artem. 

Artem,

Hi Artem,

the parent account field does not work correctly with the new "Relation connection" table used for describe the account hierarchy,

Hello Stefano,

 

Sadly, filtering will not work in this case.

 

It is due to the fact that the "connected to" diagram was created to be universal, it does not have any proper connections to the other objects in the system. Thus, it can't be used for filtering records in objects.

 

Theoretically, you can create a view table in your system where needed columns from separate objects can be added and use it in the section's filter but we don't have any examples of such implementations.

 

We have already created a request for our R&D team to create such functionality.

 

Thank you,

Artem.

Hi,

I solved the problem.

I've created a view table, here my postgres script view

 

DROP VIEW
 
IF EXISTS "UsrAccountParentView";
    CREATE
        OR REPLACE VIEW "UsrAccountParentView" AS
 
SELECT uuid_generate_v4() AS "Id"
    , reA."RecordId" AS "UsrAccountParentId"
    , reB."RecordId" AS "UsrAccountChildId"
    , rc."RelationTypeId" as "UsrRelationTypeId"
    , '410006e1-ca4e-4502-a9ec-e54d922d2c00'::uuid AS "CreatedById"
    , timezone('utc', now()) AS "CreatedOn"
    , '410006e1-ca4e-4502-a9ec-e54d922d2c00'::uuid AS "ModifiedById"
    , timezone('utc', now()) AS "ModifiedOn"
FROM "RelationshipEntity" reA
JOIN "RelationshipConnection" rc
    ON reA."Id" = rc."RelationshipEntityAId"
        AND reA."SchemaUId" = '25d7c1ab-1de0-4501-b402-02e0e5a72d6e'
JOIN "RelationshipEntity" reB
    ON reB."Id" = rc."RelationshipEntityBId"
        AND reB."SchemaUId" = '25d7c1ab-1de0-4501-b402-02e0e5a72d6e'

 

Show all comments

Is there any way I can access a button instance directly, e.g., in the 'click' method of a client module in order to set the colour of the button using the setStyle method of the button object?

Like 0

Like

1 comments

Not sure if it's possible since setStyle only receives some value as an argument and is being executed when the button is initialized.

 

In your case I would recommend to add this code to the click handler:

var buttonElementToModify = document.getElementById("ContactPageV2ChangeContainerStateButtonButton-textEl");
				buttonElementToModify.style.backgroundColor = "Green";

and replace ContactPageV2ChangeContainerStateButtonButton-textEl with an actual id of the element in DOM:

As a result when the button is clicked its color will be changed to green.

 

Best regards,

Oscar

Show all comments

Hello Community,

 

It is possible to add the Activity section on Portal (Customer Portal license)?

Like 0

Like

2 comments

Hello Andreia,

 

No, it's not possible.

Thank you, Oscar.

Show all comments

Hi community,

 

I need a way to sort the rows of a data grid according to the values present in a detail.

 

I have my detail in the candidate object like this:

 

Here is a small simplified diagram of the relationship between my lookup, my detail and my object:

I would like to run this sql query to filter the candidates :

SELECT c.* FROM technocandidats tc
RIGHT JOIN candidats c ON c.id = tc.candidat_id
WHERE tc.techno_id = n OR
tc.techno_id = n OR ...

where "n" will be the techno's id.

 

Is there a way to do this directly in the section's advanced filters?

 

Or better still, in a box on top of the section like the one in my candidat object where the detail appears? Or even better, make that in a preconfigured page ?

 

Best regards,

 

Julien Gunther

Like 0

Like

1 comments

Hello Julien,

 

I believe this should be possible as you have the connections between your objects. Could you please contact Creatio support team using support@creatio.com so we can help you with the filter setup in your system?

 

Thank you,

Bogdan S.

Show all comments

Is it possible to add validation code to the client module of a pre-configured page (i.e. in the same way you would an edit page)?

Like 0

Like

1 comments

Hi Gareth, 

 

In this case, we are suggesting using Business processes for such implementation. 

 

https://academy.creatio.com/docs/7-17/user/bpm_tools/process_elements_r…

 

https://academy.creatio.com/docs/user/bpm_tools/dynamic_case_setup/case…

 

This element will generate the code itself and you don't need to change the Schema manually, which will be much complicated and could potentially affect the whole page.

 

Best Regards, 

 

Bogdan L.

 

 

 

Show all comments

Hi

Import Census is a section attachement object( which is system generated ) so we have a attachment link there but I have created one custom attachement object (Import Claims) and linked it with section but we need to have the same attachment icon to be present with the custom object as it is in Import Census object so that users can attach the files.

 

Please help me to achieve this.

Many Thanks!

Like 0

Like

6 comments

Hi Akshit,



Since you have already added Detail in Section. To add Custom style in the Detail, Please follow the below article. 

 

https://academy.creatio.com/docs/developer/interface_elements/detail/detail#title-1923-5 (Point #5)

 

In addition to this, Please ensure that Parent object of both detail schemas ( detail's view model & detail's record page ) should be FileDetailV2 .

Hi 

 

Functionality is working fine but the only issue is this "Drag File Here" is not showing as it is showing in section's attachment detail  (please see the below screenshot)

 

Note : Attach Censur  : Section's detail

           Attach Claims : Custom Attachment Detail

 

 

Please help.

 

Many Thanks.

 

Please help.

 

 

Hi Akshit,

 

Unfortunately, there can only be one drag'n'drop area on the edit page, so on one tab it will work, but on the second it does not.

We have passed this basic functionality flaw to the developer's department for product improvement. They will backlog such system behavior and will work on functionality improvement. 

 

 

As for now, this can be fixed by adding the follwing code to the edit page schema of the page where these details are added:



getDetailInfo: function() {

  var detailInfo = this.callParent(arguments);

  detailInfo.detailElementsPrefix = Terrasoft.generateGUID();

  return detailInfo;

}

 

Kind regards,

Anastasiia

Anastasiia Lazurenko,

 

Thank you for your reply.

 

I have used your code but nothing reflected it is still the same. 

Anastasiia Lazurenko,

 

Please suggest something so that I can remove "Drag File Here".

 

Show all comments

Hello,

 

 I have used the Portal Case Section Wizard to successfully create new tabs and custom fields in the Case Entity for Portal Users. I have also created a new custom detail based on creating a new object on one of these tabs.  What I am not clear on is how can I now get to the Detail Setup for this new custom detail? Normally of course we get there by going to an existing record and entering detail setup there, but this is not possible for a Portal User to do.  I looked in the Advanced Settings (DEV) page but the objects created don't seem to get me to the detail setup.  I also am curious how one then can setup the columns setup for all portal users for this detail one the page is created.  Any help would be most appreciated :)

 

Cheers,

-Scotty Chapman 

Like 0

Like

2 comments

Hello Scotty,



To modify the fields in the detail. Please follow the nest steps:



1. Open the page in the section wizard and click on the edit icon:

image.png

2. Click on the edit icon to open the detail wizard:

image.png

3. Chose the "page" tab to edit the field:

image.png

 

As for your second question, unfortunately, there is no such functionality in our system that allows saving column setup for all users.

 

Best regards,

Bogdan

Bogdan,

Hi  - thanks so much, that did the trick. Appreciated!

-Scotty Chapman 

Show all comments

Hello community, while installing ExcelReportBuilder on the production environment I get the following error:

2021-12-15 17:58:14,812 Terrasoft.Common.DbOperationException: 23503: insert or update on table "SysPackageDataLcz" violates foreign key constraint "FKfg1JPl35PDx2FCE8Oagxv7VAMIc" ---> Npgsql.PostgresException: 23503: insert or update on table "SysPackageDataLcz" violates foreign key constraint "FKfg1JPl35PDx2FCE8Oagxv7VAMIc"

   at Npgsql.NpgsqlConnector.d__157.MoveNext()

--- End of stack trace from previous location where exception was thrown ---

Like 0

Like

2 comments
Best reply

This is not an issue with the Excel reports package but is due to an issue with new systems only including two records in the SysCulture table (that is my assumption of the issue). The package will attempt to write data to the SysPackageDataLcz table for cultures that do not exist in the system and cause the constraint violation when the package is installed.

If you report it to support, you can reference my open case about this issue #SR-01065588

Ryan

This is not an issue with the Excel reports package but is due to an issue with new systems only including two records in the SysCulture table (that is my assumption of the issue). The package will attempt to write data to the SysPackageDataLcz table for cultures that do not exist in the system and cause the constraint violation when the package is installed.

If you report it to support, you can reference my open case about this issue #SR-01065588

Ryan

Thank you Ryan, in fact I noticed afterwards that the environment had some major problems. I wrote to the support.

Show all comments