logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
cgkcdev  
#1 Posted : Tuesday, April 30, 2024 12:51:23 AM(UTC)
cgkcdev

Rank: Newbie

Groups: Registered
Joined: 4/22/2024(UTC)
Posts: 6
United States

I am unable to process the importconsole.exe from a windows service to process automatically without user intervention. I am receiving the following error in the log file:

"Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application."

There does not seem to be any documentation available for disabling modal dialogs.

Is this possible? And if not, is the expectation that a human will interactively process every single transaction with the import console manually?
tony  
#2 Posted : Tuesday, April 30, 2024 1:43:43 PM(UTC)
tony

Rank: Advanced Member

Groups: Registered
Joined: 2/28/2018(UTC)
Posts: 65
United States
Location: Pennsylvani mostly

Was thanked: 9 time(s) in 9 post(s)
No, it's definitely not the expectation that you'd have to have to interact with the import console. The flow is that you run the import, it does its work, and the import creates a log that you can examine for possible errors. I'll look into this.

That said, the import spins up a bare bones instance of CenterPoint which includes DLLs that do have UI components. Unless we've introduced something latel), they don't bring up dialogs or any UI components, but I've never run the import console as a windows service myself.

Can you run the import console from the command window? I'm not suggesting this as a solution, but in order to eliminate some more obvious problems.

Edited by user Tuesday, April 30, 2024 1:53:59 PM(UTC)  | Reason: Not specified

cgkcdev  
#3 Posted : Tuesday, April 30, 2024 3:12:18 PM(UTC)
cgkcdev

Rank: Newbie

Groups: Registered
Joined: 4/22/2024(UTC)
Posts: 6
United States

I am able to run it from the command line. There are no UI displays at all. I do see some issues with the data in the file I am still trying to figure out as well, but it at least processes from the command line but not when executed from within the service. I even tried enabling the option for the service to interact with desktop and that did not make any difference. I am trying a few more options today as well as trying to figure out why it is complaining about duplicate columns that aren't actually duplicates.
tony  
#4 Posted : Tuesday, April 30, 2024 3:15:02 PM(UTC)
tony

Rank: Advanced Member

Groups: Registered
Joined: 2/28/2018(UTC)
Posts: 65
United States
Location: Pennsylvani mostly

Was thanked: 9 time(s) in 9 post(s)
I can probably make some suggestions for tracking down the duplicate problem. Can you post the log produced by the import?
cgkcdev  
#5 Posted : Tuesday, April 30, 2024 3:37:45 PM(UTC)
cgkcdev

Rank: Newbie

Groups: Registered
Joined: 4/22/2024(UTC)
Posts: 6
United States

Below is what I am getting today. The Company, ApAccount and DetailSalesItem are currently set with a default value. They are empty in the CSV file but the columns exist only once in the CSV file. I have added asterisks to cover private data.



04/30/2024 @ 08:20:47AM : Initializing import
04/30/2024 @ 08:20:47AM :
04/30/2024 @ 08:20:47AM : Opening Database
04/30/2024 @ 08:20:49AM :
04/30/2024 @ 08:20:49AM : Reading import file to data table
04/30/2024 @ 08:20:49AM :
04/30/2024 @ 08:20:49AM : Preprocessing data table
04/30/2024 @ 08:20:49AM :
04/30/2024 @ 08:20:49AM : Processing import file
04/30/2024 @ 08:20:49AM : Column 'Company' is mapped more than once.
04/30/2024 @ 08:20:49AM : Column 'ApAccount' is mapped more than once.
04/30/2024 @ 08:20:49AM : Column 'DetailSalesItem' is mapped more than once.
04/30/2024 @ 08:20:49AM : Row: 2, Company: Field can't be empty
04/30/2024 @ 08:20:49AM : Row: 2, ApAccount: Field can't be empty
04/30/2024 @ 08:20:49AM : Row: 2, Sequence: No 'Sequences' items found that match '0' in column 'Name'
04/30/2024 @ 08:20:49AM : Row: 2, ProfitCenter: No 'ProfitCostCenters' items found that match '265' in column 'Name'
04/30/2024 @ 08:20:50AM : Row: 2, AssociatedAccount: No 'Accounts' items found that match '5108000' in column 'Name'
04/30/2024 @ 08:20:50AM : Row: 3, Company: Field can't be empty
04/30/2024 @ 08:20:50AM : Row: 3, ApAccount: Field can't be empty
04/30/2024 @ 08:20:50AM : Row: 3, Sequence: No 'Sequences' items found that match '0' in column 'Name'
04/30/2024 @ 08:20:50AM : Row: 3, ProfitCenter: No 'ProfitCostCenters' items found that match '284' in column 'Name'
04/30/2024 @ 08:20:50AM : Row: 3, AssociatedAccount: No 'Accounts' items found that match '5108000' in column 'Name'
04/30/2024 @ 08:20:50AM : Row: 4, Company: Field can't be empty
04/30/2024 @ 08:20:50AM : Row: 4, ApAccount: Field can't be empty
04/30/2024 @ 08:20:50AM : Row: 4, Sequence: No 'Sequences' items found that match '0' in column 'Name'
04/30/2024 @ 08:20:50AM : Row: 4, ProfitCenter: No 'ProfitCostCenters' items found that match '216' in column 'Name'
04/30/2024 @ 08:20:50AM : Row: 4, AssociatedAccount: No 'Accounts' items found that match '5108000' in column 'Name'
04/30/2024 @ 08:20:50AM : Row: 5, Company: Field can't be empty
04/30/2024 @ 08:20:50AM : Row: 5, ApAccount: Field can't be empty
04/30/2024 @ 08:20:50AM : Row: 5, Sequence: No 'Sequences' items found that match '0' in column 'Name'
04/30/2024 @ 08:20:50AM : Row: 5, ProfitCenter: No 'ProfitCostCenters' items found that match '241' in column 'Name'
04/30/2024 @ 08:20:50AM : Row: 5, AssociatedAccount: No 'Accounts' items found that match '5108000' in column 'Name'
04/30/2024 @ 08:20:50AM : Row: 6, Company: Field can't be empty
04/30/2024 @ 08:20:50AM : Row: 6, ApAccount: Field can't be empty
04/30/2024 @ 08:20:50AM : Row: 6, Sequence: No 'Sequences' items found that match '0' in column 'Name'
04/30/2024 @ 08:20:50AM : Row: 6, ProfitCenter: No 'ProfitCostCenters' items found that match '285' in column 'Name'
04/30/2024 @ 08:20:50AM : Row: 6, AssociatedAccount: No 'Accounts' items found that match '5108000' in column 'Name'
04/30/2024 @ 08:20:50AM : Row: 7, Company: Field can't be empty
04/30/2024 @ 08:20:50AM : Row: 7, ApAccount: Field can't be empty
04/30/2024 @ 08:20:50AM : Row: 7, Sequence: No 'Sequences' items found that match '0' in column 'Name'
04/30/2024 @ 08:20:50AM : Row: 7, ProfitCenter: No 'ProfitCostCenters' items found that match '239' in column 'Name'
04/30/2024 @ 08:20:50AM : Row: 7, AssociatedAccount: No 'Accounts' items found that match '5108000' in column 'Name'
04/30/2024 @ 08:20:50AM : Row: 8, Company: Field can't be empty
04/30/2024 @ 08:20:50AM : Row: 8, ApAccount: Field can't be empty
04/30/2024 @ 08:20:50AM : Row: 8, Sequence: No 'Sequences' items found that match '0' in column 'Name'
04/30/2024 @ 08:20:50AM : Row: 8, ProfitCenter: No 'ProfitCostCenters' items found that match '249' in column 'Name'
04/30/2024 @ 08:20:50AM : Row: 8, AssociatedAccount: No 'Accounts' items found that match '5108000' in column 'Name'
04/30/2024 @ 08:20:50AM : Row: 9, Company: Field can't be empty
04/30/2024 @ 08:20:50AM : Row: 9, ApAccount: Field can't be empty
04/30/2024 @ 08:20:50AM : Row: 9, Sequence: No 'Sequences' items found that match '0' in column 'Name'
04/30/2024 @ 08:20:50AM : Row: 9, ProfitCenter: No 'ProfitCostCenters' items found that match '279' in column 'Name'
04/30/2024 @ 08:20:50AM : Row: 9, AssociatedAccount: No 'Accounts' items found that match '5108000' in column 'Name'
04/30/2024 @ 08:20:50AM : Row: 10, Company: Field can't be empty
04/30/2024 @ 08:20:50AM : Row: 10, ApAccount: Field can't be empty
04/30/2024 @ 08:20:50AM : Row: 10, Sequence: No 'Sequences' items found that match '0' in column 'Name'
04/30/2024 @ 08:20:50AM : Row: 10, ProfitCenter: No 'ProfitCostCenters' items found that match '244' in column 'Name'
04/30/2024 @ 08:20:50AM : Row: 10, AssociatedAccount: No 'Accounts' items found that match '5108000' in column 'Name'

Configuration Used:

<Configuration>
<AutomaticMappingField>Name</AutomaticMappingField>
<AutomaticMappingFieldForAccounts>Name</AutomaticMappingFieldForAccounts>
<DatabaseName>************</DatabaseName>
<FileContainsHeaderRow>True</FileContainsHeaderRow>
<ImportAction>Add</ImportAction>
<ImportFileName>*****_00000239.csv</ImportFileName>
<LogFile>*****_00000239.log</LogFile>
<Name>******</Name>
<Mappings>
<Mapping>
<DestinationKey>Company</DestinationKey>
<SourceKey></SourceKey>
<LookupSource></LookupSource>
<DateFormat></DateFormat>
<DefaultValue>*******</DefaultValue>
</Mapping>
<Mapping>
<DestinationKey>Vendor</DestinationKey>
<SourceKey>1</SourceKey>
<LookupSource></LookupSource>
<DateFormat></DateFormat>
<DefaultValue></DefaultValue>
</Mapping>
<Mapping>
<DestinationKey>ApAccount</DestinationKey>
<SourceKey></SourceKey>
<LookupSource></LookupSource>
<DateFormat></DateFormat>
<DefaultValue>A/P - Vendors</DefaultValue>
</Mapping>
<Mapping>
<DestinationKey>TransDate</DestinationKey>
<SourceKey>3</SourceKey>
<LookupSource></LookupSource>
<DateFormat></DateFormat>
<DefaultValue></DefaultValue>
</Mapping>
<Mapping>
<DestinationKey>TransNumber</DestinationKey>
<SourceKey>4</SourceKey>
<LookupSource></LookupSource>
<DateFormat></DateFormat>
<DefaultValue></DefaultValue>
</Mapping>
<Mapping>
<DestinationKey>InvoiceRef</DestinationKey>
<SourceKey>12</SourceKey>
<LookupSource></LookupSource>
<DateFormat></DateFormat>
<DefaultValue></DefaultValue>
</Mapping>
<Mapping>
<DestinationKey>DetailSalesItem</DestinationKey>
<SourceKey></SourceKey>
<LookupSource></LookupSource>
<DateFormat></DateFormat>
<DefaultValue>Misc. Sales Item -- NO TAX</DefaultValue>
</Mapping>
<Mapping>
<DestinationKey>Amount</DestinationKey>
<SourceKey>18</SourceKey>
<LookupSource></LookupSource>
<DateFormat></DateFormat>
<DefaultValue></DefaultValue>
</Mapping>
<Mapping>
<DestinationKey>ProfitCenter</DestinationKey>
<SourceKey>20</SourceKey>
<LookupSource></LookupSource>
<DateFormat></DateFormat>
<DefaultValue></DefaultValue>
</Mapping>
<Mapping>
<DestinationKey>AssociatedAccount</DestinationKey>
<SourceKey>25</SourceKey>
<LookupSource></LookupSource>
<DateFormat></DateFormat>
<DefaultValue></DefaultValue>
</Mapping>
<Mapping>
<DestinationKey>Project</DestinationKey>
<SourceKey>26</SourceKey>
<LookupSource></LookupSource>
<DateFormat></DateFormat>
<DefaultValue></DefaultValue>
</Mapping>
<Mapping>
<DestinationKey>Notation</DestinationKey>
<SourceKey>27</SourceKey>
<LookupSource></LookupSource>
<DateFormat></DateFormat>
<DefaultValue></DefaultValue>
</Mapping>
</Mappings>
</Configuration>
cgkcdev  
#6 Posted : Tuesday, April 30, 2024 3:46:01 PM(UTC)
cgkcdev

Rank: Newbie

Groups: Registered
Joined: 4/22/2024(UTC)
Posts: 6
United States

I just ran one more test, and it looks like if I have the header columns included in the CSV it ignores the mapping I set in the configuration. I removed the header row and now I am not getting the mapped more than once error. Now it looks like the data that is sent to me is not valid for a couple of fields so I need to look into that.

As for the issue with running from a service, I may try and test using a batch file and windows task scheduler to see if I can get it to run automated that way. I would be curious to know how it is typically done in an automated fashion if not from a service or scheduled task?
tony  
#7 Posted : Tuesday, April 30, 2024 4:01:23 PM(UTC)
tony

Rank: Advanced Member

Groups: Registered
Joined: 2/28/2018(UTC)
Posts: 65
United States
Location: Pennsylvani mostly

Was thanked: 9 time(s) in 9 post(s)
FileContainsHeaderRow = True means that the import will not only skip the first row but also look at the column name in the first row to see if it matches an import field. So if you've set a default value for Company but also have a column in the first row with the text "Company", the import will automatically map that column to Company data. I'd suggest, eliminating the header row and setting FileContainsHeaderRow to False.

I have some suggestions on some of the other errors:

No 'Sequences' items found that match '0' in column 'Name' -> This is probably because Sequence in CenterPoint indicates a specific numbering sequence for documents. For example, an "AP Invoice Number" sequence would tell CenterPoint to take the next sequence for AP Invoice and assign it to the document you are creating as a transaction/document number. Like you, I'd see Sequence and assume it's the number that orders the detail lines, but it's not. You probably don't need to set this.

ProfitCenter: No 'ProfitCostCenters' items found that match '249' in column 'Name'. AutomaticMappingField = Name means that the import is going to try to match the text 249 up to the name of a Profit Center in CenterPoint. I'm guessing that changing the Automatic Mapping Field to Abbreviation will fix this.

Associated Account is a more advanced feature. I don't think you need to assign that at all. If you do need to set it, the text looks like an account number (an expense account possibly) so you'd have to change AutomaticMappingFieldForAccounts from Name to AccountNumber.

You do need an AP account, but I think that they can probably set a default value for that. The same rule about the AutomaticMappingFieldForAccounts applies - if the incoming value is something like "2108000=", then the AutomaticMappFieldForAccounts should probably be set to AccountNumber as it's not a Name and probably not an abbreviation.

Edited by user Tuesday, April 30, 2024 4:08:13 PM(UTC)  | Reason: Not specified

cgkcdev  
#8 Posted : Tuesday, April 30, 2024 4:24:47 PM(UTC)
cgkcdev

Rank: Newbie

Groups: Registered
Joined: 4/22/2024(UTC)
Posts: 6
United States

Thank you for the response on the mappings. I tried changing those settings and I can see that based on the setting I get errors for different fields. I think at this point I need to go back to the source of the data and try to get it normalized. It seems as though I am provided with some fields containing Name values, some fields using Id and some possibly using Abbreviation. This is obviously not going to work unless all fields provided in the csv are using the same lookup type values (Name vs Abbreviation).

I am not including the Sequence column, so that is resolved by removing the header row...

Users browsing this topic
Guest (3)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.