Desktop version

Main > Forum > 1C:Enterprise Platform > Studying 1C:Enterprise platform > AccountingRegisterRecordSet Bulk Write

Forum

Search UsersRules
AccountingRegisterRecordSet Bulk Write
#1
Interested
Points:: 0
Joined:: Apr 5, 2012

Hi,

I wonder if for Accounting register record set is there possibility to write recornds in bulk mode even if records are depending on several documents?

Profile
#2
Guest
Points::
Joined::

Hello, Murat!

I'm not sure if I got you correctly, but:
1. If you need to change records in the accounting register for several documents, you need to repost them.
2. If you need to correct records for those documents, there is a method for that. You need to create the correction document that will add negative values equal to ones, which are added by the document that you are correcting. And then add records with values that you need to have after correction. But in this case all records have the same recorder: that document, that you created for the correction.

Profile
#3
Interested
Points:: 0
Joined:: Apr 5, 2012

Hi timofey,

I got your point. But my case is not related with correction of resources, or calculated attributes and not using posting module of document.

For right understanding,

I have document name Accounting Document. This doc do not have any tabular sections etc.
Document is added, edited using register record set directly.
So as accounting politic settings we were using Departman as Dimension on register.
We decided to use it as ExtraDimension.
Thus, we need to make change in existing records. And I have several docs. So for that asked is there way to use bulk mode?

Profile
#4
Guest
Points::
Joined::

You can use the RecordSet object of the register, but remember, that if you need to have a filter by Recorder (change records not for all documents), you will have to use a filter by Recorder, if not, you can create a filter set for all records. But in this case you may select too large amount of data. So I think that it is still a good idea to change documents one by one.

Profile
#5
Active user
Points:: 0
Joined:: Nov 19, 2012

Quote
Timofey Bugaevsky wrote:
But in this case you may sel ect too large amount of data.
I'm not sure it's correct.
Filter by Recorder must be always set up. If you do not specify it - records set will be empty.

If you want to change all record you can select all recorder's reference fr om accounting register, next in the cycle create record set with filter by recorder, next change it how you need and write.

Code
   Query = New Query(
   "SELECT
   |   Managerial.Recorder AS Ref
   |FROM
   |   AccountingRegister.Managerial AS Managerial");
         
   Selecting = Query.Execute().Select();
   
   While Selecting.Next() Do
      
      Records = AccountingRegisters.Managerial.CreateRecordSet();
      Records.Filter.Recorder.Value = Selecting.Ref;
      Records.Read();
      
      //do something here..
      
      Records.Write();
   
   EndDo;

Profile
#6
Guest
Points::
Joined::

Yes, Alexey, thank you for your correction. For registers, which subordinate to a Recorder, only filter by Recorder can be used and this filter is mandatory.

Profile
#7
Interested
Points:: 0
Joined:: Apr 5, 2012

So I wonder does there possibility to set list of document on recorder filter and comparisontype is InList?

Profile
#8
Guest
Points::
Joined::

Filters support only Equal condition.

Profile
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)



© 1C LLC. All rights reserved
1C Company respects the privacy of our customers and visitors
to our Web-site.