Hi All,

 

I am not able to replicate https://academy.creatio.com/documents/technic-sdk/7-15/how-add-auto-numbering-edit-page-field?_ga=2.112080903.283211749.1623923008-1596851256.1623923008 it successfully on our custom package. Client-side implementation is working as expected. If we try the server side, it is not working. Could anyone please help us with what I am missing? Or is there anything specific we need to do? Even I tried following https://community.creatio.com/questions/auto-numbering-server-side-doesnt-work and could double check on the parameters mentioned.

 

Image Reference

https://ibb.co/tBcFN8Y

https://ibb.co/CMQ29nV

https://ibb.co/cDCBbFC

https://ibb.co/T12tWK7

 

Thanks in advance.

Like 0

Like

3 comments

In addition to the above, I could see the source code section on the downloaded https://academy.creatio.com/docs/node/2311 package with many autogenerated function related to event triggers. If I check my custom object it only has getter and setter for each columns.

To autogenerate the source code I have tried 

1. Generate schemas

2. Publish

3. Complie

All options I have tried but Source code is not generated.

 

 

Thanks

From the screenshots it look like the column you're storing the number in is "UsrCode", however the screenshots show you're attempting to set that in a column named "Code".

Change the line that says:

Entity.SetColumnValue("Code", UserTask1.ResultCode);

To this:

Entity.SetColumnValue("UsrCode", UserTask1.ResultCode);

Secondly, it's unlikely that the name of the UserTask component (the element titled "Generate ordinal number" in your screenshot) is really just UserTask1 (unless you've changed it to that). To find it's name, select that element, then click the three-dot button on the top of the properties on the right and switch to advanced mode to see the name. Then change the "UserTask1" part of the code in both script tasks to that name (it's likely something like UserTask_ followed by random numbers/letters)

Ryan

Ryan Farley,

 

Thanks for your reply. I have double checked my code and I have changed it into "UserTask1" also I have shown 2 examples where I am trying to follow the tutorial with property value as "Code" and my custom section with the property as "UsrCodee".

 

Also, I see this as because of missing source code details for my custom section than the sample SDK which was referenced in the document.

 

Thanks,

Altaf Hussian

 

Show all comments

Hi,

 

Once the activity is created by DCM, I want to show only the activity which is assigned to the current user. Any lead woul help.

 

Regards,

Sourav

Like 1

Like

3 comments

Hello,

 

You can create a business process that grants read permission to an activity only to its owner.

 

More about the business process element "Change access rights":

https://academy.creatio.com/docs/user/bpm_tools/process_elements_refere…

Cherednichenko Nikita,

 

I have already tried this approach. Although it works perfectly fine for Activity section, but under DCM it still shows the Activity which I want to show or hide conditionally.

 

Regards,

Sourav

Sourav Kumar Samal,

 

If you remove read permissions for other users, then only the responsible user will be able to see this record.

Show all comments

Hello,

 

I need to make a button visible based on a few conditions

1. If current user contact record has a lookup value of "Approver"

and

2. If account record of the current user contact has lookup value "Enterprise"

 

Since there are 2 tables to be queried, I understand I need to use callbacks and chaining. This does not seem to work well for me. I have also tried passing a callback function within a callback function, but still its not working well. Can someone please give an example of multiple callbacks?

 

Thanks

Like 1

Like

2 comments

There's no need for the multiple callbacks since this can be done in a single ESQ query. For example, the ESQ below retrieves both the current user's Type value as well as the current user's account Type value in the same call.

var esq = Ext.create("Terrasoft.EntitySchemaQuery", {
    rootSchemaName: "Contact"
});
 
esq.addColumn("Type");
esq.addColumn("Account.Type", "AccountType");
 
esq.getEntity(Terrasoft.SysValue.CURRENT_USER_CONTACT.value, function (result) {
    if (result.success) {
        var conType = result.entity.values.Type,
            accType = result.entity.values.AccountType;
 
        if ((conType && conType.displayValue == "Approver")
            && (accType && accType.displayValue == "Enterprise")) {
            // do something
        }
    }
}, this);

However, to nest a ESQ in a callback of another ESQ it would look like this: 

var esq = Ext.create("Terrasoft.EntitySchemaQuery", {
	rootSchemaName: "Contact"
});
 
esq.addColumn("Type");
esq.addColumn("Account");
 
esq.getEntity(Terrasoft.SysValue.CURRENT_USER_CONTACT.value, function (result) {
    if (result.success) {
        var conType = result.entity.values.Type,
            account = result.entity.values.Account;
        if (conType && conType.displayValue == "Approver") {
            var esq = Ext.create("Terrasoft.EntitySchemaQuery", {
                rootSchemaName: "Account"
            });
 
            esq.addColumn("Type");
 
            esq.getEntity(account.value, function (result) {
                if (result.success) {
                    var accType = result.entity.values.Type;
                    if (accType && accType.displayValue == "Enterprise") {
                        // do something
                    }
                }
            }, this);
        }
    }
}, this);

Ryan

Show all comments

How can we show the Delete Menu Item for a custom detail only for a certain role like System Administrator?

 

Like 0

Like

2 comments

Hello, 

you can restrict deletion rights with object permissions.



The following instructions can help you to achieve the result you are looking for: Object operation permissions

Thank you Kalymbet!

With this option, the Delete Item would still be "visible" to all users (although only certain roles will have permission to perform deletion as defined in object permissions).

Any way to display the option only for specific roles?

Show all comments

Hello,



I would like create multiple buttons that call a business process. Due to the number of buttons in my page, I would like to create a single button click method. This method would receive a parameter that would tell it which button was called. The parameter would then determine which field would be read.



My button method should look something like this:

 onButtonClick: function(clickedButton){
				var recordId = this.get("Id");
                var readField = "Error"; //This value should change later, will show error otherwise
 
                switch(clickedButton){
                    case "Button1":
                        readField = this.get("Field1");
                        break;
                    case "Button2":
                        readField = this.get("Field2");
                        break;
                    /*More Cases
                    .
                    .
                    .
                    */
                   default:
                    console.log(readField);
                    break;
                }
 
                var config = {
                    sysProcessName: "UsrBpToCall",
                	parameters: {
						CurrentRecordId: recordId,
						ReadField: readField,
 
					}
				};
                ProcessModuleUtilities.executeProcess(config);
}

I assume the parameter would appear in the diff section, but I do not know how to implement this functionality.



I appreciate your help!

 

Kind Regards,

Firas



 

Like 1

Like

3 comments
Best reply

Hello Firas,

If you add a tag to each button it will get passed as the fourth parameter to the click handler. 

For example:

{
	"operation": "insert",
	"parentName": "Detail",
	"propertyName": "tools",
	"name": "MyButton1",
	"values": {
		"itemType": Terrasoft.ViewItemType.BUTTON,
		"caption": "Send selected invoice",
		"click": {"bindTo": "onMyButtonClick"},
		"tag": "MyButton1"
	}
}

Then you can retrieve the tag in the click function handler like this: 

onMyButtonClick: function(p1, p2, p3, tag) {
    console.log(tag);
}

Ryan

Hello Firas,

If you add a tag to each button it will get passed as the fourth parameter to the click handler. 

For example:

{
	"operation": "insert",
	"parentName": "Detail",
	"propertyName": "tools",
	"name": "MyButton1",
	"values": {
		"itemType": Terrasoft.ViewItemType.BUTTON,
		"caption": "Send selected invoice",
		"click": {"bindTo": "onMyButtonClick"},
		"tag": "MyButton1"
	}
}

Then you can retrieve the tag in the click function handler like this: 

onMyButtonClick: function(p1, p2, p3, tag) {
    console.log(tag);
}

Ryan

Ryan Farley,



the solution works perfectly. Thank you.



I have a follow-up question if you do not mind. Does the tag being passed as the fourth argument mean that button click methods can take up to 4 arguments?  If that is the case how can one proceed if they were to pass more than one argument and populate p1 through p3? 



Thank you again, your Community responses and articles have been very helpful.



Firas

Hello,

 

Not sure about passing 4 arguments to the click event, I've been using the tag property only to pass the parameter needed. In your case you can bind the click-handler method to several buttons and specify different tags for it so the click-handler method could understand what to do according to the button tag.

Show all comments

Hi Community!

 

I have the following requirement:

We need to link a custom entity called reclamations to the activity. This has to be done m:n. So I have created a new link entity called ReclamationInActivity and added it as a detail to the ActivityPageV2.js.

 

When adding such a ReclamationInActivity record from the activity a new page opens and the user can open the reclamation lookup window there to select or create a reclamation.

When they choose to create a new reclamation, the account and contact have to be prefilled on the "new reclamation" page.

 

I cannot use business rules, because there is no link from the reclamation to ReclamationInActivity.

Also, using a business process is not an option, because the user would have to save the record first and we need to prefill the values.

Is there a way to achieve this by javascript somehow?

 

Thanks,

Robert

Like 0

Like

1 comments

Hi,

If I understand you correctly you want to add a value to columns "Contact" and "Account" from your activity. If so, you can use a simple esq request to get these values and set them in the init or onEntityInitialized methods.

Show all comments

Hello,

 

We have a boolean column in accounts section. If the value is checked, we would like to add an image on the header space as highlighted in yellow in image below. Is there a sample code/ recommendation for this?

 

Like 0

Like

1 comments

Hello,

You can write a simple button and display it in the center. 

{
				"operation": "insert",
				"name": "TestContainer",
				"parentName": "ActionButtonsContainer",
				"propertyName": "items",
				"values": {
					"itemType": Terrasoft.ViewItemType.CONTAINER,
					"wrapClass": ["test-container-wrapClass"],
					"items": []
				}
			},
            {
                "operation": "insert",
                "parentName": "TestContainer",
                "propertyName": "items",
                "name": "PrimaryContactButton",
                "values": {
 
                    "itemType": Terrasoft.ViewItemType.BUTTON,
                    "click": {bindTo: "testclick"},
					"visible": {bindTo: "checkVisible"},
                    "enabled": true,
                    "style": Terrasoft.controls.ButtonEnums.style.TRANSPARENT,
					"imageConfig": {"bindTo": "Resources.Images.EnrichedDefaultIcon"}
                }
            }

In the method checkVisible you can return true or false based on the condition.

To make it at the center just add a new CSS style:

define("AccountPageV2", ["css!UsrDStyle"], function() {

 

.test-container-wrapClass {

        margin-left: auto;

    margin-right: auto;

    width: 6em

    }

 

Show all comments

Hi Community,

 

We have enabled record permission for an object and based on some conditions we are adding role wise permissions to the record. We want to filter a contact lookup field based on the roles to whom the record has access, i.e. only those contact will show whose associated user falls under the roles to which the particular record has access.

 

Any suggestions or lead will help a lot.

 

Thanks,

Sourav Kumar Samal

Like 0

Like

2 comments

Hello,

 

To read more information about the permission access and role please refer to these Academy articles: Object operation permissionsFunctional rolesRecord permissions

Kalymbet Anastasia,

 

Thanks for the suggestions.

 

But we are looking to filter a contact lookup based on the roles to which the particular record has access. If there are any suggestion specific to this business task, that will be great.

 

Regards,

Sourav

Show all comments

Hello,

 

Bernhardt is an onsite customer.

Landing done on their web site is on Word Press and the WordPress bpmonline connector is installed.

As you can see below, there is an error with a timeout.

We have increased the timeout of the connector to 30s, we have reset IIS and Firewall has been checked.

 

On creation site, how we can check if the request arrive to Creatio and if the issue is on Creatio side ?

 

Below the log error message :

    [safe_message] => error object

    [object] => WP_Error Object

        (

            [errors] => Array

                (

                    [http_request_failed] => Array

                        (

                            [0] => cURL error 28: Operation timed out after 30001 milliseconds with 0 bytes received

 

 

Your help is needed.

Stephane Banon

ProcessFirst

 

Like 0

Like

2 comments

Hi Stephane,

 

 

You can check if the request arrived in the Creatio IIS logs. You can learn more here: https://learn.microsoft.com/en-us/iis/manage/provisioning-and-managing-…



Also, I recommend testing this add-on on a cloud trial instance in order to make sure that the issue lies within the network settings.

Thank you Yevhen for your feedback.

 

Show all comments

Hi Community,

 

In Portal Case Section, how we can display the "Show closed cases" tick box?

Like 0

Like

0 comments
Show all comments