On Thu, Aug 4, 2011 at 1:30 AM, Adarsh Sharma <ada...@or...>wrote:
> Iuri Sampaio wrote:
>
>>
>> I am not aware of any documentation that contains the specific information
>> you required. e.g. (tables associated with particular modules)
>>
>> There are two places you can check regarding company fields
>> 1) See if company short name is a "dynfield attribute" for object_type
>> im_company. If so you have to disable or delete it.
>>
> Thanks Iuri, Company Short name is not the dynamic field.
> Attached image clearifies that.
>
>
You're right. Short name isn't a dynfield attribute for im_company
>> 2) Probably you won't need to go this further. But if so then you've got
>> errors regarding the field you remove moreover you need to go to the code
>> (i.e. /packages/intranet/companies/**new.adp/tcl/xql) to fix the
>> references to company short name.
>>
>> Now the new.adp file is a file . I cannot able to locate tcl/xql.
> Please check the attached image too.
>
>
>
I don't understand what you really meant. The file new.tcl and new-2.xql are
there, within the directory /packages/intranet/companies/
You must debug new.tcl and find where the company short name is referenced
in the code.
The field is right there
{company_path:text(text) {label "[_ intranet-core.Company_Short_Name]"} {
html {size 40}}}141<https://seed1.projectlocker.com/cognovis/projop/trac/browser/packages/intranet-core/www/companies/new.tcl#L141>
It is a required field and you have to pass it through to insert the company
information properly. If you don't, it would throw out errors because the
column in the table im_companies company path is mandatory (not null) . Look
at packages/intranet/sql/postgresql/intranet-companies.sql
create table im_companies
(58<https://seed1.projectlocker.com/cognovis/projop/trac/browser/packages/intranet-core/sql/postgresql/intranet-companies.sql#L58>
company_id
integer59<https://seed1.projectlocker.com/cognovis/projop/trac/browser/packages/intranet-core/sql/postgresql/intranet-companies.sql#L59>
constraint
im_companies_pk60<https://seed1.projectlocker.com/cognovis/projop/trac/browser/packages/intranet-core/sql/postgresql/intranet-companies.sql#L60>
primary key
61<https://seed1.projectlocker.com/cognovis/projop/trac/browser/packages/intranet-core/sql/postgresql/intranet-companies.sql#L61>
constraint
im_companies_cust_id_fk62<https://seed1.projectlocker.com/cognovis/projop/trac/browser/packages/intranet-core/sql/postgresql/intranet-companies.sql#L62>
references
acs_objects,63<https://seed1.projectlocker.com/cognovis/projop/trac/browser/packages/intranet-core/sql/postgresql/intranet-companies.sql#L63>
company_name varchar(1000) not
null64<https://seed1.projectlocker.com/cognovis/projop/trac/browser/packages/intranet-core/sql/postgresql/intranet-companies.sql#L64>
constraint im_companies_name_un unique
,65<https://seed1.projectlocker.com/cognovis/projop/trac/browser/packages/intranet-core/sql/postgresql/intranet-companies.sql#L65>
-- where are the files in the
filesystem?66<https://seed1.projectlocker.com/cognovis/projop/trac/browser/packages/intranet-core/sql/postgresql/intranet-companies.sql#L66>
company_path varchar(100) not
null67<https://seed1.projectlocker.com/cognovis/projop/trac/browser/packages/intranet-core/sql/postgresql/intranet-companies.sql#L67>
constraint im_companies_path_un unique
,
....
]
Alternatively, what you can do is to make the field "company_path" as a
hidden field and assign a value associated with the company's name to it.
{company_path:text(hidden) {label "[_ intranet-core.Company_Short_Name]"} {
html {size 40}}}
You can use a javascript code to do the job. As in
<script type="text/javascript">9<https://seed1.projectlocker.com/cognovis/projop/trac/browser/packages/intranet-cognovis/www/projects/project-ae.adp#L9>
var html_tag =
document.getElementsByName('company_path')[0];10<https://seed1.projectlocker.com/cognovis/projop/trac/browser/packages/intranet-cognovis/www/projects/project-ae.adp#L10>
html_tag.setAttribute('onBlur','set_company_path();');11<https://seed1.projectlocker.com/cognovis/projop/trac/browser/packages/intranet-cognovis/www/projects/project-ae.adp#L11>function
set_company_path()
{12<https://seed1.projectlocker.com/cognovis/projop/trac/browser/packages/intranet-cognovis/www/projects/project-ae.adp#L12>
// var tmp =
document.getElementsByName('company_name')[0].value.replace('
','_');13<https://seed1.projectlocker.com/cognovis/projop/trac/browser/packages/intranet-cognovis/www/projects/project-ae.adp#L13>
var tmp =
replaceSpaces(document.getElementsByName('company_name')[0].value);14<https://seed1.projectlocker.com/cognovis/projop/trac/browser/packages/intranet-cognovis/www/projects/project-ae.adp#L14>
document.getElementsByName('project_path')[0].value =
removeSpaces(tmp.replace(/[^a-zA-Z 0-9 _
]+/g,'')).substring(0,29);15<https://seed1.projectlocker.com/cognovis/projop/trac/browser/packages/intranet-cognovis/www/projects/project-ae.adp#L15>
}16<https://seed1.projectlocker.com/cognovis/projop/trac/browser/packages/intranet-cognovis/www/projects/project-ae.adp#L16>function
removeSpaces(string)
{17<https://seed1.projectlocker.com/cognovis/projop/trac/browser/packages/intranet-cognovis/www/projects/project-ae.adp#L17>
return
string.split(' ').join('');18<https://seed1.projectlocker.com/cognovis/projop/trac/browser/packages/intranet-cognovis/www/projects/project-ae.adp#L18>
}19<https://seed1.projectlocker.com/cognovis/projop/trac/browser/packages/intranet-cognovis/www/projects/project-ae.adp#L19>function
replaceSpaces(string)
{20<https://seed1.projectlocker.com/cognovis/projop/trac/browser/packages/intranet-cognovis/www/projects/project-ae.adp#L20>
return
string.split(' ').join('_');21<https://seed1.projectlocker.com/cognovis/projop/trac/browser/packages/intranet-cognovis/www/projects/project-ae.adp#L21>
}22<https://seed1.projectlocker.com/cognovis/projop/trac/browser/packages/intranet-cognovis/www/projects/project-ae.adp#L22>
</script>
Let me know if that helps
Cheers,
Iuri
Thanks
>
|