Hi all,
I'm trying to add multiple fixed filters to a detail on a booking record.
Master Record = UsrBooking
Detail = UsrPayments
I would like to show all payments linked to a booking where the account type (UsrPayments.UsrAccountType) = "Coach Company" (30091a3f-b9fd-43da-a39f-e0c59402a115)
i've added the below to the booking page schema (using Add fixed filter to detail | Community Creatio) but it overwrites the link to the booking and shows only 'coach company' payments for all bookings:
details: {
"UsrCoachPaymentsDetailBooking": {
"schemaName": "UsrCoachPaymentsDetail",
"entitySchemaName": "UsrPayments",
"filter": {
"detailColumn": "UsrPaymentScheduleBooking",
"masterColumn": "Id"
},
"filterMethod": "getFilters"
}
methods: {
getFilters: function() {
var filters = new this.Terrasoft.createFilterGroup();
var AccountType = "Coach Company";
filters.add("FilterAccountType", this.Terrasoft.createColumnFilterWithParameter(
this.Terrasoft.ComparisonType.EQUAL, "UsrAccountType.Name", AccountType));
return filters;
}
},
I would like to either:
- add the result of the getFilters function to the existing filter
- include the booking filter in the getFilters function
As a bonus, I'd also like to use the Id for the AccountType instead of the name (which may be subject to change).
Any assistance would be appreciated.