Hey,
I'm working on Contact Entity where I have to show 'Total Concerts' bound to a contact in detail page.
I have created a service file from where I'm getting total concerts data. I'm calling this service file as API in handler method: 'HandleViewModelInitRequest'. API is working fine & responding with expected result. For now, I'm assigning the total length of concerts to column directly.
(Field Configuration)
(Handler Method)
Query:
1. when 'Total Concerts' value is changed, creatio ask user to save this record. But I don't want to store the result in db but want to show only on UI.
2. Don't want to create new column in Contact Entity as I don't need to store value.
Is there any way I can use to tackle above problem? Additionally, I used attributes but didn't work or maybe I could not implement properly.
Platform: Creatio:Energy 8.2v (Freedom UI)
Like
If you only want to display that value, and not save with the record, you can create an attribute on the page, store the value there, and then bind the attribute to the control on the page. See https://customerfx.com/article/using-custom-attributes-on-a-creatio-freedom-ui-page/
To bind the control to the attribute, you'd modify the control to use "$AttributeNameHere" (bind to the attribute by prefixing with a "$"). Doing it this way, won't trigger a save since it's not part of the record/model.
Ryan
If you only want to display that value, and not save with the record, you can create an attribute on the page, store the value there, and then bind the attribute to the control on the page. See https://customerfx.com/article/using-custom-attributes-on-a-creatio-freedom-ui-page/
To bind the control to the attribute, you'd modify the control to use "$AttributeNameHere" (bind to the attribute by prefixing with a "$"). Doing it this way, won't trigger a save since it's not part of the record/model.
Ryan
Thanks Sir, for your solution.
But there is a confusion that is I have to create a new field in Contact Entity to show total no of concerts. This field will be created in Contact table in Creatio DB as well.
Is there any way to avoid creation of a new column in the database while still showing the total number of concerts?
Not sure I follow complete, but for this:
Is there any way to avoid creation of a new column in the database while still showing the total number of concerts?
Using an attribute, you don't need the field in the Contact object/database since it would just display the value of the attribute.
Another way to display this without a field in the database would be to use a metric on the page.