Hi Community,

Any idea in Mobile how can I add custom field in Case attachment. This custom field will be a lookup field, user is required to select value from this field before uploading the attachment. 

Like 0

Like

1 comments

Dear Fulgen,

Such business task requires advanced development in the system. We do not have a code snippet for such task, however, the algorithm for the case is the following:

1. You add a lookup filed to the CaseFile object. 

2. Add an attachment detail to the Case page via Mobile application wizard.

3. Create your custom generator for the file attachment functionality. You can take basic MobileFileAndLinksEmbeddedDetailGenerator as a reference and indicate it as a parent object for your custom schema.

4. Indicate this custom generator in the values section of detail insert diff, e.g.:

     "generator": "UsrMyControlGenerator.generateUsrMyControl",
 

5. Add filed to the case file page, make it required. You can make it required on object level, or override save method in the JS schema.

Regards,

Anastasia

Show all comments

Hi Community,

I have this scenario that I need to achieve in mobile

- In Case page I have "Department" lookup field, this "Department" lookup field is linked to "Department" object.

- "Department" object has "PrimaryContact" lookup field which is linked to "Contact" object

- Now when creating a case, once the user selects Department, the "Assignee" field should be auto populated based on the Department's PrimaryContact value.



Any idea how can i achieve this? Thanks in Advance

Like 0

Like

3 comments

Dear Fulgen, 

Please try the MUTUALFILTRATION rule in the mobile business rules from the academy page below:

https://academy.bpmonline.com/documents/technic-sdkmob/7-12/business-rules-mobile-application

Best regards, 

Dennis 

Dennis Hudson,

Thank you Dennis



Is there a way I can manipulate using esq and set the result directly to assignee field?

Dear Fulgen,

It’s possible to create a custom business rule for adding and deleting filtration. Please, use the academy article by the link below and check the second example:

https://academy.bpmonline.com/documents/technic-sdkmob/7-12/custom-business-rules-mobile-application

In order to set a query result directly to some field please use the function set(). Please feel free to read about the function in the beginning of the page from the article by the link above. Also it possible to use esq to manipulate data. Please find code example below. (Example 2)

 In order to apply the code create an empty module and insert the code to the module. Then use mobile wizard to create a replacing module of manifest and add the name of your module to attribute “PageExtensions” of corresponding page section. Please find code example below (in my case it’s section Activity, example 1).

Example 1:

{

                "SyncOptions": {

                                "SysSettingsImportConfig": [

                                                "DefaultMessageLanguage"

                                ],

                                "ModelDataImportConfig": [

                                                {

                                                                "Name": "Contact",

                                                                "SyncColumns": [

                                                                                "City"

                                                                ]

                                                },

                                                {

                                                                "Name": "City",

                                                                "SyncColumns": []

                                                },

                                                {

                                                                "Name": "SysLanguage",

                                                                "SyncColumns": []

                                                },

                                                {

                                                                "Name": "Activity",

                                                                "SyncColumns": []

                                                },

                                                {

                                                                "Name": "ActivityPriority",

                                                                "SyncColumns": []

                                                },

                                                {

                                                                "Name": "ActivityType",

                                                                "SyncColumns": []

                                                },

                                                {

                                                                "Name": "ActivityCategory",

                                                                "SyncColumns": []

                                                },

                                                {

                                                                "Name": "ActivityStatus",

                                                                "SyncColumns": []

                                                },

                                                {

                                                                "Name": "CallDirection",

                                                                "SyncColumns": []

                                                },

                                                {

                                                                "Name": "ActivityParticipant",

                                                                "SyncColumns": [

                                                                                "Activity",

                                                                                "Participant"

                                                                ]

                                                },

                                                {

                                                                "Name": "ActivityParticipantRole",

                                                                "SyncColumns": []

                                                },

                                                {

                                                                "Name": "ParticipantResponse",

                                                                "SyncColumns": []

                                                }

                                ]

                },

                "Modules": {},

                "Models": {

                                "Contact": {

                                                "RequiredModels": [

                                                                "Contact",

                                                                "City",

                                                                "SysLanguage"

                                                ],

                                                "ModelExtensions": [],

                                                "PagesExtensions": [

                                                                "MobileContactGridPageSettingsDefaultWorkplace"

                                                ]

                                },

                                "Activity": {

                                                "RequiredModels": [

                                                                "Activity",

                                                                "ActivityPriority",

                                                                "ActivityType",

                                                                "ActivityCategory",

                                                                "ActivityStatus",

                                                                "CallDirection",

                                                                "ActivityParticipant",

                                                                "Contact",

                                                                "ActivityParticipantRole",

                                                                "ParticipantResponse"

                                                ],

                                                "ModelExtensions": [],

                                                "PagesExtensions": [

                                                                "MobileActivityRecordPageSettingsDefaultWorkplace",

                                                                "UsrMobile1"(my module)

                                                ]

                                }

                }

}

Example 2:

Terrasoft.sdk.Model.addBusinessRule("Activity", {

    name: "ActivityResultByAllowedResultFilterRule",

    position: 1,

    ruleType: Terrasoft.RuleTypes.Custom,

    triggeredByColumns: ["Result"],

    events: [Terrasoft.BusinessRuleEvents.ValueChanged, Terrasoft.BusinessRuleEvents.Load],

    executeFn: function (record, rule, column, customData, callbackConfig) {

        var store = Ext.create('Terrasoft.store.BaseStore', {

    model: 'ActivityResult'

                                });

                var queryConfig = Ext.create('Terrasoft.QueryConfig', {

    columns: ['Id'],

    modelName: 'ActivityResult'

                                                });

                store.loadPage(1, {

    queryConfig: queryConfig,

    filters: Ext.create('Terrasoft.Filter', {

        property: 'Id',

        value: '6CBD22D4-F36B-1410-5E98-00155D043204'

                }),

            callback: function (records, operation, success) {

                var loadedRecord = records[0];

                var allowedResult = record.get("AllowedResult");

                var filterName = "ActivityResultByAllowedResultFilter";

                if (!Ext.isEmpty(allowedResult)) {

                    var allowedResultIds = Ext.JSON.decode(allowedResult, true);

                    var resultIdsAreCorrect = true;

                    for (var i = 0, ln = allowedResultIds.length; i < ln; i++) {

                        var item = allowedResultIds[i];

                        if (!Terrasoft.util.isGuid(item)) {

                            resultIdsAreCorrect = false;

                            break;

                        }

                    }

                    allowedResultIds.push(loadedRecord.get("Id").toUpperCase());

                    if (resultIdsAreCorrect) {

                        var filter = Ext.create("Terrasoft.Filter", {

                            name: filterName,

                            property: "Id",

                            funcType: Terrasoft.FilterFunctions.In,

                            funcArgs: allowedResultIds

                        });

                        record.changeProperty("Result", {

                            addFilter: filter

                        });

 

                    }

                    else {

                        record.changeProperty("Result", {

                            removeFilter: filterName

                        });

                    }

                } else {

                    record.changeProperty("Result", {

                        removeFilter: filterName

                    });

                }

                Ext.callback(callbackConfig.success, callbackConfig.scope, [true]);

            },

            scope: this

        });

    }

});

 

Best regards,

Norton

 

Show all comments

Hi Community,

Any idea how can i disable all tasks and notification created during lead stages?

Thanks

Like 0

Like

1 comments

Dear Fulgen,

There are a couple of processes that can create the reminders and notifications. They are: 'Lead qualification 7.8.0', 'Lead distribution 7.8.0', 'Handoff to sales 7.8.0' and 'Awaiting sale' 

All these processes are sub-processes of the parent process 'Lead management 7.8.0'

There are 2 options. You can either deactivate the parent process that runs all the sub-processes or edit all sub-processes so that the would not create any activities and reminders.

Best regards,

Dean

 

Show all comments

Hi Community,

I have a 2 workflow in case page, the first workflow will show if type is incident, the second workflow will show if type is complain.

Now here is my scenario

1. When i create a case, then select type incident the first workflow is showing - correct

2. I change the value of type from incident to complain, the workflow also changes from first workflow to second workflow - correct

But when I change again the value of type from complain to incident, the workflow is not changing anymore, until such time you reload the page. Any idea how to fix this issue?

 

 

 

Like 0

Like

1 comments

Hello Fulgen,

This is an out-of-the-box behavior of the application and we've created a problem to our R&D team so they could fix it in one of future versions of the application. This is a very interesting problem and thank you for reporting it to us. Currently we assume that it cannot be changed sine it is a hard coded behavior of the application in base schemas and fix needs to be applied by our R&D team. Once this fix is applied - we will notify all our users in Academy release notes that can be accessed here.

Thank you for helping us to make our application better!

Best regards,

Oscar

Show all comments

Hi Community,

Any idea how can i enable the status field in mobile case page. I already tried to modify the MobileCaseRecordPageSettingsDefaultWorkplace file and add enable = true under Status but still it is disabled.

 

 

Like 0

Like

6 comments

Dear Fulgen,

You do not have to modify MobileCaseRecordPageSettingsDefaultWorkplace schema. The reading mode is set up in MobileCaseModuleConfig schema. You need to modify the readOnly default value to false to make the status field editable http://prntscr.com/oby661

Best regards,

Dean

Dean Parrett,

Thanks Dean,



I am now trying to create a custom config file for mobile case which uses 

MobileCaseModuleConfig as parent in order for me to modify the readOnly property of status field, but I am getting error "Substitution of modules is not allowed".

 

Dear Fulgen,

It seems like you are trying to replace the module. It is no longer possible to do in the system.. In order to change an out-of-the-box module, please create your own module and connect it to the place where the out-of-the-box module was connected in order to force the system to use the new module instead of the old one. 

Best regards,

Dean

Dean Parrett,

Thanks Dean,

I have already created my custom usrmobilecasemoduleconfig inside this i have already set the readonly property of status field to false. In MobileApplicationManifestDefaultWorkplace i have already added the usrmobilecasemoduleconfig as part of PagesExtensions, but still the status field is disabled.



Dear Fulgen,

Have you tried to synchronize with the mobile application after schema modifications? I've modified the property so now my status can be changed. http://prntscr.com/obz6kahttp://prntscr.com/obz6ok

Dean

Dean Parrett,

Hi Dean,



After synchronize still it did not work. What I did, I compiled first the configuration the after compiling I synchronize the mobile. Now the changes I did for enabling the status field for case page is already working on mobile.



Thank you so much Dean

Show all comments



Hi,

Wich is the best way to set a Lookup for Surveys?

For example in Accounts if i need to call contacts i call the lookup named "Contact".

Regards.

Like 0

Like

1 comments

Hello Juan,

To achieve your target you need to create a lookup field on an account edit page and specify the link to an object that represents these surveys. You need to create an object for your surveys and creation of objects in the system is described in an Academy reference here. Once done you will receive a lookup for surveys.

Best regards,

Oscar

Show all comments

Hi Community,

Any idea how can I possibly achieved this scenario. I want to change the label of Approved/ Reject Button depending on the workflow bar stage:

Lets say for example if workflow bar is in Review stage i want to change the "Approve" to "Checked" and "Reject" to "Something else" 

 

 

Thanks

Like 0

Like

2 comments
Best reply

Hi, you can do a business process. Reading the approval use a conditional flow when the approval is approve you modify with the modify item the stage field to "Checked" and when is "Rejected" to Something else.

I hope i can help you!

King regards!

 

Hi, you can do a business process. Reading the approval use a conditional flow when the approval is approve you modify with the modify item the stage field to "Checked" and when is "Rejected" to Something else.

I hope i can help you!

King regards!

 

It's possible to do via js development. I hope the development guide below will help you. ApprovalDashboardItemViewModel module contains approved/reject button.

https://academy.bpmonline.com/documents/technic-sdk/7-13/bpmonline-development-guide

Show all comments

Hi, How am I able to return a value of a Lookup (the Name) using ESQ, JS? I have defined the Lookup as an attribute: "DevCertPublicationFrequency": { DataValueType: Terrasoft.DataValueType.LOOKUP, }, I have the following function: getLookupValue: function (DevCertPublicationFrequency, safe) { var column = this.columns[DevCertPublicationFrequency]; if (column && (column.isLookup || true)) { var columnValue = this.get(DevCertPublicationFrequency); this.set("DevCertPublicationFrequency", columnValue); } }, When the record is saved I want to check the value of the Lookup and call a function if the Lookup value selected prior to the save = 'Daily' Save: function() { this.callParent(arguments); this.getLookupValue(); var textmessage = "Verification will be performed"; //if periodical edition = daily then perform verification var DevCertPubFrequency = this.get("DevCertPublicationFrequency"); if (DevCertPubFrequency === "Daily") { Terrasoft.showInformation(textmessage); this.verification(); } },

Like 0

Like

1 comments

It's pretty easy to get a value from a lookup attribute using this.get("NameOfLookupAttribute"). Please debug your js code using the article below 

https://academy.bpmonline.com/documents/technic-sdk/7-13/client-code-debugging 

Show all comments

Hi,

 

Can someone please direct me to any documentation around how to add data to bpmonline when receiving the data through an API?

 

Does the JSON.NET work for bpmonline or do I have to use JavaScriptSerializer class?

Like 0

Like

1 comments

Hi aaykay

Please refer to the below link:

https://academy.bpmonline.com/documents/technic-sdk/7-13/integration-bpmonline-and-public-api

The above link will have all information related to API integration and the management of data recieved through them.

In the below link, you will specifically find how to do CRUD operations in BPMOnline objects like Contacts etc.

https://academy.bpmonline.com/documents/technic-sdk/7-13/working-bpmonline-objects-over-odata-protocol-wcf-client

Thanks

Abinaya

 

 

Show all comments

Hi Community,

Any idea how i can override the on click event of workflow bar. Lets say for example on click of 'In progress' i want to add some other logic, then based on that logic system will decide whether to allow user to proceed to 'In progress' or not. What method can I override so that i can put my custom logic ?

 

Like 0

Like

2 comments

Rather than override the click, maybe it would work to just wire up a change event on the property itself? See https://customerfx.com/article/triggering-an-event-when-a-field-is-changed-on-a-page-in-bpmonline/

Something like this:

attributes: {
  "StageChange": {
    dependencies: [{
      columns: ["Stage"]
      methodName: "onStageChange"
    }]
  }
},
 
//...
 
methods: {
  onStageChange: function() {
    // do something here or prompt user
    // if needed, revert back to previous value
  }
},

If you need to revert back to the previous value, what I would do is store the current Stage value in an attribute in the onEntityInitialized. Then you can use that to revert back if needed (and update the attribute if you do allow the change). 

The only thing that could cause issues with this approach is if there are processes or case steps that would have already fired before you revert the change. Anyway just an idea.

I didn't spend too much time looking at the Dcm mixin to override the logic there, but this approach would be easier so thought I would suggest it. Hope this helps.

Ryan

Click event of a workflow bar causes saving of a page. Before saving the page a validation happens. Please feel free to override the method asyncValidate to add a required functionality. For example: 

define("LeadPageV2", [],

    function() {

        return {

            entitySchemaName: "Lead",

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

            attributes: {},

            methods: {

                asyncValidate: function(callback, scope){

                    this.callParent([function(resultObject){

                        resultObject.success = false;

                        resultObject.message = "Your message!";

                        callback.call(scope, resultObject);

                    }], scope);

                }

            },

            diff: /**SCHEMA_DIFF*/[

            

            ]/**SCHEMA_DIFF*/,

            rules: {},

            userCode: {}

        };

    });

 

 

Show all comments