Total Pageviews

Friday, March 21, 2025

Preventing Price Recalculation for Imported Sales Lines ( custom price other then trade agreements price) in D365FO - X++ - Microsoft Dynamics 365 Finance & operations

 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:

D365FO and Sharepoint integration issue on dev box: "You are not authorized to connect to 'https://sharepoint.sharepoint.com/

Troubleshooting SharePoint Integration After Upgrading D365FO to Version .42 After upgrading to Dynamics 365 Finance and Operations (D365FO)...