Hello!

I'm trying to make an integration with a digital signature call "Firmamex" and I trying to use the code that they provide in their SDK in a business process but i have error messages that dont let me publish the script task. 

This are the errors 

 

And this is the source code of the process. I already try to put a return true; at the end of the script task but stills send me the error. 

 

I hope you can help me.

 

namespace Terrasoft.Core.Process
{
 
    using Newtonsoft.Json;
    using SignmageSDK;
    using SignmageSDKCore;
    using System;
    using System.Collections.Generic;
    using System.Collections.ObjectModel;
    using System.Drawing;
    using System.Globalization;
    using System.Text;
    using System.Web;
    using Terrasoft.Common;
    using Terrasoft.Configuration;
    using Terrasoft.Core;
    using Terrasoft.Core.Configuration;
    using Terrasoft.Core.DB;
    using Terrasoft.Core.Entities;
    using Terrasoft.Core.Process;
    using Terrasoft.Core.Process.Configuration;
 
    #region Class: UsrfirmamexMethodsWrapper
 
    /// <exclude/>
    public class UsrfirmamexMethodsWrapper : ProcessModel
    {
 
        public UsrfirmamexMethodsWrapper(Process process)
            : base(process) {
            AddScriptTaskMethod("ScriptTask1Execute", ScriptTask1Execute);
        }
 
        #region Methods: Private
 
        private bool ScriptTask1Execute(ProcessExecutingContext context) {
            }
            public class Flow
                {
                    SignmageSDK.FirmamexServices signmageServices;
                    String base64;
                    String name;
 
                    public Flow(SignmageSDK.FirmamexServices signmageServices, String base64, String name)
                    {
                        this.signmageServices = signmageServices;
                        this.base64 = base64;
                        this.name = name;
                    }
 
                    public String request()
                    {
                        B64_doc b64_doc = new B64_doc { name = name, data = base64 };
 
                        JObject flujoEjemplo = JObject.FromObject(new
                        {
                            b64_doc = b64_doc,
                            stickers = new object[] {
                                new {
                                    authority = "SAT",
                                    stickerType = "line",
                                    dataType = "rfc",
                                    data = "ARCX9012226P8",
                                    imageType = "hash",
                                    email = "jhon@gmail.com",
                                    page = "0",
                                    rect = new Rect { lx = 226.45f, ly = 355.25f, tx = 397.75f, ty = 413.85f }
                                }
                            },
                            workflow = new object[] {
                                new {
                                    data = "ARCX9012226P8"
                                }
                            },
                            app2 = true
                        });
 
                        String flujoParams = flujoEjemplo.ToString(Formatting.None);
                        return signmageServices.request(flujoParams);
                    }
                }
            };
        }
 
        #endregion
 
    }
 
    #endregion
 
}
Like 0

Like

0 comments
Show all comments

Creatio Community,

 

Is it possible to add to the Creatio Login Page the show password icon you get on some other logon windows/pages (like the one from Windows Security. See Attached.) 

Thanks,

Jose

 

Like 0

Like

0 comments
Show all comments

Hi, 

 

var esqCount = new EntitySchemaQuery(userConnection.EntitySchemaManager, "Project"); esqCount.AddAllSchemaColumns(); 

esqCount.UseAdminRights = false; 

esqCount.RowCount = 0; // No limit

var totalRecords = esqCount.GetEntityCollection(userConnection).Count;

 

totalRecords value is always coming as 0 but there are 22460 records present in the Project object.

 

Can anyone please help where I am making mistake?

 

Thanks.

Like 0

Like

4 comments

You can use something like this: 

var esq = new EntitySchemaQuery(UserConnection.EntitySchemaManager, "Project");
var countCol = esq.AddColumn(esq.CreateAggregationFunction(AggregationTypeStrict.Count, "Id")).Name;
 
// add any filters if needed
 
var entityCollection = esq.GetEntityCollection(UserConnection);
var entity = entityCollection[0];
 
var count = entity.GetTypedColumnValue&lt;int&gt;(countCol);

You need to add a column that creates an aggregate function (count). Then, when you get the results from GetEntityCollection you'll get the first item in the results to get the Count value.

Ryan

Hello,
Thank you for your question.

This line of code is the source of your concern: 

esqCount.RowCount = 0;

RowCount is a property which is responsible for the number of readable elements from your query.

Also note that UseAdminRights is a flag that determines whether access rights will be checked for performing CRUD operations with the database. When UseAdminRights is set to false, the rights check is disabled, and operations are performed without considering access rights.

Hope this helps.

Ryan Farley,

Thanks for answering , I am having hard time to fix this piece of code please see if you can help me -

var selectQuery = new Select(userConnection)
                           .Column("Project", "Id").As("ProjectRecordId")
                           .Column("Project", "UsrProjectID").As("ProjectId")
                           .Column("Project", "Name").As("ProjectName")
                           .Column("Project", "UsrProjectDescription").As("ProjectDescription")
                           .Column("UsrEntitlements", "UsrNumber").As("Entitlements")
                           .Column("ServicePact", "Number").As("ServiceContract")
                           .Column("Project", "CreatedOn").As("CreatedOn")
                           .Column("Contact", "Email").As("CreatedByEmail")
                           .Column("Project", "ModifiedOn").As("ModifiedOn")
                           .Column("Contact", "Email").As("ModifiedByEmail")
                           .From("Project")
                           .Join(JoinType.LeftOuter, "UsrEntitlements").On("Project", "UsrEntitlementsId").IsEqual("UsrEntitlements", "Id")
                           .Join(JoinType.LeftOuter, "ServicePact").On("Project", "UsrServiceContractId").IsEqual("ServicePact", "Id")
                           .Join(JoinType.LeftOuter, "Contact").On("Project", "CreatedById").IsEqual("Contact", "Id")
                           .Join(JoinType.LeftOuter, "Contact").On("Project", "ModifiedById").IsEqual("Contact", "Id")
                            as Select;

Screenshot - 

And the error I am getting is - Error: 42712: table name "Contact" specified more than once.

 

Thanks.

AS,

You're joining to the Contact table twice, but not aliasing them (which means they are both named "Contact")

Change the contact joins to include As

.Join(JoinType.LeftOuter, "Contact").As("CreatedContact").On("Project", "CreatedById").IsEqual("Contact", "Id")
.Join(JoinType.LeftOuter, "Contact").As("ModifiedContact").On("Project", "ModifiedById").IsEqual("Contact", "Id")

Then use them using that alias: 

 .Column("ModifiedContact", "Email").As("ModifiedByEmail")

Also, as an FYI, you can change those joins like this, which I think reads better and less wordy:

.LeftOuterJoin("Contact").As("CreatedContact").On("Project", "CreatedById").IsEqual("Contact", "Id")
.LeftOuterJoin("Contact").As("ModifiedContact").On("Project", "ModifiedById").IsEqual("Contact", "Id")

Ryan

Show all comments

I need to be able to read the name of the current user in a business process so I can insert it in a comment section (not as the GUID).

 

I was thinking I could look up contact (or user) where the ID equals the system variable current user but that doesn't work. 

Like 0

Like

2 comments

You must first create a param in your process with Type=Unique Identifier and set the param value to [#System variable.Current user contact#]

Then you can use that param when reading from Contact

Ryan

Great, thanks Ryan. 

 

Show all comments

Hello, I would like to get assistance on how to implement the "Account Addresses" detail within contacts section, inside activities for the mobile app. When you view a contact in the mobile app and see their addresses in the "Account addresses" detail you can click the address and it will open the native maps app on your phone so you can get directions. 

 

How do I set this up within the activities section of the mobile app so that if I put in a location, it can be a clickable field similar to Contacts section?

 

Also, is there a way to pull in the contact's address to the activity that can be clicked to open the maps app?

 

Thank you,

 

Eric

Like 2

Like

0 comments
Show all comments

Hello,

I'm trying to add a button to contact page details (Contacts_FormPage), I'm currently using Creatio on cloud version 8.1.3.6734 with Freedom UI
I followed these steps:

  1. Navigated to Settings > Advanced Settings
  2. Created a new package, and added ProductCore dependency
  3. Created a Replacing view model with the code name ContactPageV2
  4. Added the code:
  5. define("ContactPageV2", [], function() {
       console.log("ContactPageV2 module loaded");
       return {
           methods: {
               onGenerateLinkClick: function() {
                   console.log("Generate Link button clicked");
               }
           },
           diff: [
               {
                   "operation": "insert",
                   "name": "GenerateLinkButton",
                   "parentName": "ActionButtonsContainer",
                   "propertyName": "items",
                   "values": {
                       "itemType": Terrasoft.ViewItemType.BUTTON,
                       "caption": "Generate Link",
                       "click": {"bindTo": "onGenerateLinkClick"}
                   }
               }
           ]
       };
    });
  6. After saving, I compiled the package
  7. Emptied the cache of the browser, but nothing is showing not even the console log "ContactPageV2 module loaded"

 

Please help as I'm not sure what I'm doing wrong or what steps am I missing (I'm a newbie to this platform).
Thank you in advance.

Like 0

Like

2 comments
Best reply

Creatio has two types of pages, Freedom UI pages and classic pages. They are completely separate/different pages. The ContactPageV2 is the classic page, not the Freedom UI page which is Contacts_FormPage

To add the button that executes your code on the Freedom UI page:

  1. Go to the contact page, click the small gear on the top right corner of the page to edit
  2. Save it to make a copy in your package (see the Side Note at end of article here to force the save to go into your package, if needed)
  3. Add a button to the page where you want it
  4. Open the code for the page (clicking one of the icons at the top right of the page designer)
  5. Add the request handler for the button (the code that will execute when clicked) following steps here: https://customerfx.com/article/adding-a-button-to-execute-custom-code-o…

Ryan

Creatio has two types of pages, Freedom UI pages and classic pages. They are completely separate/different pages. The ContactPageV2 is the classic page, not the Freedom UI page which is Contacts_FormPage

To add the button that executes your code on the Freedom UI page:

  1. Go to the contact page, click the small gear on the top right corner of the page to edit
  2. Save it to make a copy in your package (see the Side Note at end of article here to force the save to go into your package, if needed)
  3. Add a button to the page where you want it
  4. Open the code for the page (clicking one of the icons at the top right of the page designer)
  5. Add the request handler for the button (the code that will execute when clicked) following steps here: https://customerfx.com/article/adding-a-button-to-execute-custom-code-o…

Ryan

Thank you! 
I was able to add it following your explanation. 
And yes I need to add it to my custom package since I'm trying to create a connector that can be used by anyone later on.
That was very insightful, thanks again!

Show all comments

Hey, everyone! 

I've got 2 teams working together on the same portal and each of them must see a different page for "Contacts". 
I'm courrently using the Freedom UI to create everything and, on papper, it seems to be working fine, but not on practice..

I've got a "contact" replacing object on another application and that one is done and working. I don't want to create lots and lots of business rules on that page to "work" for everyone, so, to make it work, I've created a new replacing object for contacts on another application and created a new freedomUI section for that (edited the form page and everything). The thing is: Whenever I open my "contact" section from the second application, it opens up the list and form page from my frist replacing object!

 

Anyone has already seen something like this and can help out how to configure propperly?

Already went to "Workplace setup" and checked that I'm using the "New" replacing object that I've created and checked that, on the object manager (EntitySchemaDesigner), the "Default page" has the page I want and on the Workplace Page setup (where I link the sections I want to appear) is propperly configured (when I click on the Contacts that is there and then "List setup" or "Page setup" it directs me to the page I want, not the old one).

 

Thanks for now! 

Like 2

Like

1 comments

We have a similar question, for working on two different case pages and sections based on the same object. Needed some development in Classic UI, unsure how to replicate in Freemdom UI.

Show all comments

We want to add filters in the same way that you can add them to lookups using code on the page, as there isn't a no-code way to configure additional filters for Timeline components. In our case, it's filtering out non-completed Activity records from the Timeline. We don't seem to be able to using similar methods to lookups though (i.e. adding custom code to the crt.LoadDataRequest handler. Has anyone found a way to add such a filter? It looks like all the Timeline code is in the 9351.xxxxxxx JS file.

Like 0

Like

0 comments
Show all comments

Hi community, 

Where can I find the source code responsible for this checkbox (Make the list editable). 

I want to make this detail editable only in one section. Here is my use case : I'm using this detail in two sections A and B. In section A, I want the detail to be editable like this : 

 

But in section B, I don't want this behavior (checkbox must be unchecked) like this : 

Like 0

Like

3 comments

You should create 2 separate details. And add them to the separate edit page for section A and for section B.

Thanks Antonii, isn't there any other way than creating two details ? 

Ismail el lahya,

This is the best way to perform this task

Show all comments

Hi All, 

 

How to acheive this - https://community.creatio.com/questions/change-order-lookup-values-list  in freedom UI page.

 

I have a lookup called ContractLineNumber which has values from 1 to 20 in its Name field.

 

Best Regards.

Like 0

Like

1 comments

You can see how to do this for a Freedom UI dropdown lookup in the comment from John Kingsbury here: https://community.creatio.com/questions/possibility-order-options-drop-down-menu-freedom-ui

Ryan

Show all comments