Do you know that every field that is force active will be included in the SQL when ever the BC is called? Do you often think that there is no way but to make a field force active to get its field value. I have below user properties just for these purposes.
Consider a case where you need to get a field value in Scripts of Applet. You probable wrote
var sValue = this.BusComp().GetFieldValue("Field Name");
After compiling it throws error. "Unable to get field value "Field Name". The field is inactive or does not exist" Like below:
A few people add one line before above line to avoid the error.
this.BusComp().ActivateField("Field Name");
But actually the variable sValue will not fetch the Field Value and it will be empty. Unless you execute a query, ActivateField will not fetch the field value.
Finally we give up and go to setting Force Active to the field. But wait I have an alternative.
ForceActive Control User property: Add a Control for the field to the Applet and set the User property Name= ForceActive : Value = Y and voila! You can get the field values in the script. You do not have to add the field to Web Layout.
We also have a similar user property for List Columns also. User Property Name= ForceActive : Value = Y
This will make the field to be active and added in the SQL only in this applet. I have tested this. It is working perfectly. This is a great way to avoid unnecessary performance issues. Try this!!
Consider a case where you need to get a field value in Scripts of Applet. You probable wrote
var sValue = this.BusComp().GetFieldValue("Field Name");
After compiling it throws error. "Unable to get field value "Field Name". The field is inactive or does not exist" Like below:
A few people add one line before above line to avoid the error.
this.BusComp().ActivateField("Field Name");
But actually the variable sValue will not fetch the Field Value and it will be empty. Unless you execute a query, ActivateField will not fetch the field value.
Finally we give up and go to setting Force Active to the field. But wait I have an alternative.
ForceActive Control User property: Add a Control for the field to the Applet and set the User property Name= ForceActive : Value = Y and voila! You can get the field values in the script. You do not have to add the field to Web Layout.
We also have a similar user property for List Columns also. User Property Name= ForceActive : Value = Y
This will make the field to be active and added in the SQL only in this applet. I have tested this. It is working perfectly. This is a great way to avoid unnecessary performance issues. Try this!!
Didn't work
ReplyDeleteThank you for providing good information from Kexlin
ReplyDeleteYou are in the right place for a perfect solution for any app development company in hyderabad. We are well known for delivering the best quality Mobile Application Development Solutions to our clients.