Writing to the trace log
A Visual Studio Tools integration that is being used with the Microsoft Dynamics GP web client can write messages to the web client runtime log. The content of these messages can help when troubleshooting the integration. Only the Visual Studio Tools add-in running on the server can write messages to the log. The Silverlight component running on the web client cannot.
To write to the web client runtime log, use the TraceInformation() method for the message proxy that you added to your Visual Studio Tools add-in. This method has a single string parameter that will be written into the log. The following C# example shows a message that was written to the log.
if (IsWebClient == true) { // Send the message to the web client to open the form proxy.SendMessage(new WCVstCustomMessage(this.GetType().FullName, "SalespersonAnalysisSL.GPWCAddIn", "OpenSalespersonAnalysisForm", new byte[0])); // Write to the trace log proxy.TraceInformation("Sending the OpenSalespersonAnalysisForm message"); }
When the runtime log for the web client is examined, the message will be included as shown in the following portion of the log:
10:47:30.191 | TryReleaseOutgoingMessages :: Reason:[Unknown] 10:47:30.191 | VST:{Sending the OpenSalespersonAnalysisForm message} 10:47:30.191 | #GetDexServerMessages [End] :: Reason:[NonZeroMessageCount]