Время создания
Filters

Hi Community,

 

We are inserting records in GivenName and Surname fields in Contact Table via API. We are seeing full name in the Name field in UI (which is a concatenation of GivenName and Surname), but the GivenName and Surname fields are blank. How can we get GivenName and Surname to display values?

 

Thanks

Like 0

Like

0 comments
Show all comments

How to hide Canceled and Closed cases in Agent Desktop?
https://i.imgur.com/uGPHS3Z.png

 

This is the queue config: https://i.imgur.com/LibhjZ3.png

Like 0

Like

0 comments
Show all comments

Hi Community, 

 

I have written a business rule that, when a boolean field has been set to true in the mobile app, stores the current timestamp in another separate date/time field: 

 

Terrasoft.sdk.Model.addBusinessRule("Activity", {
    name: "SetTimestampOnCheckForTriggeredField",
    ruleType: Terrasoft.RuleTypes.Custom,
    triggeredByColumns: [
        "InnEndSiteVisitCheck", "InnEndTravelInCheck", "InnEndTravelOutCheck",
        "InnStartSiteVisitCheck", "InnStartTravelInCheck", "InnStartTravelOutCheck"
    ],
    events: [Terrasoft.BusinessRuleEvents.ValueChanged],
 
    executeFn: function(record, rule, column, customData, callbackConfig) {
        // Mapping of boolean fields to their corresponding date-time fields
        var fieldMapping = {
            "InnEndSiteVisitCheck": "InnEndSiteVisitTime",
            "InnEndTravelInCheck": "InnEndTravelInTime",
            "InnEndTravelOutCheck": "InnEndTravelOutTime",
            "InnStartSiteVisitCheck": "InnStartSiteVisitTime",
            "InnStartTravelInCheck": "InnStartTravelInTime",
            "InnStartTravelOutCheck": "InnStartTravelOutTime"
        };
 
        // Get the boolean value of the triggered field
        var isCheckTrue = record.get(column);
 
        // Check if the boolean field is true
        if (isCheckTrue && fieldMapping[column]) {
            // Set the corresponding date-time field to the current date/time
            var currentDateTime = new Date();
            record.set(fieldMapping[column], currentDateTime);
        }
 
        // Asynchronous callback to indicate the rule has been processed
        Ext.callback(callbackConfig.success, callbackConfig.scope, [true]);
    }
});

 

I now want to be able to show a warning message that gives an option to 'cancel' or 'confirm' when a user attempts to set one of these booleans to false. 

 

The box would need to be shown after an attempt to change the booleans value, halting this action until confirmed  - if the action is not prevented before confirmation and the 'cancel' option merely reverts the boolean to being true, the old timestamp would be lost with the new value being representative of the time of cancellation (which is not what I desire).

 

The following post presents a similar requirement: Pop-up with options in mobile application | Community Creatio

 

However, guidance given points to a push notification (which I can't envision helping as I require an option in the app that temporarily halts the setting of the boolean to false), or to use Terrasoft.MessageBox.showMessage, which from what I can tell can only produce a message box (no option to cancel or confirm). 

 

I have also thought about writing individual rules that set each field to be disabled once it has been checked:

 

// Disable the InnEndSiteVisitCheck field after it is checked
Terrasoft.sdk.Model.addBusinessRule("Activity", {
    name: "DisableInnEndSiteVisitCheck",
    ruleType: Terrasoft.RuleTypes.Activation,
    triggeredByColumns: ["InnEndSiteVisitCheck"],
    events: [Terrasoft.BusinessRuleEvents.Load, Terrasoft.BusinessRuleEvents.ValueChanged],
    conditionalColumns: [
        { name: "InnEndSiteVisitCheck", value: true }
    ],
    dependentColumnNames: ["InnEndSiteVisitCheck"]
});

 

However, this is not as flexible as I would want as users may set field values to true by mistake. Even then, the rule I have written does not seem to work as I get a server error when syncing in the mobile app after adding it - perhaps this is because two rules are initiated by the same event? 

Any help on this would be greatly appreciated, thanks in advance!

Like 0

Like

0 comments
Show all comments

I'm trying to filter records of one list by the selection from the other. The example is:

 

I have a Contract record. On the Contract record I added an Invoice list (related to Contract). Under the Invoice list I have a list of Invoice Items (related to Contract and to Invoice, each Invoice can have multiple Invoice Items).

 

I added a checkbox "Selected" on the Invoice and wanted to do it that way, that user clicks "Selected" on the Invoice and saves the record, and then the Invoice Item list is filtered by the Invoice, which has the Selected flag set to True. This doesn't work, system says the query failed, plus when I add "Selected" flag on Invoice Item list (from related invoice record) it's never selected (although on Invoice it is).

 

Do you have any other ideas on how to enable user to see on one page the invoice items for the invoice they select? I tried it with quick filter as well, but I cannot seem to make a filter to show only the invoices related to the opened contract.

 

Like 0

Like

0 comments
Show all comments

Hi,

I performed a test load of 30 records into the Account addresses object, the first 30 records were imported but when attempting to re-import those records, the wizard returns this error: 

Column CountryName value cannot be obtained because it has not been loaded.

When i checked the values in the Country lookup, the values its rejecting are already loaded in the lookup, so it doesn't make sense that its saying its not loaded. There maybe something i'm missing here and i would love to know if anyone has experienced this issue in the past. 

Thanks!

Like 0

Like

0 comments
Show all comments