Code Library

Message: lose – (Primary Entity: Opportunity)

[vc_row][vc_column][vc_column_text]

SUMMARY

[/vc_column_text][vc_separator][vc_empty_space height=”15px”][vc_column_text]This code example demonstrates code that fires on the lose message of an Opportunity entity. The code checks to see if an attribute in the current opportunity record is not null, if the attribute is null, an exception is thrown.

Plug-in is registered on the win message.

[/vc_column_text][vc_empty_space height=”80px”][/vc_column][/vc_row][vc_row css=”.vc_custom_1441482115526{margin-top: 0px !important;margin-right: 0px !important;margin-bottom: 0px !important;margin-left: 0px !important;border-top-width: 0px !important;border-right-width: 0px !important;border-bottom-width: 0px !important;border-left-width: 0px !important;padding-top: 0px !important;padding-right: 0px !important;padding-bottom: 0px !important;padding-left: 0px !important;}”][vc_column][vc_column_text]CODE EXAMPLES[/vc_column_text][vc_separator][vc_empty_space height=”10px”][vc_tour interval=”0″][vc_tab title=”CODE” tab_id=”1441477385-1-6″][vc_wp_text]

[/vc_wp_text][/vc_tab][vc_tab title=”Code Examples” tab_id=”1441480478401-1-8″][vc_wp_text]

[/vc_wp_text][/vc_tab][vc_tab title=”SDK Code Example” tab_id=”1441489788797-3-9″][vc_wp_text]

[/vc_wp_text][/vc_tab][vc_tab title=”SDK Information” tab_id=”1441627538859-4-3″][vc_wp_text]

No additional information.

[/vc_wp_text][/vc_tab][vc_tab title=”Notes” tab_id=”1441480494692-2-9″][vc_wp_text]

No additional information.

[/vc_wp_text][/vc_tab][/vc_tour][/vc_column][/vc_row][vc_row][vc_column][vc_column_text]MORE INFORMATION[/vc_column_text][vc_separator][vc_empty_space height=”10px”][/vc_column][/vc_row][vc_row][vc_column][vc_column_text]Using the debugger and attaching to the wpw3.exe on the CRM server allows us to debug the plug-in at runtime. This allows us to monitor the InputParameters to discover the current entity that fired the plug-in (OpportunityClose). The values from the InputParameters (Keys[0]) provides the reference to the originating Opportunity record.

Opportunity Fire on Lose

The results view in the debugger illustrates that the GUID, LogicalName is provided for opportunityid.

Opportunity Results[/vc_column_text][vc_wp_tagcloud title=” ” taxonomy=”my-product_category”][/vc_column][/vc_row]

Plug-in