Hello Community,

I have created a button in a MiniPage which via the ProcessModuleUtilities executes a business proccess.

 

This business process has simple logic, its reponsible for opening a preconfigured page.

 

I want that when clicking the button, the preconfigured page is opened in a new Browser Window

How can that be achieved

Sasori

Like 0

Like

5 comments

Hello Sasori,

 

There is no option to achieve the task required in your case unfortunately even using NetworkUtilities or message sending from the server to the client. I've registered this as a suggestion to our core R&D team so they could add this feature in the next application releases. Thank you for helping us in making the application better!

Hello Oleg,

Thank you for you quick reply.

 

As a workaround for the solution of this businnes need can be the answer to this community post that i have created

https://community.creatio.com/questions/open-city-edit-page-new-browser…

I have managed to open the CityPageV2 in a new tab

 

openNewTab: function () {
				var requestUrl = ["http://localhost:9004/0/Nui/ViewModule.aspx#CardModuleV2/CityPageV2/edit/"]
				 window.open(requestUrl, '_blank');
			}

But my last problem is that i want to open the page in ADDMode not EditMode. Shpuld i modify the requestURL ?

Sasori Oshigaki,

 

this is what I was talking about - there is no way to open a preconfigured page inside the process since it has no particular link, it's a business process page. When you add a new record to the city pay attention to the link in the browser and you will see that it's not changed.

Oleg Drobina,

When i click new from the Modal Window

I am redirected to the CityPage in ADD mode

If I mimic this behaviour from that custom button that I have Created, and place it in a new Browser Window, I can achieve my business need. 

I know that the responsible method is getSelectionControlsConfig in LookupPageViewGenerator schema.

But can you provide with a similar example ? Or a workaround to achieve my business need ?

If you still think that there no way of doing this, i will interrupt my research.

Your help is much appreciated Oleg.

Thank you

Oleg Drobina,

I managed to solve the business need via a workaround. Thank you 

Show all comments

Hello Creatio Community,

When clicking a button, we want to be directed on the City Edit page on a new broswer window, having the possiblity to add e new City.

How can this be achieved ?

Sasori

Like 0

Like

4 comments
Best reply

Hello Sasori,

 

This cannot be achieved in the current application version since there is no direct link to call on creating a new record (we can only pass the URL to the window.open). A new record is created via the addRecord method that in the final steps call the openCardInChain method that passes the operation: ConfigurationEnums.CardStateV2.ADD. This cannot be done with opening the new window. But I will create a suggestion for our R&D team to add this funcitonality in one of the future releases. Thank you for helping us in making the app better! 

Hello Sasori,

 

This cannot be achieved in the current application version since there is no direct link to call on creating a new record (we can only pass the URL to the window.open). A new record is created via the addRecord method that in the final steps call the openCardInChain method that passes the operation: ConfigurationEnums.CardStateV2.ADD. This cannot be done with opening the new window. But I will create a suggestion for our R&D team to add this funcitonality in one of the future releases. Thank you for helping us in making the app better! 

Thank you Oleg !

hello there, is this functionnality available now with the new version release ? thanks a lot, Olivia

Capdevielle Olivia,

 

Hello,

 

This suggestion I registered is in the "Accepted" status so we expect this feature to be added in the app. Once it's developed and implemented we will notify about it in the Release notes of the version.

Show all comments

Hello Creatio team,

How can i activate the Section Wizard option for the followin detail:

This feature is deactivated in the PlanningAccountDetailV2 schema part of Field package

I need to activate the wizard for this task:

Deactivate the filter that filters the accounts based on the selected employee.

Like 0

Like

2 comments
Best reply

Hello Sasori,

 

In order to deactive the filter based on employee it is just needed to click on the cross sign, and you will see all the accounts.

 

Alternatively you can create a replacing view model for the schema PlanningAccountDetailV2 and modify the method getFilters according to your needs.

 define("PlanningAccountDetailV2", [],

    function() {

        return {

            entitySchemaName: "Account",

            attributes: {},

            methods: {

                getFilters: function() {

                     this.callParent(arguments);

                    var filters = this.sandbox.publish("GetSectionFilters");

                    if (!this.Ext.isEmpty(filters.filtersValue)) {

                        this.setFilter(filters.key, filters.filtersValue);

                    }

                }},

            diff: /**SCHEMA_DIFF*/[]/**SCHEMA_DIFF*/

        };

    }

);

 

As for the section wizard, this whole detail was created with code, so it would be not possible to enable it. But the first option by clicking the cross sign would be the more simple one.

 

Best regards,

Dariy

 

Hello Sasori,

 

In order to deactive the filter based on employee it is just needed to click on the cross sign, and you will see all the accounts.

 

Alternatively you can create a replacing view model for the schema PlanningAccountDetailV2 and modify the method getFilters according to your needs.

 define("PlanningAccountDetailV2", [],

    function() {

        return {

            entitySchemaName: "Account",

            attributes: {},

            methods: {

                getFilters: function() {

                     this.callParent(arguments);

                    var filters = this.sandbox.publish("GetSectionFilters");

                    if (!this.Ext.isEmpty(filters.filtersValue)) {

                        this.setFilter(filters.key, filters.filtersValue);

                    }

                }},

            diff: /**SCHEMA_DIFF*/[]/**SCHEMA_DIFF*/

        };

    }

);

 

As for the section wizard, this whole detail was created with code, so it would be not possible to enable it. But the first option by clicking the cross sign would be the more simple one.

 

Best regards,

Dariy

 

Thank you very much Dariy.

Show all comments

Hi there,

 

I made a button that call ProcessModuleUtilities on click. Once clicked, the callback is called and a BodyMask is shown but never hidden.

 

Here is the button :

			{
				"operation": "insert",
				"name": "GetAccountBtn",
				"parentName": "LeftContainer",
				"propertyName": "items",
				"values": {
					"itemType": Terrasoft.ViewItemType.BUTTON,
					"caption": {
						"bindTo": "Resources.Strings.GetAccount"
					},
					"click": {
						"bindTo": "onGetAccountClick"
					},
					"visible": {
						"bindTo": "getGetAccountButtonVisible"
					},
					"enabled": {
						"bindTo": "getGetAccountButtonEnable"
					},
					"style": "blue",
					"classes": {
                        "textClass": ["actions-button-margin-right"]
                    }
				}
			},

Here is the methods :

			onGetAccountClick: function() {
				Terrasoft.showConfirmation("Effectuer une demande pour devenir l'AM de ce compte ?", function(result) { 
    				if (result === Terrasoft.MessageBoxButtons.YES.returnCode) {
        				this.processGetAbandonAccountPopupResponse("RequestGetAccount");
    				}
				}, ["yes", "no"], this);
			},
			processGetAbandonAccountPopupResponse: function (processName) {
				args = {
					sysProcessName: processName,
					parameters: {
						accountId: this.get("Id"),
						userId: Terrasoft.SysValue.CURRENT_USER.value
					},
					callback: this.callbackShowRequestMade,
					scope: this
				};
				ProcessModuleUtilities.executeProcess(args);
			},
			callbackShowRequestMade: function () {
				this.showInformationDialog("Votre demande a été effectuée.");
			},

Here is my business process :

And finally here is the result : https://vimeo.com/727290324/560dec0d61

 

I have this error in the console  :

XML Parsing Error: not well-formed Location: https://creatioBaseUrl/0/ServiceModel/ProcessEngineService.svc/RunProce… Line Number 1, Column 1

 

Here is the request made by my browser :

POST https://creatioBaseUrl/0/ServiceModel/ProcessEngineService.svc/RunProcess

Request body :

{
  "collectExecutionData": true,
  "parameterValues": [
    {
      "name": "accountId",
      "value": "b253a1de-10cd-452f-bd23-28ecb696b44a"
    },
    {
      "name": "userId",
      "value": "aa995be7-7611-43ea-a79d-19894080a976"
    }
  ],
  "schemaName": "RequestGetAccount",
  "resultParameterNames": []
}

Response body :

{
  "processId": "e3493a1e-0069-4164-81e1-47c7743146f0",
  "processStatus": 1,
  "resultParameterValues": null,
  "executionData": null,
  "success": true,
  "errorInfo": null
}

Do you have any idea what can I do to fix this bodyMask issue ?

 

Kind regards,

 

Julien

Like 1

Like

2 comments
Best reply

When you use a callback with ProcessModuleUtilities, you're responsible for clearing the mask in the callback function.  Add MaskHelper module to the top of the code (like you did with ProcessModuleUtilities) and then call this in the callback function:

MaskHelper.HideBodyMask();

Ryan

When you use a callback with ProcessModuleUtilities, you're responsible for clearing the mask in the callback function.  Add MaskHelper module to the top of the code (like you did with ProcessModuleUtilities) and then call this in the callback function:

MaskHelper.HideBodyMask();

Ryan

Ryan Farley,

Thank you Ryan, I forgot this detail.

 

Julien

Show all comments

Hello community!

I am going to change user type when button clicked, plaese help me ASAP!

 

 

define("ContactPageV2", [], function() {
	return {
		entitySchemaName: "Contact",
		attributes: {},
		modules: /**SCHEMA_MODULES*/{}/**SCHEMA_MODULES*/,
		details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,
		businessRules: /**SCHEMA_BUSINESS_RULES*/{}/**SCHEMA_BUSINESS_RULES*/,
		methods: {
			// owner is NULL = disable button 
			onPageClick: function() {
				var textInput = this.get("Owner");
				var textType = this.get("Type");
				console.log(textType);
				console.log(textInput.value);
				if (textInput) {
					this.set("Type", {value: "60733efc-f36b-1410-a883-16d83cab0980", displaValue: "Employee", markerValue: 							"Employee", customHtml: "Employee", primaryImageVisible: false });
 
				}
				var ageInput = this.get("Age");
				this.set(ageInput, 24);
				console.log(ageInput);
 
			},
			getMyButtonEnabled: function(){
				var textInput = this.get("Owner");
				var result = !!textInput;
				return result;
			}
		},
		dataModels: /**SCHEMA_DATA_MODELS*/{}/**SCHEMA_DATA_MODELS*/,
		diff: /**SCHEMA_DIFF*/[
			{
				"operation": "insert",	
				"parentName": "ContactGeneralInfoBlock",
				"propertyName": "items",
				"name": "NewButton",
				"values": {
					itemType: Terrasoft.ViewItemType.BUTTON,
                    caption: {bindTo: "Resources.Strings.NewButtonCaption"},
					click: {bindTo: "onPageClick"},
					enabled: {bindTo: "getMyButtonEnabled"},
					"style": Terrasoft.controls.ButtonEnums.style.BLUE,
					"layout": {
						"column": 12,
						"row": 2,
						"colSpan": 8,
						"rowSpan": 1
					}
 
				},
 
            },
		]/**SCHEMA_DIFF*/
	};
});

 

Like 0

Like

4 comments
Best reply

Hello,

 

Eugene in this community post shared an example on how to modify the lookup value from the client-side logic. Use the:

 

this.set("LookupName", {value:"id", displayValue:"text"});

 

Best regards,

Oscar

Hello,

 

Eugene in this community post shared an example on how to modify the lookup value from the client-side logic. Use the:

 

this.set("LookupName", {value:"id", displayValue:"text"});

 

Best regards,

Oscar

it is showing undefined when i clicked the button.

Oscar Dylan,

can you help me like that?

 

Muhammadjon Yakhyoev,

 

It means that you specify something that shouldn't be set in this column. Only records present in the AccountType lookup can be set as a value in this column. Additionally you need to debug the code and see what exactly is being set in this column and check if there is no additional logic that set the value for a field there.

 

Best regards,

Oscar

Show all comments

Hello,

 

I am using the following link to create multi select from a detail using my custom sections.

https://academy.creatio.com/documents/technic-sdk/7-16/adding-multiple-…

whenever i add the following :

    mixins: {

            // Connecting the mixin to the schema.

            LookupMultiAddMixin: "Terrasoft.LookupMultiAddMixin"

        },

the detail does not display, when i remove it, the detail displays but i cannot add anything.

Did anyone face this kind of behavior ?

 

Maher.

 

 

 

Like 0

Like

3 comments

Hi maher,

What errors do you see in the browser console?

Ryan

Ryan Farley,

Hello Ryan,

 

I get the below error:

 

 

Ryan thank you for your reply, i fixed it, i forgot to add the LookupMultiAddMixin string at the top of the schema.

 

In fact your article on customerfx made me realize my mistake. 

 

Regards,

Maher.

Show all comments