I have a freeform number field that I want to disallow certain values.

Rather than adding a validation that prevents the user from saving the page, or forces them to change the value, I would like to have the value reset automatically to something else.

I tried adding an attribute that triggers a method every time the columns is changed, but trying to change the same column inside that method causes an infinite loop.

Is there any way to get this process I want of automatically resetting a value when it is set to something "invalid"?

Like 0

Like

4 comments

Hi Jordan,

It seems like the conditions on your method are allowing that infinite loop. Make sure you are not updating the field value when a "valid" entry. This should be the end of your loop.

To contribute with more details, could you, please, provide the piece of code for the attribute and the method?

Thanks. 

Dear Jordan, 

Firstly, you need to add an if clause to you custom method, which is triggered by column change. Apply the needed condition for the column to set default value. For example,

var column = this.get("Your column");

if (column !== "some value") {

   this.set(column, "default value");

} else {

  //do other logic or return false

}

In this case you won't have a loop. If you will have any issues, you can share your code with us.

Regards,

Anastasia

Anastasia Botezat,

I'll look at my implementation again, but I tried this already and it still resulted in an infinite loop.

You can also try wiring up the blur event on the number field, then fix it to a valid value when the control is exited, rather than when changed. To wire up a blur method, just add to the diff like this: 

{
    "operation": "insert",
    ...,
    "values": {
        "blur": { "bindTo": "onMyNumberFieldExit" }
    }
}

Then, implement your logic in the onMyNumberFieldExit method, this won't have issues with an infinite loop since it won't be triggered until the user leaves the field.

Ryan

Show all comments



Hello,

We need to assign Accounts(and other related custom objects) to different groups(Organizational roles) based on a field in the Account object. The field is similar to the "Assignees Group" field in the "Case" object.

We need to do this in bulk for all the records after some data is imported. Is there a way to update the AccountAccessRights so that the access rights can be refreshed for all the Accounts at once? If there is an example somewhere we can refer to that would be helpful.

We have looked into the business process approach, but it is slow as it starts a new process for each record processed and we see thousands of backlogged processes in the system.

Thank you

Like 0

Like

1 comments

Hello,



you can create and run process like this. Don't forget to set "Maximum number of repetitions" parametr > count of your Accounts

Another method is to write Update for database table SysAccountRights



Ask for more details if you need 

Show all comments

I have problems with this Custom Lookup. I want to manage it through the pop-out window.

I have chenged the Access rights to match what I want. But the so called default page is not reacting to this at all. Do I need a custom page for New, Edit and Copy actions of the Lookup values?

How do I create a custom Lookup page? And do the New, Edit, Copy buttons require a custom lookup page?

I am having problems finding out how to do it. Even though I have done this before, I have forgotten.

I can't even find what I need in the academy. What I can't find does not seem to be enough https://academy.bpmonline.com/documents/administration/7-13/lookup-prop…

Lookup properties:

 

Like 0

Like

1 comments

Dear Julius,

The actions Edit, Copy, Delete are avaliable for those lookups, which are based on object with edit page. Therefore, in order to have such actions you need to create an edit page for your object.

In order to do so you need:

1. Create a new Schema of the Edit page View model

2. Indicate entitySchemaName property to the object of the lookup and create an edit page, you can take any other edit page as an example

3. Register your edit page in the SysModuleEdit table, where you indicate object - page relationship.

After this you will have the actions for the lookup. Another option to do so is to register a section for your custom object on which lookup is based. In this case edit page will be created automatically in the course of creating a section.

Regards,

Anastasia

Show all comments

Hi,

Due to the shared data structure between Projects and Project Tasks I am having some issues with the import process. I am just testing currently and importing around 30 tasks, with the full import to import several thousand.

During testing I found I needed a change in a mapped field and therefore my typical situation is to delete the previous import, make the adjustment and re-import.

However, I cannot find a way to list all of the project tasks to allow me to bulk delete. My concern is that if I encounter an issue when doing the full import I cannot roll back easily.

thanks in advance for any help.

Mark

Like 0

Like

5 comments

Dear Mark,

All imported records are marked with the import tag, thus you may create a process which will find all imported records and delete them with Delete element. 

Best regards,

Angela

Hi Angela

Thanks for your reply. I have been working through the various sections; Accounts, Opps, Contacts etc. performing data import testing, before we do our full CRM migration. As part of this process, sometimes I find issues with the import and will use the import tag to select the imported records, delete them and re-import once resolved data issue.

However, with Project Tasks I cannot find a clean listing display. It is OK if a project task is not associated with a Project, as that will be listed in the default Project list. Where a project task is associated with a project, it is therefore displayed within a Project in the Task detail tab.

I cannot find anywhere to list all project tasks by import tag to allow such a deletion. Does such a place exist?

thanks

Mark

Mark Roberts,

Project task is a record that can be found in project section. Basically, project ask is an entity of project. 

Best regards,

Angela

Hi

Thanks for your reply Angela. However, I still cannot see a way to list JUST the project tasks.

When I go to Projects, it is just projects displayed and not a list of project tasks. My issue is that when importing complex data, I need a way to undo that import if I find an issue with it and for all other areas I can simply use the tag to select the import data and delete all the records.

If you are able to provide a step by step way to list all project tasks, that would be great!

thanks

Mark Roberts,

You may create lookup based on object "Item of project task resources" to see them separately. 

Best regards,

Angela

Show all comments

Hi, 

Based on the previous questions on the same subject in community we have an assumption that calculated fields on Word printables is not supported. 

A workaround would be to have the calculated fields in the entity (Account, Order) itself and compute the values of these calculated fields on certain events with a business process. However, this will result in the business process to be triggered repeatedly just for computation of these calculated fields and may have performance implications.

An alternate would be to compute the values of this printable fields when the user clicks on the Print button, because that is when the computed fields will actually be used. 

Is it possible to override the print button action (in PrintReportUtitlies mixin), and add a custom function call before the printable is processed. If so, can we have details of how to override the "Print" button action?

Regards,

Hatim

Like 0

Like

2 comments

It is possible to create custom macros in C# and use them in Word printables. This might solve your need to do the calculations this way. 

See https://academy.bpmonline.com/documents/technic-sdk/7-13/how-create-mac…

Ryan

Dear Hatim,

Ryan is absolutely right, you can try using custom macros to perform calculations and set the value directly to the printable in case you don't want to use business process for calculations. Also I can add that we have this problem registered on our side regarding automatic calculations and using of formulas in printables and I will inform our R&D team about this community question so to raise the priority of the problem. You can also create a separate object in the database that will store calculated data there and you can use this object in printable so to get calculated data there. Thank you for helping us to make our application better!

Best regards,

Oscar

Show all comments

Hi All

 

I have a function that is triggered when Account is changed on Lead.

I use the common code for getting query results:

var recordId = this.get("Id");
var esq = this.Ext.create("Terrasoft.EntitySchemaQuery", {
    rootSchemaName: "Lead"

and the code to get my query resluts:

esq.getEntity(recordId, function(result) {}

It works fine but not before save.

Before save I bbelieve I don't have the recordId yet and this is why I can't get query results.

Any ideas?

Maybe there is a way to use the Id of the account that was chosen in the lookup and use it ?

Thanks

 

Like 0

Like

5 comments

Dear Oren,

The schema responsible for account in lead section is "LeadAccountProfileSchema". It inherits from "BaseProfileSchema". There is method onLookupResult(), which contains info about selected new account.

You can override this method in the replacing "LeadAccountProfileSchema" module. You can retrieve the new account id like this: selectedRows.getByIndex(0).Id.

Hope you find it helpful!

Regards,

Anastasia

Anastasia Botezat,

Thanks Anastasia

The method "onLookupResult" indid works when new account is selected.

Can you be more specific about getting the account Id ?

If for example I want to query information from the account table, should I use it like this?:

 

var recordId = selectedRows.getByIndex(0).Id;

    

var esq = this.Ext.create("Terrasoft.EntitySchemaQuery", {

                    rootSchemaName: "Account"

                    });

esq.getEntity(recordId, function(result){}

Dear Oren,

You can create a custom method, which will contain your ESQ to Account. In the onLookupResult() method, where you retrieve the id you can call custom function with ESQ and pass the retrieved Id as an argument to that method and then use it in the function to set ESQ filter.

onLookupResult: function() {
 //basic logic
 var accId = selectedRows.getByIndex(0).Id;
 this.customESQAccount(accId);
}

 

Regards,

Anastasia

Thanks again Anastasia

There is a problem with your code.

Code Validation says:

selectedRows is not defined

I need to get the Account Id but please note that all is happening before save so I don't have the Lead record Id yet.

How can I get the selected Account Id ?

Oren Diga,

found it.

To acess the lookup value I used the get method as follows:

var recordId = this.get("Account").Id

Show all comments

Hello Community!

Is it possible to get all record in editable detail and set it to parent page column, when added new record or modified record in "Transportasi Perjalanan Dinas" detail.

is there any example how to do that using the javascript on parent page?

Regards,

Like 0

Like

1 comments

Details communicate with their main pages via "messages". Please read more about messages in the article by the link below. 

https://academy.bpmonline.com/documents/technic-sdk/7-13/messages-messa…

Show all comments

Hello,

I have a collection of OpportunityProductInterest objects on a quote, and I would like to immediately call a method of the OpportunityProductInterest class for each of them (to update price and discount information) when I change a particular field on the parent quote.

I have tried using messaging for this, but the broadcast message I send from the Quote object doesn't appear to be received.  Is there a more direct way of calling a method from each instance of a child object, or is there a way to make messaging work for this purpose?

Thank you.

Like 0

Like

6 comments

It's hard to understand what exactly you want to achieve. If you want to update all records after saving, then it's better to use a business process. If you want to update all records after changing a value in a field, then you need to use "dependencies of the calculated field", the "messages" property and the EntitySchemaQuery implementation on client. If you want to calculate all records separately it's better to write a web service. Anyway the task is not clear.

Eugene Podkovka,

The second, more or less.  I received some help from another source earlier and have the basic mechanics set up; however, it seems that the onEntityInitialized function is not being called on the detail object.  (I've put in debugger; and console.log(); statements to confirm, and neither shows up from that function in this object despite working in others.)

Is onEntityInitialized not called from a data grid, or is there another reason?  Is there somewhere else I could register the message, or do I need to update the records manually using an EntitySchemaQuery?

Darian Lewis,

Depends on the moment when you need to run the method. Anyway you still don't explain the task so it's not possible to help you. Please investigate the parents of the detail schema and debug all methods. This way you'll find the one that matches your needs. 

Eugene Podkovka,

Very well, then, in more detail:

We have a labQuote object, which contains a Price List column.  The page for quotes contains a detail showing a data grid of OpportunityProductInterest objects, these being the products on the quote.

Both the price and discount values of each product vary based on the price list of the parent quote; these values are calculated by a method of the OpportunityProductPageV2 object that is called when a Product is selected from the lookup in the data grid.  This part works fine.

What I wish to do is have these values recalculated if the user changes the Price List value of an open Quote, ideally immediately so that the user can see the effect of their changes.  Is it possible to do this through a method of the OpportunityProductPageV2 schema (i.e. the detail object), or is it necessary to make the changes from the quote (i.e. the parent object) manually using an EntitySchemaQuery?

Darian Lewis,

I recommend to create a web service that calculates the needed value for a single record. Additionally the service should be able to update a group of records using a server side EntitySchemaQuery. On the OpportunityProductPageV2 I recommend calling the service and setting up the value on a callback. This way you'll be able to update the product price in run time on the opportunity product page. 

If you need to update a group of records, then you call the same service and then call the reloadDetail (basepagev2) method on the service callback. 

Thank you.

Show all comments

Hi.

Does anyone know how to make calculations on printable?

I need to calculate the Net Total for each product.

 

Thank you

Like 0

Like

1 comments

Dear Andressa,

Unfortunately as for now there is no way to use formulas in printables and we have a correspondent problem registered for our R&D team. I will notify them about your question so to raise the priority of this problem. Thank you for helping us to make our application better.

As for now you can try using this marketplace application that can fit your needs https://marketplace.bpmonline.com/app/excel-reports-builder-bpmonline.

Best regards,

Oscar

Show all comments

Hi

I am looking to import data into the Opportunities, which has an issue. I have a Section Detail which I am using to store a list of team members. I wish to import the opportunity data and populate this Team Member section with data. I pretty much on the current import data set only have 1 contact value to import.

I do not see how I can map the data from the Excel file to allow a data entry to import a single (or indeed multiple) value into a Section Detail. 

Is this possible and if so, how can I do this?

Like 0

Like

4 comments

Dear Mark,

As for now there is no such functionality, but I'll inform our R&D team about this issue and suggest them to implement it. Thank you for helping us to make our application better.

Best regards,

Angela

As a workaround you can import opportunities you wanted and then import team members into created opportunities. 

Best regards,

Angela

Hi Angela,

Since I posted, I have found that the process is to import the root data, in this example Opportunities and then do a separate import into the sub section detail. For this, it is necessary to know the name as it exists in the database, as this can be confusing to identify.

Click on the 3 dots by the section details title and choose Details to identify the database naming.

Mark Roberts,

You may also use "Data Import" button in the detail: 

http://prntscr.com/mahi27

Show all comments