I have a plugin that update some custom fields and I want to run some javascript to validate the fields and present the user with an alert message if required.... is this possible (dynamics crm 4)
Thanks, Tim
Well for a start, a plugin is server-side code and JScript is client-side. There can be no direct communication between the two - certainly not in the direction you suggest (plugin causing JScript to fire). If a workflow updates a record and causes the plug-in to fire, there is no (interactive) user to alert.
As @MilkyWayJoe suggests - you haven't given enough info in your question to help us answer it properly, however:
If you are suggesting that after the plugin fires, when a user next opens the record they are prompted to fill missing fields, then you would simply have some JScript attached to the form's onLoad event which checks the fields you specify and raises an alert
. Read the SDK for more info (e.g. here and here).
Otherwise, (and in ignorance of your specific business requirements) I might suggest that the check for missing data is encapsulated in your plugin which raises an exception if the requisite fields are null.