For controls added via Dataset Toolbox, access modifier is automatically set to "protected".
* Note that variables that do not have any access modifier are considered as private variables and hence they need to be made public, protected or protected internal. Make sure that there are no instance variables without any access modifier specified.
Avoid using controls that do not support visual inheritance if the form is intended to be customized. The reason is that these controls in the extended form are always read-only regardless of the access modifiers you use.
Following controls do not support visual inheritance.
Access Modifier option in the APF Refactoring tool will report private variables as a help for developers to identify them and make them "protected" or public". But in case developer decide a variable should actually be "private" and extended layers should not access it, he can move the variable to KeepPrivate region. APF Refactoring tool will ignore scanning variables residing inside KeepPrivate region. Note that "KeepPrivate" region is applicable only for variables and not for methods. Further note that even if the variable is private the access modifier has to be explicitly defined for the variables residing inside the "KeepPrivate" region.
Ex:
#region KeepPrivate
private SalArray<SalString> sRecords = new SalArray<SalString>();
#endregion
public SalArray<SalString> Records
{
get { return sRecords; }
set { sRecords = value; }
}
In certain cases where form names and names of child tables are used it may require to fetch the extended form name at runtime. In such scenarios the form name must be used with "Pal.GetActiveInstanceName"
SessionNavigate(Pal.GetActiveInstanceName("tbwAccountOverview"));
if (Ifs.Fnd.ApplicationForms.Int.QualifiedItemNameGet(this.hWndOwner)
== Pal.GetActiveInstanceName("frmAllocationPartDetails")+".tblPartDetails")
Some methods still expect the core version of the form name. Some of such methods are skipped in APF Refactoring tool when adding "Pal.GetActiveInstanceName".Ex: picTab.TabControl.TabPages.ContainsKey, picTab.FindName.
There could still be scenarios where a form name is made to use through Pal.GetActiveInstanceName by the refactoring tool but should not be used as such. Given that the particular scenario cannot be detected by the APF refactoring tool in a generic way you can prefix the relevant line with "//APFRefactoringTool.IgnoreNavigationScan". The line immediately next to this comment will not be scanned under navigation option in the APF Refactoring tool.
//APFRefactoringTool.IgnoreNavigationScan
picTab.TabSetup = picTab.TabSetup.Replace("tbwInquirySupplier", "frmInquirySupplierActivities");