Create SmartConnect Journal – Standard Map: Credit Amount Was Not Supplied Error

eOne SolutionsThis post is part of a series on creating a Journal – Standard integration using SmartConnect from eOne Solutions; I recently posted a series on Implementing SmartConnect.

While I was creating the Journal – Standard for this series, it was not all smooth sailing. I received an error message while testing the integration:

SmartConnect Progess window showing error

I’ve done a lot of work previously with Integration Manager and this type of error would not have been produced. The source file looks like the below:

Excel spreadsheet showing blank debit and credit cells when opposing credit and debit cells are populated

One solution to this would be to always enter a zero in the blank cells, but this would mean extra work for the clients. So, my preferred solution needs to be one which does not involve extra effort for the client, which means it needs to be handled by SmartConnect.

This is possible by way of a calculated Additional Field of a type of Calculation. To create the column, from the SmartConnect Mapping window, click the Additional Columns button, click Columns and select Calculated.

The VB.NET code required to return 0 when the Credit field has not set is not all that complicated:

Create new calculation window
If (String.IsNullOrEmpty(_CREDIT)) Then
	Return 0
Else
	Return _CREDIT
End If

Create a similar calculated Debit field:

Additional Columns window showing new columns

The final step is to change the mapping to use the new calculated field instead of the ones direct from the data source:

SmartConnect Mapping window showing new calculated fields mapped

With the calculated fields mapped, the integration successfully ran.

What should we write about next?





Your Name (required) –
Your Email (required) –

Leave a Reply

Your email address will not be published. Required fields are marked *