Solved

Creating pop up windows to fill in additional details

Posted on 2008-10-21
8
476 Views
Last Modified: 2012-05-05
Hello,
I have created a field for escalation of cases, that uses a picklist 'Level 1, Level 2, Level 3'.

I would like a pop up window to appear to allow the user to update time he's currently spent on the job before escalating it to level 2.
I would also just like to know how to create a pop up warning as we have began to use CRM for our orders and would like to notify admin to check certain values are correct before saving the order.

Many Thanks
0
Comment
Question by:Intechnical
  • 6
  • 2
8 Comments
 
LVL 4

Expert Comment

by:gregowens
ID: 22765561
MS CRM can handled "time spent" on a case, without requiring custom developement. If your workers create CRM activities which are "Related" to a case, the time spent on each activity is summed when the case is closed. This appears in the "Total Time" field on the "Resolve Case" dialog box (Service > Cases > select and open Case > Actions > Resolve Case).
I'll post some JavaScript shortly re: showing a warning...
0
 
LVL 4

Expert Comment

by:gregowens
ID: 22765589
The following JavaScript code will prompt the user with a custom message and abort the save event, unless the OK button was clicked:
var isChecked = confirm("Have you double-checked the price list and freight amount?\n\nClick OK for yes or CANCEL to amend.")

if (!isChecked){

	//Abort the original Save

	event.returnValue=false;

	return false;

}

Open in new window

0
 
LVL 4

Expert Comment

by:gregowens
ID: 22765594
Obviously the code needs to be added to the form's OnSave event... ;-)
0
 
LVL 1

Author Comment

by:Intechnical
ID: 22765690
Thanks Greg,
That looking good, however is it possible to have the On Save event only active if a field equals a certain value, so for example if escalation equals level 2 - and when gone to save, they get a message to make sure that they have added a task to the case for the time they have spent?
Many Thanks for your quick response.
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 4

Accepted Solution

by:
gregowens earned 250 total points
ID: 22765754
Absolutely - though by looking to check other entities (i.e. tasks/activities) the solution becomes more complicated...
To only fire the warning if escalation level = level 2 then your code would look something like the code below.
For look-up to associated activity you need to be more specifc about what constitutes "adding a task to the case" - for example, simply checking to see if a task exists for this case does NOT guarantee that time has been spent on it by your support person. More specifically, when the case is escalated to level 3, what criteria should be used to ascertain that the task created for level 2 should be ignored and that a new task is now expected for the level 3 escalation (if you follow...).
It might be better to consider using workflow rules to help manage the esalation process - is there an underlying rule for escalation?

var fieldToCheck = crmForm.all.new_escalationlevel

if(fieldToCheck.DataValue!=fieldToCheck.defaultValue) // if field has changed

{

	var isChecked = confirm("Have you created a task to allocate your time?\n\nClick OK for yes or CANCEL to amend.")

	if (!isChecked){

		//Abort the original Save

		event.returnValue=false;

		return false;

	}

}

Open in new window

0
 
LVL 4

Expert Comment

by:gregowens
ID: 22765760
This place needs an Edit button on earlier posts...!
Note that I missed a semi-colon off line 1 of the previous code.
0
 
LVL 1

Author Comment

by:Intechnical
ID: 22765870
Is this all in Java Script?
0
 
LVL 4

Expert Comment

by:gregowens
ID: 22765894
All the code that I've posted is JavaScript, yes.
Workflow uses it's own UI from within CRM and is point-and-click. Accessed via Settings > Workflow
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Automatically creating a Trello card using data from a Microsoft Dynamics CRM record turned out to be an easy project that yielded great results.  Here's how I did this for an internal team at General Code.
For cloud, the “train has left the station” and in the Microsoft ERP & CRM world, that means the next generation of enterprise software from Microsoft is here: Dynamics 365 is Microsoft’s new integrated business solution that unifies CRM and ERP fun…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now