In D365FO if sales line is imported from excel using custom built solution or sales line is created from Code X++ and user provide its own unit price (price other then trade agreements) after sales line creation user go to sales order and click Recalculate and update the Unit price as per trade agreement. To stop this behavior (stop recalculation) if price is enter manually or is custom price is imported for sales line
need to add below code after you modify price in code
Salesline.setPriceDiscChangePolicy(PriceDiscSystemSource::ManualEntry, fieldNum(Salesline, SalesPrice));
it will stop recalculating price for particuallar sales line when some one click Recalculate button on sales order
No comments:
New comments are not allowed.