• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 485
  • Last Modified:

Creating pop up windows to fill in additional details

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
Intechnical
Asked:
Intechnical
  • 6
  • 2
1 Solution
 
gregowensCommented:
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
 
gregowensCommented:
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
 
gregowensCommented:
Obviously the code needs to be added to the form's OnSave event... ;-)
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
IntechnicalAuthor Commented:
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
 
gregowensCommented:
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
 
gregowensCommented:
This place needs an Edit button on earlier posts...!
Note that I missed a semi-colon off line 1 of the previous code.
0
 
IntechnicalAuthor Commented:
Is this all in Java Script?
0
 
gregowensCommented:
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 Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 6
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now