Conditions¶
In this article, you'll learn how to limit under which conditions negative sales invoices are allowed.
Basic principle¶
Conditions are evaluated together, that is, as soon as one single condition results in exclusion, posting is prevented.
First, the header is evaluated. We introduce the specified filters from the condition, and if the header disappears when applying the fitlers, we exclude the header. We do this for every condition, and you should thus consider the conditions as AND conditions. Second, the lines are evaluated. For each line, we check all the conditions, and if the line disappears when applying the filters from the condition, the posting is blocked.
Enable conditions¶
To use conditions, you must enable the feature.
- Search for Setup - Negative Sales
- Toggle the switch for the field Check conditions on posting to the on position
That's it! Now you have to create some conditions. You can do so in the list that appeared when you turned the feature on.
Examples¶
Only allow negative sales invoices for domestic customers¶
Click on a blank line in the condition list, and specify a code. You could for example call this condition ONLY. DOM. CUST.
. Now, specify what your condition references. Because the customer is defined in the sales header, you have to choose Sales Header in the References field.
Finally, you have to define the filters. Open the filter page by clicking on the link in the column. Then, click on the AssistEdit button in the column Field ID and select the field Bill-to Country/Region Code and confirm. Enter the country code for domestic customers in the Field Filter column (example: NL
).
Enable the condition and test your condition using the Preview Posting feature of standard Business Central.
Exclude specific items¶
Click on a blank line in the condition list, and specify a code. You could for example call this condition EXCL. SPEC. ITEM
. Now, specify what your condition references. Because the item is defined in the sales line, you have to choose Sales Line in the References field.
Finally, you have to define the filters. Open the filter page by clicking on the link in the column. Then, click on the AssistEdit button in the column Field ID and select the field No. and confirm. To exclude your specific items, use the field filter with a filter similar to <>1896*
.
Enable the condition and test your condition using the Preview Posting feature of standard Business Central.