web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

New Sales Price Feature - Issue?

(0) ShareShare
ReportReport
Posted on by 526

Hi all, 

We are working on enabling the new pricing calculations feature in Business Central (v19) and we are facing the below issue; 

Our Sales Price list lines are per campaign example; 

Source Type Source  No Type Product No Currency Unit Price Status
Campaign Campaign1 Item Item 1 EUR 200 Active
Campaign Campaign1 Item Item1 USD 250 Active
Campaign Campaign2 Item Item1 EUR 300 Active
Campaign Campaign2 Item Item1 USD 350 Active

When preparing a Sale (example; a Sales Quote), and input an item as line, we go to Functions > Get Price to show price list lines of the chosen item, depending on the quote's (sales header) campaign no. and currency. 

So far so good and works as expected. The problem then becomes when we change the currency and then change the campaign no i.e. 

1. Create Quote Q1234 - Currency: USD - Campaign: Campaign 1 - Item: Item 1 

2. We select 'Get Price' action and it shows us the correct price list line i.e. that of 250 Unit Price.

3. We change the quote's currency to EUR and change the campaign to Campaign2, select Get Price action and BC still shows us the price of Campaign 1 as if it did not realize that the campaign has been changed. 

I debugged the issue and found that the issue is in this piece of code in Table 37 that is run each time the 'Get Price' Action is selected; 

pastedimage1636572985129v1.png

Looks like the first run i.e. when Campaign 1 was selected in step 1, the Sales Header variable is correctly populated with Q1234 and Campaign 1. Then on the second run (step 3), the SalesHeader variable is not cleared therefore the if statement fails as the SalesHeader is already populated and the SalesHeader.Get statement is not actioned, hence leaving the SalesHeader variable populated with the 'old' version of the Sales Header. 

There do not seem to be any events we can subscribe to so as to avoid this. 

Any ideas how we can overcome such strange behavior, please? Tried this also in a sandbox environment with no customisations and got the same result. 

Thanks in advance! 

  • Suggested answer
    JAngle Profile Picture
    161 on at

    When debugging what is the PriceType parameter passed in the SetLine function of the interface? Your chance to latch onto something is with the interface. This video explains more about using that technique: https://youtu.be/F2hi539gnus

    I can’t see the IF statement failing as the value there won’t alter. What’s the business reason for the campaign changing? There is a broader process in BC with campaigns in terms of marketing communications. If a contact gets back in touch then you generally lock them into that campaign as that was the hook and it shows where marketing messages are working. You might be using a different logic though.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 633 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 419 Super User 2026 Season 2

#3
Teagen Boll Profile Picture

Teagen Boll 236 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans