Joined: Apr 5, 2012
Company: 1TÇ Şirketi - Merv Bilgi İşlem Otomasyonu Yazılım Ltd. Şti.
We have two documents: 1. Accounting Doc. This document doesn't contain tabular section. In form as tabular section viewed register record set table. For ExtraDimension 1,2,3 fields typelink is setted form according account.
So when user choose account, extradimension 1,2,3 fields are automatically become readonly or not.
2. Another Document. This document contain tabular section. In tab. section there are 4 attributes Account, ExtraDimension 1,2,3. For ExtraDimension 1,2,3 fields typelink is setted form according account.
So when user choose account, extradimension 1,2,3 fields are NOT automatically become readonly or not.
Question: The logical work of TypeLink property is changed according table type? Or it's little bug?
The first one is you need to get account parameters:
Query = New Query;
| ChartOfAccounts.Accounting AS Accounting
| Accounting.Ref = &Account
| ChartOfAccountsAccountingAnalytics.LineNumber AS LineNumber,
| ChartOfAccountsAccountingAnalytics.ExtDimensionType AS AnalyticalDimensionType,
| ChartOfAccountsAccountingAnalytics.ExtDimensionType.Description AS Description,
| ChartOfAccountsAccountingAnalytics.ExtDimensionType.ValueType AS ValueType,
| ChartOfAccountsAccountingAnalytics.TurnoversOnly AS TurnoversOnly,
| ChartOfAccountsAccountingAnalytics.ByAmount AS ByAmount
| ChartOfAccounts.Accounting.ExtDimensionTypes AS ChartOfAccountsAccountingAnalytics
| ChartOfAccountsAccountingAnalytics.Ref = &Account
ResultArray = Query.ExecuteBatch();
Selection = ResultArray.Select();
If Selection.Next() Then
AnalyticalDimensionTypesSelection = ResultArray.Select();
AccountData.AnalyticalDimensionCount = AnalyticalDimensionTypesSelection.Count();
Index = 0;
While AnalyticalDimensionTypesSelection.Next() Do
Index = Index + 1;
AccountData.Insert("AnalyticalDimensionType" + Index,
AccountData.Insert("AnalyticalDimensionType" + Index + "Description",
AccountData.Insert("AnalyticalDimensionType" + Index + "ValueType",
AccountData.Insert("AnalyticalDimensionType" + Index + "ByAmount",
AccountData.Insert("AnalyticalDimensionType" + Index + "TurnoversOnly",
Function GetMaxAnalyticalDimensionCount() Export
Then set form attributes to let this data be used in Conditional appearance:
For Index = 1 to MaxAnalyticalDimensionCount Do
If ObjectFields.Property("AnalyticalDimension" + Index) Then
Object[ObjectFields["AnalyticalDimension" + Index] + "Enabled"]
= (Index <= AccountData.AnalyticalDimensionCount);
And the second is Conditional appearance. The current recommendation is to set Conditional appearance using Script as it it easier to monitor when you make changes in your applied solution.
For Index = 1 To AccountingServerCallCached.GetMaxAnalyticalDimensionCount() Do
ConditionalAppearanceItem = ConditionalAppearance.Items.Add();
AdjustedField = ConditionalAppearanceItem.Fields.Items.Add();
AdjustedField.Field = New DataCompositionField("RecordsAnalyticalDimension" + Index);
FilterItem = ConditionalAppearanceItem.Filter.Items.Add(
FilterItem.LeftValue = New DataCompositionField("Object.Records.AnalyticalDimension"
+ Index + "Enabled");
FilterItem.ComparisonType = DataCompositionComparisonType.Equal;
FilterItem.RightValue = False;
I have prepared a complete example for you. See the attached .cf file for that.
Hello, Company A Company B Company C I want to make a separate account plan for these companies. I do not want the account amounts to be confused. I want to get a separate trial. If there is a single account plan, I cannot parse and accounts get confused. Sample Company A 600.01.01 account Company B 600.01.002 account Company C 600.01.003.001 account this can happen.
What 1c solution are you using now? Is this an existing solution or you want to make your own fr om scratch ?
Basically in 1c there is no need to make the way you want to do. All information in accounting registers is kept with dimensions/filters of the company and account number. So, you can filter accounting information by company and/or account number. For example all information for Company A on account 600.01.01 in accounting register is kept separately of Company B and so on. So, you just need to make 1 chart of accounts and provide dimension for companies in it.
If you still prefer to see separate accounts for each company you can have one single chart of accounts still but make a filter for each account and link it to certain company. It will mean that account 600.01.01 belong to company A, 600.01.003.001 account to Company C, etc. Then use this filter in each form wh ere you open account for selection.
Hope this is helpful t you. If you need more information about it or need further help you can contact me on firstname.lastname@example.org