Question

In earlier versions, we used to get automatic reminders about activities (for the owner and the reporter). It does not work any longer.

Answer

This functionality can be implemented via extension of existing methods in the activity edit page schema:

methods: {
   setRemindCustom: function() {
      if (this.get("StartDate")) {
         var remindToOwnerDate = this.get("StartDate");
         remindToOwnerDate = Ext.Date.add(remindToOwnerDate, Ext.Date.MINUTE, -15);
 
         var remindToAuthorDate = this.get("StartDate");
         remindToAuthorDate = Ext.Date.add(remindToAuthorDate, Ext.Date.MINUTE, -15);
 
         this.set("RemindToOwner", true);
         this.set("RemindToAuthor", true);
         this.set("RemindToOwnerDate", remindToOwnerDate);
         this.set("RemindToAuthorDate", remindToAuthorDate);
      }
   },
   onStartDateChanged: function() {
      this.callParent(arguments);
      this.setRemindCustom();
   },
   onEntityInitialized: function() {
      this.callParent(arguments);
      if (this.isAddMode() || this.isCopyMode()) {
         if (this.get("StartDate")) {
            this.setRemindCustom();
         }
      }
   }
},

 

Like 0

Like

Share

0 comments
Show all comments

Question

We want to use a flatscreen to display dashboards, but not all dashboards are visible on the screen. How can I add automatic scrolling of a page?

Answer

You can create your own widget and describe the necessary logic in javascript language in it. Initiate it in the nit() method of the widget. Add it to the widget page.

To implement this:

1) Create a module in the configuration (do not specify the parent module) - for example, UsrDashboardHelper.

2) Save the module and reload the application.

3) Select the widget in the report edit mode.

An example of a simple widget that scrolls the report page up and down automatically every 5 seconds:

define("UsrDashboardHelper", ["ext-base", "terrasoft", "sandbox"], function(Ext, Terrasoft, sandbox) {
  var getView = function() {
    var config = {
      id: "UsrDashboardHelper",
      selectors: {
        wrapEl: "#UsrDashboardHelper"
      },
      items: []
    };
    return Ext.create("Terrasoft.Container", config);
  };
  return {
    timerId: 0,
    flag: 0,
    myTimer: function() {
      console.log("tik.");
      if (this.flag === 0) {
       window.scrollTo(0,800);
       this.flag = 1;
      } else {
       window.scrollTo(0,0);
       this.flag = 0;
      }
    },
    init: function() {
      console.log("UsrDashboardHelper init in: " + sandbox.id);
      this.timerId = setInterval(this.myTimer, 5000);
    },
    render: function(renderTo) {
      var view = getView();
      view.render(renderTo);
    },
    destroy: function() {
      console.log("UsrDashboardHelper is offline.");
      clearInterval(this.timerId);
    }
  };
});

 

Like 0

Like

Share

0 comments
Show all comments

Question

OData. How can I pass a parameter with the "null" value?

Answer

PUT http://e-podkovka:9848/0/ServiceModel/EntityDataService.svc/ContactCollection(guid'40f52013-48df-4009-b492-20794e6cb313')HTTP/1.1
Accept: application/atom+xml
Content-Type: application/atom+xml;type=entry;
Host: e-podkovka:9848
Content-Length: 448
Expect: 100-continue
Connection: Keep-Alive
Cookie: BPMSESSIONID=fahxnyitfahzhiryyqwx15fx; BPMLOADER=r543kelbmnri2mqivvfb5opj; .ASPXAUTH=8511A66857D2D6371FD2E76B7FB7EF2FADBC44C2E7E7D7B802171CDE3A12BF4DEB539193184F19DEEA2C9EF01B91DB2B7057748DB8BA843A7264501446C19936C63BD84AEC1E879AAD0FF24194163974B17967E5F9775ADFBD0020EC0E7D89D9E87259680E35183507555DCBF3824C2C25A1ADB44D502FBABF6F7037BC56A35DD574C85D74C0234159ABD87FC6A5E1E280B0F9137DF527A9A66854FE943E4B65E8B9E61AA6190FAB804970BC7B85A1B695528809C35B46D491D942FAC3ECE31635D29FB60481E852FF397F52C4F8AF42E4B8D3582293761C35A32B7F2D7F518D2D1E6F48BB7C1F54BF2EFE584D8FA84C9EA0EF97FAEAD656FCD2C0D48B81884A61EA26D21CC5ED5D96938370BC10B6CE6AEE62867690600013591F1A8D85C9C05CCC0660D6FE2254C7690FC7D4FD6CFF096DD56E98A0C42515BD19B37A25806BD619581FB6F966D30EB4E19EE03AA2D9883F2230C0221E9C3A61743F747F2307E2B5AE25; UserName=83|117|112|101|114|118|105|115|111|114
 
<?xml version="1.0" encoding="utf-8"?>
<entry xmlns="http://www.w3.org/2005/Atom">
<content type="application/xml">
<properties
xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<d:Name>New name4</d:Name>
<d:JobId m:null="true" />
</properties>
</content>
</entry>

 

Like 0

Like

Share

0 comments
Show all comments

Question

How can I add or edit a CSS  style?

Answer

To add the necessary style:

1) Create a new module. Add a css style on the Less tab. We recommend using the following structure:

body[OldUI=false][CustomUI="true"] {
    .control-width-15 .t-label {
        color: #7FFF00;
    }
}

2) Create the necessry replacing page using "Replacing client module". For example, you need to replace the BasePageV2 module. Add the module from the first step to define property of the replacing page.

Override the init() method and call the setAttributeToBody() method to add your style to the body.

define("BasePageV2", ["css!UsrBasePageV2CSS"],
    function() {
        return {
            messages: {},
            mixins: {},
            attributes: {},
            methods: {
                init: function() {
                    this.callParent(arguments);
                    this.initializeCustomCss();
                },
                initializeCustomCss: function() {
                    Terrasoft.utils.dom.setAttributeToBody("CustomUI", true);
                }
            },
            diff: /**SCHEMA_DIFF*/[]/**SCHEMA_DIFF*/
        };
});

3) Update the page

Like 0

Like

Share

0 comments
Show all comments

Symptoms

I wrote a script for autonumbering in InvoicePageV2. It works only for the Zherlygin contact, in the rest of cases the request returns as null.

Profiler data:

Object {value: "b7f3b127-51be-494e-b184-58fe18c0e781", displayValue: "Кривошеева Екатерина", primaryImageValue: "00000000-0000-0000-0000-000000000000"}
 
exec sp_executesql N' SELECT NULL [Id], NULL [UsrInvCounter], NULL [PhotoId], [Photo].[Name] [Photo.Name] FROM [dbo].[SysEmpty] [Contact] WITH(NOLOCK) LEFT OUTER JOIN [dbo].[SysImage] [Photo] WITH(NOLOCK) ON ([Photo].[Id] = [Contact].[Id]) WHERE NULL = @P1',N'@P1 uniqueidentifier',@P1='B7F3B127-51BE-494E-B184-58FE18C0E781'
 
 
 
Object {value: "410006e1-ca4e-4502-a9ec-e54d922d2c00", displayValue: "Жерлыгин Дмитрий", primaryImageValue: "00000000-0000-0000-0000-000000000000"}
 
exec sp_executesql N' SELECT [Contact].[Id] [Id], [Contact].[UsrInvCounter] [UsrInvCounter], [Contact].[PhotoId] [PhotoId], [Photo].[Name] [Photo.Name] FROM [dbo].[Contact] [Contact] WITH(NOLOCK) LEFT OUTER JOIN [dbo].[SysImage] [Photo] WITH(NOLOCK) ON ([Photo].[Id] = [Contact].[PhotoId]) WHERE [Contact].[Id] = @P1',N'@P1 uniqueidentifier',@P1='410006E1-CA4E-4502-A9EC-E54D922D2C00'

Cause

Access permissions for the [Contact] object have been distributed incorrectly.

Solution

Redistribute permissions.

Like 0

Like

Share

0 comments
Show all comments

Question

Can we create a business rule that would process column attribute modifications (e.g., the "required" checkbox) by two collumns?

Answer

Below is an example of a business rule that makes the “UsrRequired” field required for population only in case the "UsrText0" and "UsrText1" fields are unpopulated:

rules: {
    "UsrRequired": {
        BindParameterRequiredAccountByType: {
            ruleType: BusinessRuleModule.enums.RuleType.BINDPARAMETER,
            property: BusinessRuleModule.enums.Property.REQUIRED,
            logical: Terrasoft.LogicalOperatorType.AND,
            conditions: [
                {
                    leftExpression: {
                        type: BusinessRuleModule.enums.ValueType.ATTRIBUTE,
                        attribute: "UsrTest0",
                    },
                    comparisonType: Terrasoft.ComparisonType.EQUAL,
                    rightExpression: {
                        type: BusinessRuleModule.enums.ValueType.CONSTANT,
                        value: ""
                    }
                },
                {
                    leftExpression: {
                        type: BusinessRuleModule.enums.ValueType.ATTRIBUTE,
                        attribute: "UsrTest1",
                    },
                    comparisonType: Terrasoft.ComparisonType.EQUAL,
                    rightExpression: {
                        type: BusinessRuleModule.enums.ValueType.CONSTANT,
                        value: ""
                    }
                }
            ]
        }
    }
},

 

Like 0

Like

Share

0 comments
Show all comments

Question

After I add a web service, I receive the following error: "An item with the same key has already been added"  when trying to log into the configuration.

Answer

The situation might be caused by adding several source code schemas with equal namespace by a user. Delete the added service schemas from SysSchema and recompile the application by resetting:

update SysWorkspace set AssemblyData = null

 

Like 0

Like

Share

0 comments
Show all comments

Question

When selecting Account-Account interconnection, the list of interconnection types is unpopulated. Can it be connected with the fact that we have several Account types with their own pages?

Answer

Bpm'online might not be able to identify the entity to establish the interconnection with - an account or a contact. Consequently, filtering during selection of interconnection types is violated.

Please try verifying the addRelation() method in the BaseRelationshipDetailV2 schema by debugging. Most likely, the problem is in the following string:

var defaultValueColumnName = this.get("CardPageName") === "ContactPageV2" ? "ContactA" : "AccountA";

The defaultValueColumnName variable might receive an incorrect value. If this method (or any other functionality) is overridden in your configuration, it needs additional analysis. Make sure the openCardConfig object receives correct values as a result of method execution (it mainly concerns defaultValues). If this is not the case, override the method in the replacing client module for BaseRelationshipDetailV2 or AccountRelationshipDetailV2 and configure the parameters for a detail edit page correctly.

Like 0

Like

Share

0 comments
Show all comments

Question

When selecting a secton element, bpm'online cannot identify entitySchemaName - the page does not open.

Answer

The problem might be connected with the user profile.Adding or editing a record in section (e.g., adding a column in the tile view) solves the issue.

Like 0

Like

Share

0 comments
Show all comments

Question

We have detected that we can only create bpm'online users for contacts, whose [Account] fields are set to "Our company" value. But taking into consideration the company structure of our customer, we need to add users for contacts, whose account is, say, a subsidiary for "Our company". Can we include such contacts into the list of employees that pops up when adding a user?

Answer

Bpm'online staff logic should not have such restriction, the [Account] field of a contact should be populated, though. Filtering logic for the "Employees" field is set in the "PrepareEmployeeEditFilter" function of the "UserEditPage" page.

You can either edit or disable filtering that restricts contact selection.

Like 0

Like

Share

2 comments

Where can I find the "PrepareEmployeeEditFilter" function or the "UserEditPage" page? 

Hello Elwin,



Could you please elaborate on your business task? 



Best regards,

Bogdan

Show all comments