This article helps you troubleshoot and resolve common issues across multiple tables like opportunity, quote, order, or invoice in Microsoft Dynamics 365 Sales.
Issue 1 - In Context Form may appear in the form selector
The In Context Form is used for displaying and customizing the side panel in deal manager, and in the new interface for contacts, opportunities, leads, and accounts.
Cause
If your environment has any customization that sets the formActivationState to Active for these tables, the In Context Form appears in the form selector dropdown and lets users select this form for viewing the record details.
Resolution
If the appearance of In Context Form leads to confusion, you can deactivate the In Context Form as shown in the following screenshot.
Issue 2 - Error or unexpected behavior while working on tables
Symptoms
While working on tables (such as opportunities, quote, order, invoice, quote product, and order product), you observe unexpected behavior or an error in Dynamics 365 for Sales. The following are some of the errors that you might encounter while working on opportunities, and they might apply to other tables:
"Extended Amount is wrong after revising quote"- this error might occur due to a custom plug-in.
"Error while saving the opportunity" - this error might occur due to custom JavaScript.
"Error while close opportunity" - this error might occur due to a custom workflow.
Cause
These issues might occur due to improper customization of the application.
Resolution
You must verify the improper customizations and resolve them. Perform the following verification methods to identify which customization is causing the issue, and then resolve:
Open the form editor of the table in which the error is occurring. In this example, we're selecting the table as Opportunities and the default solution form.
Select Form Properties on the form editor.
The Form Properties dialog box opens.
On the Events tab, select the control OnLoad from the Events drop-down list.
Choose the custom JavaScript files that are coming from the solution owned by you.
Obs!
To view your custom JavaScript:
Go to Settings > Solutions, and then open the solution.
Select WebResources. Verify the values are selected as: Component Type to WebResources and View to All.
Select Filter icon to enable filter options for columns. Select Type and set the filter as Script (JScript).
Select Edit. In this example, we have selected the custom JavaScript file eg_opportunity to edit.
Clear the Enabled option and select OK.
Publish the customizations.
Verify the issue and if it doesn't occur, the issue is with the custom JavaScript. Resolve the issue.
Issue 3 - Custom plug-in handling by using a shared variable
Symptoms
Create and update operations on Opportunity, Quote, Order, and Invoice tables trigger updates on their parent tables.
Retrieving details about Opportunity, Quote, Order, and Invoice tables internally triggers the Price Calculation service, which subsequently triggers custom plug-ins created by customers.
Resolution
Custom plug-ins execute create, update, and save operations on Opportunity, Quote, Order, and Invoice tables. The create and update operations on these tables internally trigger the Price Calculation service, which then updates the associated price-related fields or attributes of their parent tables.
You can identify or differentiate any updates in Opportunity, Quote, Order, or Invoice tables or parent Opportunity, Quote, Order, or Invoice tables by using the internal Price Calculation service or by using your own custom plug-in. The Boolean shared variable InternalSystemPriceCalculationEvent, which is accessible through IPluginExecutionContext, is available within the plug-in code. Any create or update event processed by using the Price Calculation service will set the value of the variable InternalSystemPriceCalculationEvent to true. The default value of InternalSystemPriceCalculationEvent is false. You can access this variable from your custom plug-in code to control the flow of your existing business logic.
Obs!
To perform custom plug-in operations by using a shared variable, make sure that the out-of-the-box Price Calculation service is disabled.
Sample code
C#
publicvoidExecute(IServiceProvider serviceProvider)
{
// Obtain the tracing service
ITracingService tracingService = (ITracingService)serviceProvider.GetService(typeof(ITracingService));
// Obtain the execution context from the service provider.
IPluginExecutionContext executionContext = (IPluginExecutionContext)
serviceProvider.GetService(typeof(IPluginExecutionContext))
bool isInternalSystemPriceCalculationEvent = false;
//Check existence of shared variable and fetch the value from executionContextif (executionContext.ParentContext != null && executionContext.ParentContext.SharedVariables.ContainsKey("InternalSystemPriceCalculationEvent"))
{
isInternalSystemPriceCalculationEvent = (bool)executionContext.ParentContext.SharedVariables["InternalSystemPriceCalculationEvent"];
}
if (isInternalSystemPriceCalculationEvent)
{
//TO DO - Add or skip custom business logic
}
}
Forbedre forretningsprosesser for kundeservicefunksjoner, for eksempel automatisk oppretting av sak og købehandling med Microsoft Dynamics 365 Customer Service.
Tilpass **Dialogboksen Legg til produkter** slik at selgere raskt kan identifisere og legge til produkter i salgsmulighets-, tilbuds-, ordre- eller fakturaposter.
Lær hvordan du oppretter felttilordning mellom enheter. Dette lar deg angi standardverdier for en oppføring som er opprettet i forbindelse med en annen oppføring.