7.15
Studio_Creatio

Hi 

 

I want to create a query on a Section Schema in the same way I do it normally on a Page Schema.

 

On a Page Schema It usually starts with getting the current record ID like this:

 

var recordID = this.get("Id");

 

But when I do the same on the Section Schema I get an undefined value to my recordID variable.

 

Does some one know how to fix this issue ?

 

 

Like 1

Like

3 comments

Since the Section Schema is a list, you cannot get the Id by simply using:

this.get("Id")

Instead you must use the following to first get the currently active row:

this.getActiveRow().get("Id")

 

Harvey Adcock,

It works! thank you so much Harvey.

Harvey Adcock,

 

Hi. I am having issues of the same kind. I want the text value of one of my record's text-values. I have tried all of these and I'm not getting the result I want.

 

This worked on the Page metod:

var path= this.get("MyString"); 

 

Any of these does not work in the Section metod:

var activeRow = this.get("ActiveRow");
var path = this.get("GridData").get(activeRow).get("MyString").value;
var path = this.get(activeRow).get("MyString").value;
var path = this.get("MyString").value;

I also tried all of them with/or without the .value

Show all comments
#WebService
7.15
Studio_Creatio

Hello, I want to invoke a webservice call passing two parameters

 

https://mindicador.cl/api/{tipo_indicador}/{dd-mm-yyyy}

Where {tipo_indicador} is a string like uf, dolar, euro and so on

and {dd-mm-yyyy} is the current date

 

For example if I want to get the value of today euro change rate i need to invoke

https://mindicador.cl/api/euro/09-04-2020

 

But i cannot create methods to every day...how can I specify the value of the parameters when invoke the web service?, in Creatio Webservice object in the process I was working on have no the possibility to specify parameters, how can I did it?

 

Please see at http://prntscr.com/rw4h8u

 

Thanks in advance

 

 

Like 0

Like

2 comments

Dear Julio, 

 

You can specify web service request parameters in the web service section in the method detail: 

https://prnt.sc/rzx19d

https://prnt.sc/rzxcka

After that you would be able to populate them in the web service call element: 

https://prnt.sc/rzx1i9

Thanks Dennis

Show all comments

Hello I'm getting in a process the following string from a webservice and I want to parse it to and object where can I get the elements the json bring to me, for example I get:

{"version":"1.6.0","autor":"mindicador.cl","codigo":"uf","nombre":"Unidad de fomento (UF)","unidad_medida":"Pesos","serie":[{"fecha":"2020-04-09T04:00:00.000Z","valor":28630.63}]}

 

And I need to parse to get:

nombre

fecha

valor

 

How can I did it?

 

Thanks

Like 0

Like

6 comments

Hello, Julio!

 

Please see the article below on working with the web service response:

https://academy.creatio.com/documents/technic-bpms/7-15/call-web-servic…

If you want to do this differently, you can call web service with a standard C# tools using a script task element and process the response body in a script task. Also, for more flexibility, you can call the web serviced is a script task. Here is an article with an example: 

https://stackoverflow.com/questions/3900371/how-can-i-call-a-webservice…

To parse JSON in script task you can use the following article, for example: 

https://www.codementor.io/@andrewbuchan/how-to-parse-json-into-a-c-object-4ui1o0bx8

Dennis Hudson,

Hello Dennis,

 

I don't know if you are still supporting the community forum, however if you are.  The JSON article uses the System.Web.Script namespace.  When I compile a script task using this namespace an error results saying Script not found within System.Web.  Is there are workaround or an alternative?  Thanks,

Gareth Osler,

 

Hello,

 

As an example I've used the string Julio shared above. To deserialize it I've used the following approach:

 

1) Create a source code in configurations. Name it UsrForCustomObject. The content is as follows:

using System.Collections.Generic;
using Terrasoft.Configuration;
 
namespace Terrasoft.Configuration.UsrForCustomObject
{
	public class UsrForCustomObject
    {
        public string version
        { get; set; }
        public string autor
        { get; set; }
        public string codigo
        { get; set; }
        public string nombre
        { get; set; }
        public string unidad_medida 
        { get; set; }
        public List<InternalUsrForCustomObjectList> serie
        { get; set; }
    }
 
    public class InternalUsrForCustomObjectList
    {
        public string fecha 
        { get; set; }
        public decimal valor 
        { get; set; }
    }
}

2) Create a business process with the following schema:

The code of the parameters is the same as the name:

2.1) Text (500 characters) parameter - ParsedFecha

2.2) Text (500 characters) parameter - ParsedNombre

2.3) Decimal (0.01) parameter - ParsedValor

2.4) Text (500 characters) parameter - ParsedVersion

2.5) Text (500 characters) parameter - PassedJSONString

 

This is the content of the "Methods" tab:

public void PerformJsonDeserialize()
{
	var passedValue = Get<string>("PassedJSONString");
	if (!String.IsNullOrEmpty(passedValue))
	{
		UsrForCustomObject testCustObj = System.Text.Json.JsonSerializer.Deserialize<UsrForCustomObject>(passedValue);
		Set<string>("ParsedVersion", testCustObj.version);
		Set<string>("ParsedNombre", testCustObj.nombre);
		Set<string>("ParsedFecha", testCustObj.serie[0].fecha);
		Set<decimal>("ParsedValor", testCustObj.serie[0].valor);
	}
}

and we are using Terrasoft.Configuration.UsrForCustomObject.

 

Why it's done so: we need to deserialize the passed string and receive an instance of the UsrForCustomObject class we've declared at step 1 in configurations. Deserialization is performed using System.Text.Json.JsonSerializer.Deserialize method (please note that specifying JsonSerializer.Deserialize method with specifying System.Text.Json as an assembly reference will result in error stating that the system cannot understand whether System.Text.Json.JsonSerializer.Deserialize should be used or Newtonsoft.Json.JsonSerializer.Deserialize should be used, so use the exact approach of method call as in my example above).

 

3) "Input JSON string" auto-generated page is quite simple: it tells the user to input JSON string. It's done for testing purposes, in fact actual JSON string can be passed:

4) In the "Set JSON to parameters" formula we specify the value for the "PassedJSONString" parameter that should be the string we've input in the "Input JSON string" auto-generated page from step 3:

5) In the "Deserialize" script-task we call the "PerformJsonDeserialize" method from the process methods from step 2:

6) In the "Result" auto-generated page we simply show the result of deserialization (values for all parameters from step 2):

 

So as a result here is the screenshot of the process start "Input JSON string" auto-generated page where the value of:

{"version":"1.6.0","autor":"mindicador.cl","codigo":"uf","nombre":"Unidad de fomento (UF)","unidad_medida":"Pesos","serie":[{"fecha":"2020-04-09T04:00:00.000Z","valor":28630.63}]}

is passed:

and here is the screenshot of the "Result" auto-generated page:

Also these parsed values can be converted (to date\time for example) and so on. So please feel free to study this example and implement the same logic on your end.

A quick note for anyone who happens this way in the future.

Step 1) above, the namespace name needs to be different from the class name, e.g.:

using System.Collections.Generic;
using Terrasoft.Configuration;
 
namespace Terrasoft.Configuration.UsrCustomerImportNamespace
{
	public class UsrCustomerImport
    {
        public string accountName { get; set; }
        public List<UsrCustomerImportItems> items { get; set; }
    }
 
    public class UsrCustomerImportItems
    {
        public string contactName { get; set; }
        public string contactType { get; set; }
    }
}

 

By way of an epilogue, while the `System.Text.Json` namespace is available in a trial, for some reason it was not available in the dev environment I was using.  However classes in the `Terrasoft.Common.Json` namespace were available.  I was able to use the `Deserialize<T>(String)` method of the Json class.  (Note at the time of writing the `DeserializeDictionary(String)` method has a bug in it and cannot be used.)

@Oleg, 

 

I followed the steps above but receive the attached upon compilation of the methods within business process? 

Show all comments
7.15
Studio_Creatio

Hello,

I am trying to add an image field to a fully user generated section in my custom package. I have it working, but when I make a change to the page using the section wizard, it deletes my edits to the diff and methods areas which added in the functionality for the image. How do I add the image method and diff to the page and keep it while making other edits? I tried to do a replacing page but it says I can't make a replacing page in the same package. Then I tried making another page that doesn't replace the parent and it didn't work. Thank you. 

Like 0

Like

0 comments
Show all comments
dashboard
mobile application
7.15
Studio_Creatio

Hi Community,

I have almost 10 plus dashboards in web application. Now in mobile I want only to show 3, how can I hide some of it? Is there a way I can filter it in Mobile Application Manifest?

 

Like 0

Like

3 comments

I think you can try the "Access Rights" option in dashboard and not give access to certain set of users who use the mobile app.

Thanks KrishnaPrasad,

On my scenario, access rights will not do. They should still need to see these dashboards in web application. I only need to limit the dashboards in mobile. Do you know if it can be achieve through filtration?

Dear Fulgen, 

 

There is no possibility to reach the functionality you have requested by applying changes to manifest only. 

You can do that overriding method onDashboardRecordsLoaded in Terrasoft.configuration.controller.DashboardPage (MobileDashboardPageController). 

An argument called "records" is passed into this method which contains all dashboards uploaded from DB. 

You can filter which of them to display in method onDashboardRecordsLoaded

Here is the short instructions on how to override an existing controller:

1. Create custom module which inherits the existing controller and add your own logic to it. Here is example for activity controller: https://prnt.sc/s8izs3

2. Create a custom module for replacing grid page for the created controller: https://prnt.sc/r0pz21

3. Create a Replacing client module for the existing manifest, copy the code from the base manifest, change the Grid property in the needed object and add the controller in the PageExtentions array: https://prnt.sc/r0q35h

4. Recycle pool and re-synchronize your mobile app.



Kind regards,

Roman

Show all comments

Dear mate,

on the accountpage, i want to display an iframe with a 100% tab height but i have the following error:

 

Refused to apply style from 'https://urltocreatio/0/conf/content/UsrAccountPageCSS.css?hash=bae4bbbf…' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

 

 

So i tryed to publish my UsrAccountPageCSS.css object which is as Ryan Farley shows (https://customerfx.com/article/embedding-a-webpage-on-a-tab-in-bpmonline/):

#ExternalisationTab {

    height: 100%;

}

and i ve got the following errors:

Code: #ExternalisationTab {

Description: Expected an identifier and instead saw '#'.

 

AccountPage:

I tryed to delete and to recreate the module UsrAccountPageCSS but i've the same issue

 

Thanks,

Nicolas

Like 0

Like

2 comments

Hello Nicolas,

 

I did everything straight to Ryan's instruction and everything worked on my side perfectly. Please pay attention to your CSS file - you should put

 

#ExternalisationTab {

    height: 100%;

}

 

not to the source code, but to the "LESS" tab of the .css file. After that everything should work as expected (save the .css file as well as Account Page schema).

 

Best regards,

Oscar

Super !! it was the issue, i putted the code in the source code and not in the less tab.

Thank you Oscar !

Show all comments
Custom Details
click
7.15
Studio_Creatio

Hello

 

I have a custom detail, to edit some record:

  1. I have to click on it,
  2. then click on the ... vertical points icon and
  3. then select edit.

 

How can I made some field, like "Order number" to when I click on it, the edit record page open? just one step to edit the record.

 

Thanks in advance

 

Like 0

Like

4 comments

Dear Julio,

 

You can add a column that was selected as display value for the object to make it clickable. For example for Case object display value is case number, so if the case number is added to detail it becomes clickable. 

FYI, you could also just double click on the record to open it. 

 

Best regards,

Angela

Dear Angela Reyes,

Could you please explain more on how to make it clickable? Maybe by sharing some piece of code

 

Thank you in advance.

 

Regards,

Mohammad Yahfoufi

Mohammad Yahfoufi,

 

A field on the detail is clickable by the default if it has the “Lookup” type. Please see the screenshot below:

 

 

Therefore, it is difficult to understand what you want to achieve. Please provide us with a more detail description of the required functionality.

 

Best regards,

Norton

Norton Lingard,

Hi Norton what I ask at the beginning of this Article and I think what Mohammad also wants to know is have a field like a Case number or similar, not a lookup, where if you click on this it open the case, in this case if you have a detail with some detail, could have some field to identify each line of this detail, like a correlative, and enable this field to be clickable to could click on it and open the detail line. Is that's correct 

Mohammad ?



 

Show all comments
section wizard
open edit page
7.15
Studio_Creatio

Hello,

 

I want to know if somebody knows if there some Marketplace or another way to enable "Copy" when I enable on a Section Multiple Pages, a page for example in contact for type=Customer to a Page to type=Supplier or any. If I create a multiple pages lost some special controls like "PhotoTimeZoneContainer", the Section Action Dashboard (http://prntscr.com/rpqxbi) and so on.

 

Usually, when one wants a Multiple page could be the most of the times, wants to add info or show less one, I think is easier to duplicate the whole object, in this case Contact and delete what one don't need and add some specific data...

 

Thanks in advance

Like 0

Like

7 comments

Make following pages to use the main page as the parent.

Kirill Krylov CPA,

Thanks Kirill, on the source code? is there any where to do this, because I did it, but have a lot of problem to recognize the change, like Compile All to work!, could you be more specific, please?

Dear Julio,

 

In order to implement the required functionality you should do the following:

1. Create a main page schema that should contain a common functionality for all other pages.

2. When creating any other edit page, use the main page schema as a parent https://prnt.sc/s4h2pq

 

As a result, the functionality of the main page is available for all edit pages that have this page as a parent.

 

You can look at how any section page is implemented as an example. For example, the "AccountSecitonV2" schema has the "BaseSecitonV2" schema as a parent https://prnt.sc/s4h7a1

 

Best regards,

Norton

Norton Lingard,

Hello again

 

This doesn't works. What's wrong?

 

I create several pages on accounts, for example, please see at http://prntscr.com/tyf89k

 

Later go to the source code schema and inherits from the base one, see before at http://prntscr.com/tyfaq8 and after change the parent page at http://prntscr.com/tyfbnh

 

Clear cache, reloads http://prntscr.com/tyfev7

 

Open the account page and nothing http://prntscr.com/tyfgd7

 

Also I logout, clear cache, login and also nothing, even I compile all and nothing.

 

Go to section wizard opens page config and the parent page it's ok, but doesn't get the page I need, just an empty one http://prntscr.com/tyfhut

 

But if I click, for example on Source code and again on Page, magically I get what I want, but still doesn't work, because if I go back to Section Wizard and save, the page doesn't save the changes see at the following video in https://share.vidyard.com/watch/bFEFaUVYPMKVBiSVdgjSDJ?

 

Thanks

 

 

 

Julio.Falcon_Nodos,

 

We are glad to inform you that starting from 7.16.2 version you can now copy a section record page and customize it as a separate page. Please find more information about it in the article by the link below (the “USER CUSTOMIZATION TOOLS” chapter):

 

https://academy.creatio.com/documents/creatio-release-notes-7-16-2

 

Best regards,

Norton

Norton Lingard,

Hi Norton, doesn't works, if fails. Did you try?, Support inform to me it's will be resolved on 7.16.4. For this reason I need to understand the "old way"

Julio.Falcon_Nodos,

 

I have just tried to copy one page to another and it worked perfectly on my local instance with 7.16.3 version. Therefore, please consider using this functionality instead of using the old solution.

 

Best regards,

Norton

Show all comments

Hi I'd like to create a rule where an email is attached to a custom object. I tried to follow the link below, but I don't see my custom object on the 'Connected object' drop down list. 

https://academy.creatio.com/documents/base/7-15/how-set-rules-binding-emails-other-creatio-objects-automatically#XREF_60839

 

Do I need to execute some sql scripts? If so what script do I need to run?

 

Thanks,

Jose

Like 0

Like

4 comments
Best reply

Hi Jose,



You can select * from RuleRelationSections and see how the fields look.



You need the Name (capitalized) of the custom section you want to add and the Uid of this section from SysSchema table.



So the script should look like this:



insert into RuleRelationSections (Name,SectionSchemaUId) values ('name of the object capitalized','UID of the custom object from SysSchema')



Thank you.

Hi Jose,



You can select * from RuleRelationSections and see how the fields look.



You need the Name (capitalized) of the custom section you want to add and the Uid of this section from SysSchema table.



So the script should look like this:



insert into RuleRelationSections (Name,SectionSchemaUId) values ('name of the object capitalized','UID of the custom object from SysSchema')



Thank you.

Thanks Bohdan! I follow your instructions and it worked as I need it.

Hello Bohdan Zdor, 

Where we can get RuleRelationSections? and where to put the query?

 

Thanks in Advance

Hi Shrey Soni,



You can find RuleRelationSections as the object in advanced settings of your instance.



You can put the query using SQL Executor (https://marketplace.creatio.com/app/sql-executor-creatio)

if your instance is the cloud one.



In case you have an on-site SQL installation of Creatio you can use your SQL Management Studio to put the queries.



Thank you for choosing Creatio!

Show all comments
cache
repositories
iCacheStore
7.15
Studio_Creatio

Hi



We have a need to cache some data at the user session level on the server and have identified iCacheStore as the repository choice for this. The following link (https://academy.creatio.com/documents/technic-sdk/7-15/repositories) only gives examples to store strings as values inside the cache object dictionary. 



Could we get a code snippet for how to store C# objects as values inside the cache object dictionary? Thanks in Advance!!

Like 0

Like

1 comments

Dear Shrikanth,

 

In order to store an object in Application cache you should serialize the object to string and save the string. Please find more information about serialization in the article by the link below:

 

https://stackoverflow.com/questions/2434534/serialize-an-object-to-string

 

Best regards,

Norton

Show all comments