I have a task of filtering the reference field (Platform) by specific parameters in the page code. Contact-Account-Licenses-Product-Platform.
In the SQL query, it looks like this:
select "Id", "Name" from "UsrPlatformList" as "platforms"
where
exists (select * from "Product" as "product" where ("platforms"."Id")=("product"."UsrPlatformId")and
exists (select * from "UsrLicenceClient" as "license" where ("product"."Id")=("license"."UsrProductLicId")and"license"."UsrAccountId"='601cef3f-aa30-4fc0-b681-18d3e748ec65'))
I'm trying to follow this instruction, but I can't. I will be grateful for your help.
I am sincerely grateful to you. With your help, other answers in the community and articles from the Academy, I learned and managed to write this complex filter. Thank you. The code currently looks like this:
attributes:{"UsrPlatform":{"dataValueType": Terrasoft.DataValueType.LOOKUP,
"lookupListConfig":{"filter": function(){
var platformFilter =this.Ext.create("Terrasoft.FilterGroup");
var accountId =this.get("Account").value;
var licenceFilter = Terrasoft.createExistsFilter("[UsrLicenceClient:UsrProductLic].Id");
licenceFilter.subFilters.addItem(
Terrasoft.createColumnFilterWithParameter(
Terrasoft.ComparisonType.EQUAL,
"UsrAccount", accountId));
var productFilter = Terrasoft.createExistsFilter("[Product:UsrPlatform].Id", licenceFilter);
platformFilter.addItem(productFilter);return platformFilter;}}}}
You can create an exists filter by using something like the following. This example would get accounts where an activity exists with a particular owner.
// create the sub filter for the condition inside the exists
var subFilters = Terrasoft.createFilterGroup();
subFilters.addItem(Terrasoft.createColumnFilterWithParameter(Terrasoft.ComparisonType.EQUAL, "Owner", "a6b4ea0c-420c-45ab-81e7-6e76c8cc15f7"));// now create the exists filter and pass the sub filter conditions to it// note, this second param of subFilters is optional if all you want is the exists without sub conditions
var existsFilter = Terrasoft.createExistsFilter("[Activity:Account].Id", subFilters);
esq.filters.addItem(existsFilter);
I am sincerely grateful to you. With your help, other answers in the community and articles from the Academy, I learned and managed to write this complex filter. Thank you. The code currently looks like this:
attributes:{"UsrPlatform":{"dataValueType": Terrasoft.DataValueType.LOOKUP,
"lookupListConfig":{"filter": function(){
var platformFilter =this.Ext.create("Terrasoft.FilterGroup");
var accountId =this.get("Account").value;
var licenceFilter = Terrasoft.createExistsFilter("[UsrLicenceClient:UsrProductLic].Id");
licenceFilter.subFilters.addItem(
Terrasoft.createColumnFilterWithParameter(
Terrasoft.ComparisonType.EQUAL,
"UsrAccount", accountId));
var productFilter = Terrasoft.createExistsFilter("[Product:UsrPlatform].Id", licenceFilter);
platformFilter.addItem(productFilter);return platformFilter;}}}}
Is there any way to implement on a Detail Group when the user wants to Add a new record the option to choose between Add Existing & Add New?
Somethink Like when you want to add a user to a department/functional role, of course must be an add existin & add new options, I want to implemet the same on some of my details, but dont' know how
I think this is is MUST BE on bpm'online, so to avoid data duplication, for example if you're on Accounts Module and want to add a Contact, always add a new one, if it existing, bpm'online don't care about this and create a duplicate record with the obvious problems. :-(
Dear Julio, please open the code of the UsersDetailV2 schema and find how to create the functionality. All of the code is in the schema so it won't be hard to find the solution.
The fact that the functionality is missing in bpm'online is a great opportunity for you as the partner. Please feel free to create a marketplace application that will provide the described functionality.
As was mentioned previously, such functionality cannot be achieved with basic system tools but with a help of additional development.
We have registered a query for our responsible R&D team to consider implementing such functionality in the upcoming releases, but as of now there is no ETA.
I will assign this case to mentioned project to increase it's priority.