Hi Team,

I have added a button to create child custom section record from an opportunity. After saving the child record it is navigating back to Opportunity but I want to Stay back in the child since I have to do other actions in the child. Below is the button code. Please suggest if you have any idea on how to achieve my goal.

Thanks,

Venkat.

Button Code:

================================

methods: {

            onNewQuoteClick: function() {

                    var now = new Date();

                    now.setMonth(now.getMonth() + 1);

                    this.openCardInChain({

                        schemaName: "UsrChildPage",

                        operation: Terrasoft.ConfigurationEnums.CardOperation.ADD,

                        moduleId: this.sandbox.id + "_CardModule",

                        defaultValues: [{

                            name: ["UsrOppLookup"],

                            value: [this.get("Id")]

                        },

                        {

                            name: ["UsrName"],

                            value: ["Child For " + this.get("Title")]

                        },

                        {

                            name: ["UsrAccount"],

                            value: [this.get("UsrQuoteAccount").value]

                        },

                        {

                            name: ["UsrExpiredate"],

                            value: [now]

                        }

                        ]

                        

                    });

                    this.save({ isSilent: true });

                }

        }

 

Like 0

Like

4 comments
Best reply

Tetiana Markova,

Thanks a lot. That worked like a gem.. Thanks Again..

Hello,

I suppose, the same issue was discussed in this topic - https://community.bpmonline.com/questions/how-stop-redirection-new-orde…

You need to override 'onSaveButtonClick' method and set 'isSilent' parameter in order to stay on the page after save:

onSaveButtonClick: function() {

   if (this.get("IsProcessMode")) {

      this.save({ isSilent: true });

   } else {

      this.save();

   }

}

Tetiana Markova,

Hi Tetiana,

Thanks for the response. I have override the Save button in my child page as shown below but not successful. Can you please check and let me know what mistake I am doing?

Thanks,

Venkat.

 

Code:

==================================

{

                "operation": "insert",

                "name": "Save",

                "values": {

                    "itemType": 5,

                    "style": "green",

                    "caption": {

                        "bindTo": "Save"

                    },

                    "click": {

                        "bindTo": "onSaveButtonClick"

                    },

                    "enabled": {

                        "bindTo": "canEntityBeOperated"

                    },

                    "classes": {

                        "textClass": [

                            "actions-button-margin-right"

                        ]

                    }

                },

                "parentName": "LeftContainer",

                "propertyName": "items",

                "index": 5

            }

==============================

onSaveButtonClick: function() {

                 if (this.get("IsProcessMode")) {

                     this.save({ isSilent: true });

                 }

                 else{

                     this.save();

                 }

            }

Let's try another approach by overriding save() method for your child edit page:

  methods: {

            save: function(config) {

                if (config) {

                    config.isSilent = true;

                }

                else {

                    config = {

                        isSilent: true

                    };

                }

                this.callParent([config]);

            }

        },

Tetiana Markova,

Thanks a lot. That worked like a gem.. Thanks Again..

Show all comments

I'm creating a process that reads data and then needs to update a text column on that data by appending some new text to the existing string. I can read the data fine but the script task throws a null reference exception. Here is the simplified version of my script:

var programs = Get("ReadDataUserTask1.ResultEntityCollection");

foreach(var program in programs) {
    program.SetColumnValue("Campaign Flags", "Test");
}

return true;

The programs is null when I run the process.

Like 0

Like

7 comments

Dear Scott,

Try another approach to overcome the issue. Please read the collection of the Read Data in the following way: 

 var entities = Get<ICompositeObjectList<ICompositeObject>>("ReadDataUserTask1.ResultCompositeObjectList");

Afterwards proceed further with collection result.

Regards,

Anastasia

Anastasia Botezat,

using trying the above script, when I convert the list to string by doing:

entities.ToString());

I get  - Terrasoft.Common.CompositeObjectList`1[Terrasoft.Common.CompositeObject] (looks like the type and not the value)

Can you help?

Chani Karel,

 

There is no need to cast object to string since you can get the value from some column of the object using GetCompositeObjectColumnValue (in my case I was reading the "Full name" column value from the collection of contacts):

 

string name = GetCompositeObjectColumnValue&lt;string&gt;(contacts, "Name");

and then process the value according to your needs.

 

Best regards,

Oscar

Hi Chani Karel,

I think there are 2 things in your scripts:

1. You ReadDataUserTask1 result could be empty.

var programs = Get&lt;EntityCollection&gt;("ReadDataUserTask1.ResultEntityCollection");

Therefore, before the "foreach Loop", you really need to check if the programs is null or not. Otherwise, you might get the exception as you mentioned.

 

2. Please use the column code instead of column title to set value.

For example, in Contact there is column with code "JobTitle" and title "Full job title". If you need to set the value, you need to use the code "JobTitle".

 

regards,

 

Cheng Gong

Oscar Dylan,

using the tostring method was just to understand why I don't get the values as needed. 

What I need to do is this:

I get a list of 'contact in opportunity' by the read collection of records element. I need to get the contact as lookup  value and not as string (the Id and not name) in order to set parameters with the contacts and send email to them.

How do I do it?

Thank you.

Cheng Gong,

using the tostring method was just to understand why I don't get the values as needed. 

What I need to do is this:

I get a list of 'contact in opportunity' by the read collection of records element. I need to get the contact as lookup  value and not as string (the Id and not name) in order to set parameters with the contacts and send email to them.

How do I do it?

Thank you.

Chani Karel,

How did you end up solving this?

 

Kind regards,

Yosef

Show all comments

Hi Community,

How can I call/trigger my business process under methods in client code?

Thanks

 

Like 0

Like

2 comments

This is solved

In order to trigger business process in Client Code, take the following actions: 1. Connect ProcessModuleUtilities module to a module of the page, from which the business process will be called.

2. Call executeProcess(args) method from ProcessModuleUtilities module by 

transferring args object with such properties.

Example

define("AccountPageV2", ["ProcessModuleUtilities"], function(ProcessModuleUtilities) {
    return {
        entitySchemaName: "Account",
        methods: {
            // Проверяет, заполнено ли поле [Основной контакт] страницы.
            isAccountPrimaryContactSet: function() {
                return this.get("PrimaryContact") ? true : false;
            },
            // Переопределение базового виртуального метода, возвращающего коллекцию действий страницы редактирования.
            getActions: function() {
                var actionMenuItems = this.callParent(arguments);
                actionMenuItems.addItem(this.getActionsMenuItem({
                    Type: "Terrasoft.MenuSeparator",
                    Caption: ""
                }));
                actionMenuItems.addItem(this.getActionsMenuItem({
                    "Caption": { bindTo: "Resources.Strings.CallProcessCaption" },
                    "Tag": "callCustomProcess"                
                }));
                return actionMenuItems;
            },
            // call you porcess
            callCustomProcess: function() {
                var contactParameter = this.get("PrimaryContact");
                var args = {
                    // Process name
                    sysProcessName: "UsrCustomProcess",
                    // parameters process
                    parameters: {
                        ProcessSchemaContactParameter: contactParameter.value
                    }
                };
                // run process
                ProcessModuleUtilities.executeProcess(args);
            }
        }
    };
});

 

Show all comments

Hi,

the unsubscribe link is mandatory in bulk emails.

If I don't want to show unsubscribe link in my campaign, what can I do?

If I leave the anchor with macro for unsubscribe, but without description, the unsubscrive link will not be visibile to the user: does it work ?

Like 0

Like

3 comments

Dear Stefano,

There is a law in United States called CAN-SPAM Act and it can be accessed here. Please take a closer look at the 5th rule of this law that is called "Tell recipients how to opt out of receiving future email from you". This is a strict rule to have clear and visible option to opt-out from bulk emails.

Emails without unsubscribe link can be marked as spam and bounced by a huge amount of email providers and after the first bulk email your domain will be blacklisted by many email providers and after that by the email provider that you've used for sending this bulk email (UniOne or Elastic) and it won't be affecting your mailing rating positively. That's why there is a built out-of-the-box logic in the application which adds this link to all bulk emails created in the system and we are sorry but we can't recommend you anything on this topic.



Best regards,

Oscar

Dear Oscar

thank you for your response, I know this law.

My customer needs to send to his resellers a newsletter with price list and He wouldn't that reseller can unsubscribe.

Stefano Bassoli,

Even thought your business task seems reasonable to us we will not provide any recommendation on how to hide unsubscribe button according to the law Oscar mentioned earlier since email provider may still consider those Emails as spam

Show all comments

Hi every body! Could someone help me?  How can I find somethind done on bpm'online by someone?  Someone create a printable pdf file from some account data and wasn't done according to the:

1.Registration of a new printable in the [Printables] lookup. At this stage you need to define a section where the new printable will be used. Besides that, it is necessary to create a list of data columns that will be used in the printable.

2.Downloading a printable template and editing it in MS Word. Here you can set up print form appearance: page layout, text formatting, tables, etc.

 

Like 0

Like

3 comments

Hello.

I cannot quite understand your request. As far as I understand you need an example of the implementation. You can find it in the following article:

https://academy.bpmonline.com/documents/administration/7-13/setting-tem…

Please clarify your request in case the answer is not what you were looking for.

Matt

Matt Watts,

Thanks Matt, but the link leadsme to a page with no content. What I need to do is to understand how someone implemented a printable summary of some account data information. As we did not have a phase out before that person has left the company, I don't understant how it was done, so I can not add any more fields to be printed in the account summary. Anyway what I need to do is printing an account summary with just some pre define fields.

 

Dear Andre,

There are two perfect academy articles regarding the question of printable set up and you can find it here https://academy.bpmonline.com/documents/administration/7-13/setting-tem… and here https://academy.bpmonline.com/documents/administration/7-13/registering….

Those articles provide step by step explanations on the printable building and registering. Hope it helps!

Oscar

Show all comments

Hello Community!

 

I´m not available to replace the ProductSelectionViewModel. I need add a new column with the Product.Category.

Just following the post in community: https://community.bpmonline.com/questions/adding-product-image-product-selection-page

 

Any ideas?

 

Like 0

Like

1 comments

Try set System Setting with code 'Feature-ValidateConfigurationOnChange' disabled

Show all comments

Hi community, good morning.

I have a web-to-lead landing page that shows 2 errors:

1 - When submitting the form, the lead is getting created properly, however I keep getting the following response (detail: Lead registration method is not mapped on third party´s page and even if it is mapped the same error occurs. Also, I setted it to be defaulted to a LookUp value on the DEFAULT VALUES tab of the Landing Pages.):

{"SaveWebFormObjectDataResult":"{resultMessage:\"Record was not added to the \\\"Lead registration method\\\" object. Name field must be filled in\",resultCode:-1}"}

2 - Even after submitting the form, the redirection page is not showing up.

Please, could you provide me some thoughts?

Thanks.

Like 0

Like

2 comments

Dear Danilo,

1. Typically, such error appears when there is one of the following:

- The field mapped on the landing has the name, which does not correspond to the one in the system. For instance, capital/non-capital letters, incorrect prefix for the field.

- The field is required on the object, but not filed in. However, since the lead is created successfully, this is not your case.

Please double-check that the default value in the landing settings is set for the corresponding field and fields are correctly mapped.

2. Inn order to determine why landing is not redirecting, please run a debug procedure. You can use use the following library

https://webtracking-v01.bpmonline.com/JS/create-object-debug.js

instead of the standard one, which is indicated in the form ( <script src="https://webtracking-v01.bpmonline.com/JS/create-object.js"></script>).

Regards,

Anastasia

Anastasia Botezat,

Thanks for you answer, Anastasia. However, the field is not on the landing page and it is not required. I added it to the Default Value tab and the value is not getting set at all. The value has a default value on the Configuration as well. 

Anyway, I will try to debug with webtracking tool. Thanks.

Show all comments

Hi;

I create new Section entity by wizard;

The notes field on page doesn't keep the values after save.

Anyone can help

Regards

Tomek

Like 0

Like

1 comments

Dear Tomek,

Can you please specify how did you add this field on a page? And are you referring to attachments and notes detail or you added HTML box? Can you share a screenshot of this field? 

Show all comments

Hello. i'd like to hide the 'Run Process' -button in the Side Panel for certain Roles.

As well as change the contents of the drop-down of the 'Home' -button next to it.

Like 0

Like

3 comments

Dear Julius, 

In order to hide the button menu, you need to override the basic functionality, which involves development within the system.

Firstly, you need to override basic schema LeftPanelTopMenuModule. Please find the loadMenu method. There you can see that visibility of the button in based on user type. You can add your custom method to check current user rights and set the visibility based on the response result:

Here is an example of how to check current user role. In the example we are hiding the Menu button form non-administrators role. You can adjust the code up to your needs. (the example involves creating of custom CSS style and adding it to the schema dependencies):

 

As for the list of menu items, please take a look at  loadItemsMainMenu method, which is responsible for its logic.

Hope you will find it helpful.

Regards,

Anastasia

Anastasia Botezat,

 

How do you override the LeftPanelTopMenuModule module? I cannot create a replacing client module, so not sure how I would go about this. Is it no longer possible to do this?

Hi Harvey Adcock,

 

In order to replace "LeftPanelTopMenuModule" client module schema, please follow the steps described below:

 

1. Please go to Configuration > Add > Module

2. In the appeared empty module, please add the code below:

define("UsrLeftPanelTopMenuModule", ["LeftPanelTopMenuModule", "LeftPanelTopMenuModuleResources"],
 function() {
 Ext.define("Terrasoft.UsrLeftPanelTopMenuModule", {
 override: "Terrasoft.LeftPanelTopMenuModuleViewModel",
 /*
 * @override
 */
			...
 });
 }
);

Also, please add Title "UsrLeftPanelTopMenuModule" and Name "UsrLeftPanelTopMenuModule", choose the package. Important: do not set the parent object. Save the module.

 

3. Then, you need to replace "BootstrapModulesV2". Here is the article on how to replace client module schema:

 

https://academy.creatio.com/documents/technic-sdk/7-16/creating-custom-client-module-schema

 

4. In a new replacing client schema, please insert the code below:

 

define("BootstrapModulesV2", ["UsrLeftPanelTopMenuModule"], function() {
	return {};
});

Set "BootstrapModulesV2" as Title and Name, set "BootstrapModulesV2" (NUI) as a parent object, set replace parent input checked. 

 

5. Save the changes and hard-reload the page. 

Show all comments

Hello I am trying to show/hide the 'Run Process' button for some specific roles.

As well as the content in the 'Home' drop-down menu.

 

How can I do this?

Best regards,

Like 0

Like

5 comments

Hi,

If you intend to modify the basic top menu item, please take a look at LeftPanelTopMenuModule schema. It is responsible for menu items and methods, which regulate visibility and click handling. 

Particularly, you would be interested in getTopMenuConfig method, which returns a collection of menu items. Among others, you can find StartProcessMenu item. You can override its visibility property to set it to your role, or bind it to the custom method. 

Same goes for the "Home" drop down - MainMenu item in the LeftPanelTopMenuModule schema. 

Regards,

Anastasia

Hi Anastasia,



I have created a module  extending LeftPanelTopMenuModule  and customized the visible property (to false) of  StartProcessMenu item.



And now where to use this newly created module UsrClientTopLeftMenu to see the changes.



Note:

I found that this LeftPanelTopMenuModule is used in Workplace selection menu (LeftPanelClientWorkplaceMenu). I could not replace Workplace selection menu also.

define("UsrClientTopLeftMenu", ["LeftPanelTopMenuModule"],
function(resources,LeftPanelUtilities) {
    Ext.define("Terrasoft.configuration.UsrClientTopLeftMenu", {
    	alternateClassName: "Terrasoft.UsrClientTopLeftMenu",
        extend: "Terrasoft.LeftPanelTopMenuModule",
 
        // extend functions
       	getTopMenuConfig: function() {
       			this.callParent(arguments);
				var menuConfig = [
					{
						id: "collapse-button",
						tag: "CollapseMenu",
						className: "Terrasoft.HoverMenuButton",
						style: Terrasoft.controls.ButtonEnums.style.TRANSPARENT,
						classes: {
							imageClass: ["button-image-size"],
							wrapperClass: ["collapse-button-wrapperEl"]
						},
						imageConfig: resources.localizableImages.collapseIconSvg,
						click: {
							bindTo: "collapseSideBar"
						},
						hint: this.getCollapseSideBarMenuItemCaptionConfig(),
						markerValue: this.getCollapseSideBarMenuItemCaptionConfig()
					},
					{
						id: "menu-button",
						tag: "MainMenu",
						className: "Terrasoft.HoverMenuButton",
						style: Terrasoft.controls.ButtonEnums.style.TRANSPARENT,
						hint: {bindTo: "getMenuButtonHint"},
						markerValue: resources.localizableStrings.MenuButtonHint,
						classes: {
							imageClass: ["button-image-size"],
							wrapperClass: ["menu-button-wrapperEl"]
						},
						imageConfig: resources.localizableImages.menuIconSvg,
						menu: {
							items: {bindTo: "MainMenuItems"},
							"alignType": "tr?",
							"ulClass": "position-fixed"
						},
						delayedShowEnabled: {
							bindTo: "Collapsed"
						},
						showDelay: this.get("ShowDelay"),
						hideDelay: this.get("HideDelay")
					},
					{
						id: "menu-startprocess-button",
						tag: "StartProcessMenu",
						className: "Terrasoft.HoverMenuButton",
						style: Terrasoft.controls.ButtonEnums.style.TRANSPARENT,
						hint: {bindTo: "getStartProcessMenuButtonHint"},
						markerValue: resources.localizableStrings.StartProcessButtonHint,
						classes: {
							imageClass: ["button-image-size"],
							wrapperClass: ["menu-startprocess-button-wrapperEl"]
						},
						imageConfig: resources.localizableImages.processIconSvg,
						menu: {
							items: {bindTo: "startProcessMenu"},
							"alignType": "tr?",
							"ulClass": "position-fixed"
						},
						click: {
							bindTo: "startProcessMenuButtonClick"
						},
						visible: false,
						delayedShowEnabled: {
							bindTo: "Collapsed"
						},
						showDelay: this.get("ShowDelay"),
						hideDelay: this.get("HideDelay")
					},
					{
						id: "menu-quickadd-button",
						tag: "quickAddMenu",
						className: "Terrasoft.HoverMenuButton",
						style: Terrasoft.controls.ButtonEnums.style.TRANSPARENT,
						classes: {
							imageClass: ["button-image-size"],
							wrapperClass: ["menu-quickadd-button-wrapperEl"]
						},
						hint: {
							bindTo: "getQuickAddHint"
						},
						markerValue: resources.localizableStrings.AddButtonHint,
						imageConfig: resources.localizableImages.quickaddIconSvg,
						menu: {
							items: {bindTo: "quickAddMenu"},
							"alignType": "tr?",
							"ulClass": "position-fixed"
						},
						visible: {
							bindTo: "IsSSP",
							bindConfig: {
								converter: function(value) {
									return !value;
								}
							}
						},
						delayedShowEnabled: {
							bindTo: "Collapsed"
						},
						showDelay: this.get("ShowDelay"),
						hideDelay: this.get("HideDelay")
					}
				];
				return menuConfig;
			},
 
    });
});

 

Bhoobalan Palanivelu,

Please use the following approach to hide the "Run process" button from the top menu module:

 

1) Create a module called UsrLeftPanelTopMenuModule with the following content:

define("UsrLeftPanelTopMenuModule", ["LeftPanelTopMenuModule"],
    function() {
        Ext.define("Terrasoft.configuration.UsrLeftPanelTopMenuModuleViewModel", {
            alternateClassName: "Terrasoft.UsrLeftPanelTopMenuModuleViewModel",
            override: "Terrasoft.LeftPanelTopMenuModuleViewModel",
            getTopMenuConfig: function() {
                var esq = this.callParent(arguments);
                var index = esq.map(function(e) { return e.id; }).indexOf("menu-startprocess-button");
                if (index &gt; -1) {
                    esq.splice(index, 1);
                }
                return esq;
            }
        });
    }
);

2) Create a replacing view model for BootstrapModulesV2 model:

with the following content:

define("BootstrapModulesV2", ["UsrLeftPanelTopMenuModule"], function() {
	return {};
});

3) Relogin to the application

 

As a result the button will be hidden:

Best regards,

Oscar

Hello Oleg Drobina,

 

Could you please help me with an approach to apply the above splice method only for non-administrator users?

 

Thank you for all your help.

 

 

Mouna RACHIDI,

Hi, in the getTopMenuConfig you can get the value of the current user like this:

var currentUserId = Terrasoft.SysValue.CURRENT_USER.value;

Then you can write a esq request to a table to see if the user has the role of a system administrator:

var esq = Ext.create("Terrasoft.EntitySchemaQuery", {

                        rootSchemaName: "SysAdminUnitInRole"

 });

var esqFirstFilter = esq.createColumnFilterWithParameter(Terrasoft.ComparisonType.EQUAL, "SysAdminUnitId", currentUserId );

var esqSecondFilter = esq.createColumnFilterWithParameter(Terrasoft.ComparisonType.EQUAL, "SysAdminUnitRoleId", "83A43EBC-F36B-1410-298D-001E8C82BCAD");

 

Note, 83A43EBC-F36B-1410-298D-001E8C82BCAD is the Id of role "System administrators" in the SysAdminUnit table.

If you found the values, then you just var this.callParent(arguments);, and if not, you apply the code that Oleg provided.

 

Show all comments