AccountingRegisterRecordSet Bulk Write

Understanding basics of 1C:Enterprise platform. To start working with 1C:Enterprise platform visit Getting started page

#1
People who like this:0Yes/0No
Interested
Rating: 27
Joined: Apr 5, 2012
Company: 1TÇ Şirketi - Merv Bilgi İşlem Otomasyonu Yazılım Ltd. Şti.

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?

Edited: Murat Yazlıyev - Dec 04, 2014 05:17 AM
 
#2
People who like this:0Yes/0No
Timofey Bugaevsky
Guest

Joined:
Company:

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.

 
#3
People who like this:0Yes/0No
Interested
Rating: 27
Joined: Apr 5, 2012
Company: 1TÇ Şirketi - Merv Bilgi İşlem Otomasyonu Yazılım Ltd. Şti.

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?

 
#4
People who like this:0Yes/0No
Timofey Bugaevsky
Guest

Joined:
Company:

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.

 
#5
People who like this:0Yes/0No
Active user
Rating: 4
Joined: Nov 19, 2012
Company:

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;

 
#6
People who like this:0Yes/0No
Timofey Bugaevsky
Guest

Joined:
Company:

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.

 
#7
People who like this:0Yes/0No
Interested
Rating: 27
Joined: Apr 5, 2012
Company: 1TÇ Şirketi - Merv Bilgi İşlem Otomasyonu Yazılım Ltd. Şti.

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

 
#8
People who like this:0Yes/0No
Timofey Bugaevsky
Guest

Joined:
Company:

Filters support only Equal condition.

 
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)
Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.