Wednesday, 13 July 2016

How to customize the template for autoconfig files

First of all we need to decide which file need to be customized and if it is possible to do it

You cannot customize all AutoConfig template files. The AutoConfig template file cannot be customized if the "LOCK" keyword appears in the template file's entry in the product driver file. AutoConfig ignores custom template files that are marked with "LOCK".

For example, the following entry in /admin/driver/adtmpl.drv would prevent customization of the file adconfig.txt:
ad admin/template adconfig.txt INSTE8 /admin adconfig.txt 600 LOCK

Steps to customize the Autoconfig unlock files
1) You must be knowing the product top for the file.So Create the custom directory in $PROD_TOP/admin/template
 Example
a. mkdir $FND_TOP/admin/template/custom
b. chmod 777 $FND_TOP/admin/template/custom

2) Determine the AutoConfig template file one wants to customize:
Execute the following command to find out the corresponding AutoConfig template file for the configuration file one want to customize:

Application /bin/adtmplreport.sh contextfile= target= 
Database /appsutil/bin/adtmplreport.sh contextfile= target=

For example
$AD_TOP/bin/adtmplreport.sh contextfile=/appl/admin/.xml
target=$FND_TOP/admin/template/appsweb.cfg


The above command would return "$FND_TOP/admin/template/forms_web_1012_cfg.tmp", means
the "appsweb.cfg" file was created from the source Autoconfig template $FND_TOP/admin/template/forms_web_1012_cfg.tmp.

 3) Copy the "forms_web_1012_cfg.tmp" into custom directory created earlier  and then edit it to your requirements

a- Copy the template $FND_TOP/admin/template/forms_web_1012_cfg.tmp  to  $FND_TOP/admin/template/custom

b-  Amend this template file and then run autoconfig ensuring that all applications middle tier processes are not running prior to running autoconfig 


Some important points to remember
1) If new templates comes ,the changes would be lost.  If the patch which replaces the file runs the autoconfig,it would show any complain for new template. But if you run autoconfig manually and you have new version of customized template in admin/template,then it will complain about it

2) We can list all the customized template done through the command

$AD_TOP/bin/adtmplreport.sh contextfile= listcustom

3) Debugging customizations
 If problems arise with customizations that you implemented, it may be useful to run AutoConfig with the AutoConfig template files, ignoring any custom template files. Execute the following command:

$AD_TOP/bin/adconfig.sh -nocustom contextfile=

4) $AD_TOP/bin/adcustomizer.sh can be used to migrate the existing customization to the template. It does migrate only the Begin and end block customization

No comments:

Post a Comment