Writeback - Sage 300 - GL (4 replies)
Brian, for each transaction 'level'/type which has a value in the 'Map To Table' property, each record in the IMan dataset will execute an insert, an update, or an 'upsert' type operation.
For updates, the where clause is constructed from the 'Where Clause' property. To update specific rows in your source database, you will need to have the field(s) in the IMan dataset; these fields will be used in your where clause.
For example if there are two fields making up the primary key in your source datatable (PKeyA & PKeyB), these fields (or their values) will need to be in the IMan dataset...in this instance we'll call the fields in IMan 'IManFieldA' and 'IManFieldB'. Therefore the resulting 'Where Clause' property would be:
PKeyA = %IManFieldA AND PKeyB = %IManFieldB
PKeyA = %IManFieldA AND PKeyB = %IManFieldB
Our user guide documents this AND we also have a section in the Sage300 Training Manual which demonstrates this.
How do I put my primary key into the IMan dataset? I can't use my ID for the GL Batch ID. IMan creates its own batch id.
For the GL Batch I see the following fields Company Id, Description, Date Created, Post Created Batch, Batch Number, Debits, Credits, Number of Entries, Error Message and Warning Message.
- Select it as part of the original select sequence.
- Use log keys to pass it through the System Connector.
- Finally use the fields in the where clause.
I highly recommend you work through Day 4 of the homework or the Intercompany Samples which describe your scenario
Closed due to inactivity.
I have a process to import GL batches into Sage from our database.
At the end of my process I added a DB Writer. I want to write back to the appropriate row in our database, the Sage batch id and maybe the totals for the batch. Is this possible? I don't understand how I can reference my row so the data can be written to it.
On the Field Mapping screen for the DB Writer I do not have a Where Clause field as shown in the User Guide.
Any help would be appreciated.