We  have created a process that is triggered when a Lead is saved, and it updates some columns in the just-saved lead. 

Is it possible to force lead edit page refresh after save ?

 

If it is not possible, an alternative could also be to force return to the section page.

Like 0

Like

2 comments

Hi Community,

 

I need to hide the Export to Excel option for Details present on the record edit page for all users except for Specific users like Supervisor.

 

However I have asked this question earlier and Ryan has replied to that and that works fine as well. But now the situation is that this is to be done for specific users.

https://community.creatio.com/questions/how-hide-standard-actions-details-record-edit-page

 

Please tell me how to achieve this functionality

 

Many Thanks!

Akshit.

Like 0

Like

2 comments

Hello Akshit,

To hide for specific users only, you can add something like the following to the detail schema's methods:

getExportToExcelMenuVisibility: function() {
    // first make sure it's not already hidden due to operation permissions
    var baseVisible = this.callParent(arguments);
    if (!baseVisible) {
        return false;
    }
 
    // now you can return true or false to show/hide for current user
    return true; // or return false to hide for the current user
},
getDataImportMenuItemVisible: function() {
    // first make sure it's not already hidden due to operation permissions
    var baseVisible = this.mixins.FileImportMixin.getDataImportMenuItemVisible.apply(this, arguments);
    if (!baseVisible) {
        return false;
    }
 
    // now you can return true or false to show/hide for current user
    return true; // or return false to hide for the current user
}

However, note, only go this route with code if you need to limit this capability in this specific detail only. If you're wanting to remove this from everywhere in the app, then using the operation permission as Julio mentioned in your other post is the right approach.

Ryan

Hello Akshit,

 

I've achieved the result needed using the following scenario:

 

1) Create an operation permission with "CanExportDataOnCustomDetail" code:

Here we will specify the list of users or roles who will be able to export data from our custom detail.

 

2) Create a detail in the contacts section with the following schema of the detail (not the detail page, but detail itself):

define("UsrSchemafd43c0a7Detail", ["RightUtilities"], function(RightUtilities) {
	return {
		entitySchemaName: "UsrContactCaseDetailV2",
		details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,
		diff: /**SCHEMA_DIFF*/[]/**SCHEMA_DIFF*/,
      	attributes:{
          "CanExportDataOnCustomDetailAtt":{
            dataValueType: Terrasoft.DataValueType.BOOLEAN,
            type: this.Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,
            value: false
          }
        },
		methods: {
          init: function() {
                this.callParent(arguments);
                this.checkOperationPermission();
            },
          checkOperationPermission: function () {
            var operationsToRequest = [];
            debugger;
            operationsToRequest.push("CanExportDataOnCustomDetail");
            RightUtilities.checkCanExecuteOperations(operationsToRequest, function(result) {
                    if (result) {
                      	this.set("CanExportDataOnCustomDetailAtt", result.CanExportDataOnCustomDetail);
                      	console.log("result.CanExportDataOnCustomDetail: "+result.CanExportDataOnCustomDetail);
                    }
                }, this);
          },
          getExportToExcelMenuVisibility: function (){
            if (this.get("CanExportDataOnCustomDetailAtt")===true){
              return true;
            } else {
              return false;
            }
          }
        }
	};
});

Please note that debugger and console.log are not needed here, they were added just for testing the code.

 

As you can see the key actions here are:

 

- calling RightUtilities and checking if the user has operation permission rights for "CanExportDataOnCustomDetail" operation (the one that we've created at step 1)

- setting the "CanExportDataOnCustomDetailAtt" attribute value based on the RightUtilities check in the checkOperationPermission function

- using the "CanExportDataOnCustomDetailAtt" attribute value so to call getExportToExcelMenuVisibility method correctly due to our business task

 

As a result once the system user or role is added to the operation permission they will be able to see the "Export to Excel" button in the detail actions.

 

Best regards,

Oscar

Show all comments

Hi Community,

 

I need to hide the Export to Excel option for Details present in record edit page.

 

Like in the above screenshot, Previous PO/WO for the selected Project Details There is and option for Export to Excel & Data Import which I need to hide.

 

I have got this article : https://community.creatio.com/questions/how-hide-or-remove-actions-section

 

and it's working fine on sections.

 

Please tell me how to approach it!

 

Many Thanks,

Akshit.

Like 0

Like

8 comments

Hello Akshit,

You can add the following to the methods of the detail schema:

getExportToExcelFileMenuItem: Terrasoft.emptyFn,
getDataImportMenuItem: Terrasoft.emptyFn,

Ryan

Also, in this case, you can go to "Operation Permissions" and restrict the export functionality to specific roles, see "CanExportGrid" Operation permission.

 

On Creatio 7.17, also in the Business Rules of any section you can restrict tabs, objects, groups and so on, see at https://prnt.sc/vpzsq0 and https://prnt.sc/vpzttn

 

I suggest to use LOW-CODE tools of Creatio, avoid developing if Creatio have tools to solve what you need.

@Akshit, to avoid import, you need to edit "CanImportFromExcel" Operation Permission and configure the roles who must have permissions to import, by default just System Administrators

Hi Ryan Farley,

 

Thanks for the solution. It works.

 

But one more question I need to hide these options only for specific users, say for all the users except Supervisor these Export to Excel option should not be visible.

 

How can I achieve this? 

Hi Julio.Falcon_Nodos,

 

Thank you for you response but I see nothing like "CanImportFromExcel" or "CanExportGrid" Operation permission 

 

 

Application version is 7.16.3

Hi Akshit,

 

FYI you are filtering the "CanImportFromExcel" and "CanExportGrid" Operation Permission by Name column rather than it should filter by Code column. Please find the below screenshot for more information.

 

 

 

Many Thanks!

Sarthak Jain

 

Akshit,

 

You must select  "code" field, you are looking the Name

Hello Akshit,

 

Please see my comment at https://community.creatio.com/questions/specific-user-how-hide-standard…

 

This is exactly what you need.

 

Best regards,

Oscar

Show all comments

Hello,

 

How can cache the lookups to the device in order to view them in offline mode for mobile app?

 

Thank you.

Maher.

Like 0

Like

3 comments

Hello Maher,

 

Once you sync the mobile app with the main app all lookup values are being saved in the cache of the mobile app and will be available for selection in offline mode. In case you've added new lookup values to the main app and need them to appear in the mobile app please sync the mobile app with the main app and new values will appear as needed.

 

Best regards,

Oscar

Oscar Dylan,

Hello Oscar,

 

Thank you for the reply.

I am not able to see the list of values in offline mode for some reason, are there any steps to do or configurations?

I did synchronize before disconnecting from the network.

 

Maher.

maher daher, maybe our steps to reproduce the behavior are different. Can you please specify the value for the system setting with the "MobileApplicationMode" code (try setting the value as "Offline")? Have I understood you right that you perform synchronization, then disconnect your device from the network and then try to edit the record, select the lookup, but you don't have any values there? Is this a custom lookup or some out-of-the-box lookup?

 

Please also make sure that your lookup is present in the SyncOptions property -> SysLookupsImportConfig attribute in the mobile application manifest (as described here). Because your lookup may simply not sync with the mobile application.

 

Best regards,

Oscar

Show all comments

Hello colleagues

 

We install https://marketplace.creatio.com/template/marketing-record-types-timeline today and after it get NOTHING on Timeline tab, please see at https://prnt.sc/vojm67

 

I uninstall the package and continue having no Timeline content, please your help. I also close the session, clear cache, but nothing, no Timeline ☹

 

How can I restore my Timeline content?

 

Thanks in advance

Like 0

Like

4 comments

Hi Julio,

I've not used that marketplace add-on, so only guessing, but since the UI isn't even loading on the timeline tab, I would assume there is an error occurring in the client-side code. If you open the browser dev tools is there an error that shows in the console or on the network tab? If so, that might help track down the issue.

Ryan

Ryan Farley,

Thanks Ryan, yes it give an error. Also, I reported to Creatio support, because at this time I uninstall the add-on and continue having no Timeline. Here is the error I get on console

performanceLogger.js:346 GET https://nodos-cl.creatio.com/0/Nui/Terrasoft/EsqTimelineDataProvider.js?_dc=1606251564623 404
XMLHttpRequest.send @ performanceLogger.js:346
(anonymous) @ polyfills-es5.js?hash=bdb8b91ac2da4b9591ee94e2f0737aef:1
O.i.<computed> @ polyfills-es5.js?hash=bdb8b91ac2da4b9591ee94e2f0737aef:1
loadScriptFile @ all-combined.js:6
require @ all-combined.js:6
syncRequire @ all-combined.js:6
(anonymous) @ all-combined.js:6
instantiate @ all-combined.js:6
(anonymous) @ all-combined.js:6
(anonymous) @ _bundle_10.js?hash=bdb8b91ac2da4b9591ee94e2f0737aef:49
Terrasoft.each @ all-combined.js:36
_initDataProviders @ _bundle_10.js?hash=bdb8b91ac2da4b9591ee94e2f0737aef:49
init @ _bundle_10.js?hash=bdb8b91ac2da4b9591ee94e2f0737aef:49
initDataStorage @ _bundle_10.js?hash=bdb8b91ac2da4b9591ee94e2f0737aef:45
(anonymous) @ _bundle_10.js?hash=bdb8b91ac2da4b9591ee94e2f0737aef:45
e @ all-combined.js:41
(anonymous) @ all-combined.js:41
execCb @ require.js:1702
check @ require.js:883
enable @ require.js:1176
init @ require.js:788
(anonymous) @ require.js:1466
setTimeout (async)
req.nextTick @ require.js:1821
localRequire @ require.js:1455
requirejs @ require.js:1803
Terrasoft.require @ all-combined.js:41
requireDataProviders @ _bundle_10.js?hash=bdb8b91ac2da4b9591ee94e2f0737aef:45
e @ all-combined.js:41
(anonymous) @ _bundle_10.js?hash=bdb8b91ac2da4b9591ee94e2f0737aef:45
e @ all-combined.js:41
callback @ all-combined.js:6
initialize @ _bundle_6.js?hash=bdb8b91ac2da4b9591ee94e2f0737aef:38
(anonymous) @ _bundle_10.js?hash=bdb8b91ac2da4b9591ee94e2f0737aef:45
e @ all-combined.js:41
callback @ all-combined.js:6
(anonymous) @ _bundle_10.js?hash=bdb8b91ac2da4b9591ee94e2f0737aef:45
(anonymous) @ all-combined.js:41
execCb @ require.js:1702
check @ require.js:883
enable @ require.js:1176
init @ require.js:788
(anonymous) @ require.js:1466
setTimeout (async)
req.nextTick @ require.js:1821
localRequire @ require.js:1455
requirejs @ require.js:1803
Terrasoft.require @ all-combined.js:41
initTimelineFiltersProfile @ _bundle_10.js?hash=bdb8b91ac2da4b9591ee94e2f0737aef:45
e @ all-combined.js:41
Terrasoft.chain @ all-combined.js:41
(anonymous) @ _bundle_10.js?hash=bdb8b91ac2da4b9591ee94e2f0737aef:45
callback @ all-combined.js:6
(anonymous) @ _bundle_0.js?hash=bdb8b91ac2da4b9591ee94e2f0737aef:41
e @ all-combined.js:41
callback @ all-combined.js:6
(anonymous) @ _bundle_0.js?hash=bdb8b91ac2da4b9591ee94e2f0737aef:41
querySysSettings @ all-combined.js:41
initGoogleTagManager @ _bundle_0.js?hash=bdb8b91ac2da4b9591ee94e2f0737aef:41
e @ all-combined.js:41
callback @ all-combined.js:6
(anonymous) @ _bundle_0.js?hash=bdb8b91ac2da4b9591ee94e2f0737aef:41
callback @ all-combined.js:6
(anonymous) @ _bundle_0.js?hash=bdb8b91ac2da4b9591ee94e2f0737aef:41
(anonymous) @ all-combined.js:41
execCb @ require.js:1702
check @ require.js:883
enable @ require.js:1176
init @ require.js:788
(anonymous) @ require.js:1466
setTimeout (async)
req.nextTick @ require.js:1821
localRequire @ require.js:1455
requirejs @ require.js:1803
Terrasoft.require @ all-combined.js:41
requireProfile @ _bundle_0.js?hash=bdb8b91ac2da4b9591ee94e2f0737aef:41
initializeProfile @ _bundle_0.js?hash=bdb8b91ac2da4b9591ee94e2f0737aef:41
e @ all-combined.js:41
Terrasoft.chain @ all-combined.js:41
init @ _bundle_0.js?hash=bdb8b91ac2da4b9591ee94e2f0737aef:41
callParent @ all-combined.js:6
init @ _bundle_10.js?hash=bdb8b91ac2da4b9591ee94e2f0737aef:45
(anonymous) @ _bundle_0.js?hash=bdb8b91ac2da4b9591ee94e2f0737aef:28
(anonymous) @ _bundle_0.js?hash=bdb8b91ac2da4b9591ee94e2f0737aef:28
tryReturnCache @ _bundle_0.js?hash=bdb8b91ac2da4b9591ee94e2f0737aef:33
(anonymous) @ _bundle_0.js?hash=bdb8b91ac2da4b9591ee94e2f0737aef:33
(anonymous) @ all-combined.js:41
execCb @ require.js:1702
check @ require.js:883
enable @ require.js:1176
init @ require.js:788
(anonymous) @ require.js:1466
setTimeout (async)
req.nextTick @ require.js:1821
localRequire @ require.js:1455
requirejs @ require.js:1803
Terrasoft.require @ all-combined.js:41
getSchema @ _bundle_0.js?hash=bdb8b91ac2da4b9591ee94e2f0737aef:33
build @ _bundle_0.js?hash=bdb8b91ac2da4b9591ee94e2f0737aef:33
generateSchemaStructure @ _bundle_0.js?hash=bdb8b91ac2da4b9591ee94e2f0737aef:28
init @ _bundle_0.js?hash=bdb8b91ac2da4b9591ee94e2f0737aef:28
fn @ core-base.js:110
safeExecute @ core-base.js:904
initModule @ core-base.js:107
_processModule @ core-base.js:210
(anonymous) @ core-base.js:305
execCb @ require.js:1702
check @ require.js:883
enable @ require.js:1176
init @ require.js:788
(anonymous) @ require.js:1466
setTimeout (async)
req.nextTick @ require.js:1821
localRequire @ require.js:1455
createModuleInstance @ core-base.js:304
(anonymous) @ core-base.js:411
execCb @ require.js:1702
check @ require.js:883
enable @ require.js:1176
init @ require.js:788
(anonymous) @ require.js:1466
setTimeout (async)
req.nextTick @ require.js:1821
localRequire @ require.js:1455
(anonymous) @ core-base.js:409
execCb @ require.js:1702
check @ require.js:883
enable @ require.js:1176
init @ require.js:788
(anonymous) @ require.js:1466
setTimeout (async)
req.nextTick @ require.js:1821
localRequire @ require.js:1455
loadModule @ core-base.js:408
injectedSandbox.loadModule @ core-base.js:682
loadModule @ _bundle_0.js?hash=bdb8b91ac2da4b9591ee94e2f0737aef:41
callModelMethod @ all-combined.js:41
(anonymous) @ all-combined.js:41
fire @ all-combined.js:6
continueFireEvent @ all-combined.js:6
fireEventArgs @ all-combined.js:6
fireEvent @ all-combined.js:6
onOwnerCtAfterRenderOrAfterRerender @ all-combined.js:41
fire @ all-combined.js:6
continueFireEvent @ all-combined.js:6
fireEventArgs @ all-combined.js:6
fireEvent @ all-combined.js:6
onOwnerCtAfterRenderOrAfterRerender @ all-combined.js:41
fire @ all-combined.js:6
continueFireEvent @ all-combined.js:6
fireEventArgs @ all-combined.js:6
fireEvent @ all-combined.js:6
render @ all-combined.js:41
setVisible @ all-combined.js:41
setControlPropertyValue @ all-combined.js:41
c @ all-combined.js:41
T @ all-combined.js:21
g @ all-combined.js:21
h @ all-combined.js:21
c.trigger @ all-combined.js:21
set @ all-combined.js:21
set @ all-combined.js:41
callParent @ all-combined.js:6
set @ all-combined.js:41
activeTabChange @ _bundle_7.js?hash=bdb8b91ac2da4b9591ee94e2f0737aef:5
callParent @ all-combined.js:6
activeTabChange @ _bundle_7.js?hash=bdb8b91ac2da4b9591ee94e2f0737aef:5
callParent @ all-combined.js:6
activeTabChange @ _bundle_5.js?hash=bdb8b91ac2da4b9591ee94e2f0737aef:35
callModelMethod @ all-combined.js:41
(anonymous) @ all-combined.js:41
fire @ all-combined.js:6
continueFireEvent @ all-combined.js:6
fireEventArgs @ all-combined.js:6
fireEvent @ all-combined.js:6
setActiveTab @ all-combined.js:41
onTabClick @ all-combined.js:41
eval @ VM9367:7
k @ all-combined.js:6
value @ polyfills-es5.js?hash=bdb8b91ac2da4b9591ee94e2f0737aef:1
value @ polyfills-es5.js?hash=bdb8b91ac2da4b9591ee94e2f0737aef:1
value @ polyfills-es5.js?hash=bdb8b91ac2da4b9591ee94e2f0737aef:1
p @ polyfills-es5.js?hash=bdb8b91ac2da4b9591ee94e2f0737aef:1
h @ polyfills-es5.js?hash=bdb8b91ac2da4b9591ee94e2f0737aef:1
Show 53 more frames
VM4677:3 Uncaught TypeError: c is not a constructor
    at eval (eval at getInstantiator (all-combined.js:6), <anonymous>:3:8)
    at Object.instantiate (all-combined.js:6)
    at Object.create (all-combined.js:6)
    at i.<anonymous> (_bundle_10.js?hash=bdb8b91ac2da4b9591ee94e2f0737aef:49)
    at Object.Terrasoft.each (all-combined.js:36)
    at i._initDataProviders (_bundle_10.js?hash=bdb8b91ac2da4b9591ee94e2f0737aef:49)
    at init (_bundle_10.js?hash=bdb8b91ac2da4b9591ee94e2f0737aef:49)
    at initDataStorage (_bundle_10.js?hash=bdb8b91ac2da4b9591ee94e2f0737aef:45)
    at i.<anonymous> (_bundle_10.js?hash=bdb8b91ac2da4b9591ee94e2f0737aef:45)
    at e (all-combined.js:41)

 

Hi Julio,

Did you tweak any other settings in Timeline (such as adding info about other Creatio objects)? Or did any errors occur when compiling Creatio?



I have reproduced your case, but Timeline has been successfully restored after uninstalling the package. That's why we need more information to investigate this error.



I have forwarded your initial issue with Timeline to the responsible team.



Sorry for the inconvenience. 

Alexander Demidov,

Hi Alex,

 

I made a simple video of what's happening with the Marketing Timeline app from Marketplace, please see at https://share.vidyard.com/watch/JfP8dVHLKVEyXDrHcyWXq2? 

Show all comments

do u know if there is a func in Creatio where dynamic fields can show up on page , let's say if I enter number 3 , 6 text fields should show to be filled mandatory .  and If I enter 2 , 4 fields to show up . and if I enter 1 , only 2 fields will show up . 

Like 0

Like

3 comments

Dear Shailey,

 

You can add several business rules that will show fields on the page according to the value within the field. Amount of rules will be the same as maximum number that can be entered in the field. 

 

Best regards,

Angela

Thanks Anagela , I somehow was expecting this business rule , but incase a max num in the field is not defined , how can this situation be handled?

Shailey,

But what if user inputs value "100" or "1000" in it? Will you expect the system to show that many fields? Also, even if fields are shown and hidden via code they still must be present in the object so the values could be saved in the system. This could be done via code, but adding an unknown amount of virtuals fields to the system could be challenging task. 

 

Best regards,

Angela

Show all comments

Hi Community,

 

I am trying to update the fields for my section called payment request. Please see the code below 

 

this.showInformatinDialog(result.success + "\n" + result.message); // for checking the status of update query execution

 

I am getting false for result.success. Please see the below screenshot.

 

I wrote the same code for other sections and it working fine for all other sections.

 

Please help me with this.

 

Many Thank.

 

Akshit.

 

Like 0

Like

2 comments

First, I believe that the response includes response.errorInfo which you can check for any error messages. Second, if you look in the browser dev tools in the network tab, you should see the request there and you can look at the response to see if any messages provide any insight as to what is happening (as well as any errors in the console). Start there to see if there is any indication of what is going wrong. Nothing sticks out as incorrect in the code at first glance.

Ryan

Hi Akshit, 

 

Please review Ryan's reply above and debug the code firstly. Please check if specific requests sent in the network tab return any errors and also check for the result from the debugger. 

 

Regards, 

Anastasiia

Show all comments

Hello,

I need to change the Activity calendar display so that the calendar entry shows me additional information in the description of the activity. Also I am looking for a way to change the color of the calendar entry based on some conditions. Which modules should I look for to be able to customize these features?

Like 0

Like

1 comments

Hi All,

 

I have a use case to display a field containing values updating dynamically by querying the data from another table. And display the data in the calendar section page container similar to setup up the summary calculation.

 





Similar to the below image which shows total number of products and total cost in order page.

I need to implement this functionality in the calendar section page by calculating the value from another table (say, any integer field in Contact section).



How to implement this functionality?



Regards,

Adharsh S



 

Like 0

Like

3 comments

Hello Adharsh,

 

You need to add label control element to "SeparateModeActionButtonsRightContainer" container in ActivitySectionV2 and define logic to calculate its value.

 

Best regards,

Bogdan S.

 

 

Bogdan Spasibov,



When I tried with "SeparateModeActionButtonsRightContainer" . 

Since I have more buttons in that container, it getting overflowed. I need to create this label near the Tag in the filterContainer. When I tried to add in the "FiltersContainer". Its getting hidden as shown below. Can you help me with it, by showing the label in the filtercontainer?





 

Hi Adharsh,

 

It seems that your issue is that you are trying to occupy the space already reserved for the out-of-the-box filter module, so your fields are pushed out of its container. Please read my message here about this block: 

 

https://community.creatio.com/questions/fixed-filter-blocking-multiple-…

 

You can use the same strategy, but, as I've mentioned in my message, Creatio R&D team highly disrecommend our clients affecting this part of the system somehow. 

 

Instead, you can easily set your fields under the filter container. Here is the code example of how you can do it:

 

define("ActivitySectionV2", [],
  function() {
    return {
      entitySchemaName: "Activity",
      messages: {},
      attributes: {
        "MyField1": {
          dataValueType: Terrasoft.DataValueType.TEXT,
          type: Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,
          value: "MyField1Value"
        },
        "MyField2": {
          dataValueType: Terrasoft.DataValueType.TEXT,
          type: Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,
          value: "MyField2Value"
        }
      },
      methods: {},
      diff: [{
        "operation": "insert",
        "parentName": "FiltersContainer",
        "propertyName": "items",
        "name": "MyContainer",
        "values": {
          "itemType": Terrasoft.ViewItemType.CONTAINER,
          "id": "MyContainer",
          "wrapClass": ["filter-inner-container", "custom-filter-button-container"],
          "items": [{
              "name": "MyField1",
              "bindTo": "MyField1",
              "caption": "MyCaption1"
            },
            {
              "name": "MyField2",
              "bindTo": "MyField2",
              "caption": "MyCaption2"
            }
 
          ]
        }
      }]
    };
  });

 

Regards,

Anastasiia

 

Show all comments

HI team,

 

I want to filter the Action option based on 3 conditions and I implemented it on the trial instance, it was working as expected using the below code.

 

But when we moved it to the Local Development environment then we are not getting the desired output 

when I checked we are getting Activerowid only on local development instance

 

var status=selectedOrder.get("UsrPOStatusNew");

              var statusordertype=selectedOrder.get("UsrOrderType");

              var vendorcode=selectedOrder.get("UsrVendorGSTStateCode");

               var statecode=selectedOrder.get("UsrBillToGSTStateCode");

 

these fields return an empty or undefined value 

Someone please suggest a solution or workaround

 

Thanks a lot 

 

 

define("UsrCondition631066a3Section", ["ProcessModuleUtilities"], function(ProcessModuleUtilities) {

    return {

        entitySchemaName: "UsrCondition",

        details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,

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

        methods: {

          

           isRunning: function(activeRowId) {

                // Getting the section list view data collection. 

                var gridData = this.get("GridData");

             var selectedOrder = gridData.get(activeRowId);

                // Getting the selected order model accroding to the indicated primary column value. 

                var status=selectedOrder.get("UsrPOStatusNew");

              var statusordertype=selectedOrder.get("UsrOrderType");

              var vendorcode=selectedOrder.get("UsrVendorGSTStateCode");

               var statecode=selectedOrder.get("UsrBillToGSTStateCode");

             //this.showInformationDialog(status.displayValue);

             //this.showInformationDialog(statecode);

             this.showInformationDialog(status.displayValue);

             if(status.displayValue === "Approved" && statusordertype.displayValue==="Purchase Order" && vendorcode===statecode)

               {

                 return true;

               }

             else

               

                return false;

            },

          

           isRunning1: function(activeRowId) {

                // Getting the section list view data collection. 

                var gridData = this.get("GridData");

             var selectedOrder = gridData.get(activeRowId);

                // Getting the selected order model accroding to the indicated primary column value. 

                var status=selectedOrder.get("UsrPOStatusNew");

              var statusordertype=selectedOrder.get("UsrOrderType");

              var vendorcode=selectedOrder.get("UsrVendorGSTStateCode");

               var statecode=selectedOrder.get("UsrBillToGSTStateCode");

             //this.showInformationDialog(status.displayValue);

             //this.showInformationDialog(statecode);

             if(status.displayValue === "Approved" && statusordertype.displayValue==="Purchase Order" && vendorcode!==statecode)

               {

                 return true;

               }

             else

               

                return false;

            },

          isRunning2: function(activeRowId) {

                // Getting the section list view data collection. 

                var gridData = this.get("GridData");

             var selectedOrder = gridData.get(activeRowId);

                // Getting the selected order model accroding to the indicated primary column value. 

                var status=selectedOrder.get("UsrPOStatusNew");

              var statusordertype=selectedOrder.get("UsrOrderType");

              var vendorcode=selectedOrder.get("UsrVendorGSTStateCode");

               var statecode=selectedOrder.get("UsrBillToGSTStateCode");

             //this.showInformationDialog(status.displayValue);

             //this.showInformationDialog(statecode);

             if(status.displayValue === "Approved" && statusordertype.displayValue==="Work Order" && vendorcode!==statecode)

               {

                 return true;

               }

             else

               

                return false;

            },

          isRunning3: function(activeRowId) {

                // Getting the section list view data collection. 

                var gridData = this.get("GridData");

             var selectedOrder = gridData.get(activeRowId);

                // Getting the selected order model accroding to the indicated primary column value. 

                var status=selectedOrder.get("UsrPOStatusNew");

              var statusordertype=selectedOrder.get("UsrOrderType");

              var vendorcode=selectedOrder.get("UsrVendorGSTStateCode");

               var statecode=selectedOrder.get("UsrBillToGSTStateCode");

             //this.showInformationDialog(status.displayValue);

             //this.showInformationDialog(statecode);

             if(status.displayValue === "Approved" && statusordertype.displayValue==="Work Order" && vendorcode===statecode)

               {

                 return true;

               }

             else

               

                return false;

            },

          

            // Determines if the menu option is enabled. 

            isCustomActionEnabled: function() {

                // Attempt of getting the active (list selected) record identifier. 

                var activeRowId = this.get("ActiveRow");

              

                // If the identifier is determined and the order status is 

                // [In Progress], it gets true, otherwise - it gets false.

                return activeRowId ? this.isRunning(activeRowId) : false;

            },

             isCustomActionEnabled1: function() {

                // Attempt of getting the active (list selected) record identifier. 

                var activeRowId = this.get("ActiveRow");

              

                // If the identifier is determined and the order status is 

                // [In Progress], it gets true, otherwise - it gets false.

                return activeRowId ? this.isRunning1(activeRowId) : false;

            },

          isCustomActionEnabled2: function() {

                // Attempt of getting the active (list selected) record identifier. 

                var activeRowId = this.get("ActiveRow");

              

                // If the identifier is determined and the order status is 

                // [In Progress], it gets true, otherwise - it gets false.

                return activeRowId ? this.isRunning2(activeRowId) : false;

            },

          isCustomActionEnabled3: function() {

                // Attempt of getting the active (list selected) record identifier. 

                var activeRowId = this.get("ActiveRow");

              

                // If the identifier is determined and the order status is 

                // [In Progress], it gets true, otherwise - it gets false.

                return activeRowId ? this.isRunning3(activeRowId) : false;

            },

            // Action handler method. Displays the order creation date in the message window. 

            showOrderInfo: function() {

                var activeRowId = this.get("ActiveRow");

                var gridData = this.get("GridData");

                // Getting the order creation date. The column must be added to the list. 

               // var dueDate = gridData.get(activeRowId).get("Date");

                // Message window display.

                //this.showInformationDialog("hello");

              

                var args = {

        // Name of the process that should be run.

                 sysProcessName: "UsrProcess_44f0ffe",

                parameters:

                {

                  ProcessSchemaParameter1 : activeRowId

                 }

        // Object with the value of ContractParameter input parameter for CustomProcess parameter.

               };

              //this.showInformationDialog("hello1");

        // Running of user business process.

             ProcessModuleUtilities.executeProcess(args);

              //this.showInformationDialog("hello2");

              

              

            },

            // Overriding the base virtual method that gets the section action collection. 

            getSectionActions: function() {

                // Calling of the method parent implementation for getting the 

                //  initiated action collection of the section. 

                var actionMenuItems = this.callParent(arguments);

                // Adding a separator line.

                actionMenuItems.addItem(this.getButtonMenuItem({

                    Type: "Terrasoft.MenuSeparator",

                    Caption: ""

                }));

                // Adding a menu option to the section action list. 

                actionMenuItems.addItem(this.getButtonMenuItem({

                    // Linking the menu option title to the schema localized string.

                    "Caption": {bindTo: "Resources.Strings.purchaseActionCaptionIGST"},

                    // Action handler method linking. 

                    "Click": {bindTo: "showOrderInfo"},

                    // Linking of the menu option enabling property to the value that gets the isCustomActionEnabled method.

                    "Enabled": {bindTo: "isCustomActionEnabled"},

                   "Visible": {bindTo: "isCustomActionEnabled"}

                }));

               actionMenuItems.addItem(this.getButtonMenuItem({

                    // Linking the menu option title to the schema localized string.

                    "Caption": {bindTo: "Resources.Strings.purchaseActionCaptionCGSTSGST"},

                    // Action handler method linking. 

                    "Click": {bindTo: "showOrderInfo"},

                    // Linking of the menu option enabling property to the value that gets the isCustomActionEnabled method.

                    "Enabled": {bindTo: "isCustomActionEnabled1"},

                 "Visible": {bindTo: "isCustomActionEnabled1"}

                }));

               actionMenuItems.addItem(this.getButtonMenuItem({

                    // Linking the menu option title to the schema localized string.

                    "Caption": {bindTo: "Resources.Strings.WorkActionCaptionCGSTSGST"},

                    // Action handler method linking. 

                    "Click": {bindTo: "showOrderInfo"},

                    // Linking of the menu option enabling property to the value that gets the isCustomActionEnabled method.

                    "Enabled": {bindTo: "isCustomActionEnabled2"},

                 "Visible": {bindTo: "isCustomActionEnabled2"}

                }));

               actionMenuItems.addItem(this.getButtonMenuItem({

                    // Linking the menu option title to the schema localized string.

                    "Caption": {bindTo: "Resources.Strings.WorkActionCaptionIGST"},

                    // Action handler method linking. 

                    "Click": {bindTo: "showOrderInfo"},

                    // Linking of the menu option enabling property to the value that gets the isCustomActionEnabled method.

                    "Enabled": {bindTo: "isCustomActionEnabled3"},

                     "Visible": {bindTo: "isCustomActionEnabled3"}

                }));

                // Getting the appended section action collection.

                return actionMenuItems;

            }

          

        }

    };

});

 

Like 1

Like

2 comments
Best reply

The difference between your trial and your local instance (and why it isn't working in your local instance) is likely because of a difference in the section list layout (the columns added to the list). In order for a field you're using to be available as a part of GridData, it needs to exist in the ESQ behind the list, meaning it needs to be in the column layout - or you need to add the column to the list ESQ. For example, you're using the column "UsrPOStatusNew" from the GridData. If the UsrPOStatusNew column doesn't exist in the list ESQ (which it only will if it's in the column layout for the list), it won't be available. You can add this column and any other column you'll need to access in the section code by adding it to the list ESQ like this:

initQueryColumns: function(esq) {
    this.callParent(arguments);
 
    if (!esq.columns.contains("UsrPOStatusNew")) {
        esq.addColumn("UsrPOStatusNew");
    }
}

Now, when you need to access the UsrPOStatusNew column, it will be available in the GridData. I picked UsrPOStatusNew out of your code as an example, add any other fields you'll need to access in the section code using the same as above.

Ryan

The difference between your trial and your local instance (and why it isn't working in your local instance) is likely because of a difference in the section list layout (the columns added to the list). In order for a field you're using to be available as a part of GridData, it needs to exist in the ESQ behind the list, meaning it needs to be in the column layout - or you need to add the column to the list ESQ. For example, you're using the column "UsrPOStatusNew" from the GridData. If the UsrPOStatusNew column doesn't exist in the list ESQ (which it only will if it's in the column layout for the list), it won't be available. You can add this column and any other column you'll need to access in the section code by adding it to the list ESQ like this:

initQueryColumns: function(esq) {
    this.callParent(arguments);
 
    if (!esq.columns.contains("UsrPOStatusNew")) {
        esq.addColumn("UsrPOStatusNew");
    }
}

Now, when you need to access the UsrPOStatusNew column, it will be available in the GridData. I picked UsrPOStatusNew out of your code as an example, add any other fields you'll need to access in the section code using the same as above.

Ryan

Ryan Farley,

 

Thank You very Much ?

Show all comments