The image above shows the New Task screen. Both the New Task and New Appointment screens allow a user to Create Follow-up Communications.
A customer might have a business requirement to know whether the communication a user is currently entering is actually a followup of another communication. That is they need to know whether the screen has been presented to the user because they had 'ticked' a check box on the previous communication.
This might be because the default value should be entered into a field or a field might become mandatory or for some other reason.
Information available to a Create Script
A create script in the communication screen can know whether the screen is being created as a result of a 'Create Follow-up' request.
As noted in the article "How do I hide the 'Follow-up' check boxes on a New Appointment or New Task Screen Screen?" the checkboxes are fields called
Server-side script can access the content of these fields using the FormValues() method (also known as the FormValues collection).
Create Script Example
In the CustomCommunicationDetailBox screen (Entrygroup) the following create script can be entered against the comm_action field.
Valid = false;
ErrorStr = "New Communication"
ErrorStr = "Follow up Appointment"
ErrorStr = "Follow up Task"
Create Scripts and QueryStrings
Create scripts can also access the value of the QueryString so that we could also detect the different values of the variable.
To read the value of a item in the QueryString in a create script you can use the Values() method/collection e.g.
var SystemAction = Values("Act");
Valid = false;
ErrorStr = SystemAction;
The following show urls of pages called in the context of the My CRM menu.
Typical QueryString for a New Task screen
Typical QueryString for a Follow-up Task screen
Typical QueryString for a New Appointment screen
Typical QueryString for a Follow-up Appointment screen
We can see from the above examples that the system actions used are
- New Task: 361
- New Appointment: 362
The action called as a result of the Create Follow Up checkbox being ticked do not include the reference T=newactivity BUT this can not be used to test to prove that this is a New Communication as this variable is missing from urls called from the New Task/New Appointment buttons on the Communications tabs.