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 :
Microsoft Dynamics GP (Archived)

Integration Manager - Use price level price for sales order except when $0

(0) ShareShare
ReportReport
Posted on by

I have an integration to import sales orders.  We have a unit price in the import file but only want it used when the price level price for that item is $0.  I have a script for the field that looks like this

If DestinationFields("Unit Price")=0 Then
   CurrentField = SourceFields("Sales-Order-Import.Unit Price")
ELSE
   DestinationFields("Unit Price").SetToDefault

That doesn't work.  When the price level price is 0, it still puts 0 on the sales order that is imported instead of using the unit price from the import.  I also tried this

If DestinationFields("Unit Price").HasDefault = False Then
   CurrentField = SourceFields("Sales-Order-Import.Unit Price")
ELSE
   DestinationFields("Unit Price").SetToDefault

This worked if the price level price wasn't 0 but when it was 0 it would use 0.  I think because 0 would still be considered a default value. 

So, is there anyway to be able to do this?

Thanks
Jennifer

*This post is locked for comments

I have the same question (0)
  • Kelly Dettmann Profile Picture
    on at

    Hi Jennifer,

    Does DestinationFields need to be used for this script or is the field available so that you could use SourceFields instead?

    Here is an example from the VB Script library that is installed with Integration Manager. The reason I recommend using SourceFields if possible is because DestinationFields doesn't work for all scenarios.

    If SourceFields("RMHeader.SalesAmt")>=0 then

    CurrentField = "Sales / Invoices"

    Else CurrentField = "Credit Memo"

    End if

  • Jennifer Wheeler Profile Picture
    on at

    Hi Kelly

    Thanks for the reply.  Before you posted I was able to figure out a solution to this.

    Thanks

    Jennifer

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
HP-11021721-0 Profile Picture

HP-11021721-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans