1. Implement the reminder text and dialog
- Go to the Configuration section and select a custom package to add the schema.
-
Click Add → Source code on the section list toolbar.
-
Fill out the schema properties in the Source Code Designer:
- Set Code to "UsrLeadRemindingText."
- Set Title to "Lead reminding text."
Click Apply to apply the properties.
-
Add a localizable string that contains the reminder dialog caption.
- Click the button in the context menu of the Localizable strings node.
-
Fill out the localizable string properties:
- Set Code to "TitleTemplate."
- Set Value to "You need to update the sale."
- Click Add to add a localizable string.
-
Add a localizable string that contains the reminder text similarly.
View the properties of the localizable string to add in the table below.
Code Value "BodyTemplate" "Lead {0} requires update of sales information" -
Implement the reminder text and dialog.
View the source code of the source code schema below.
- Click Save on the Source Code Designer's toolbar to save the changes to Creatio metadata temporarily.
- Click Publish on the Source Code Designer's toolbar to apply the changes to the database level.
2. Implement the mechanism that sends the reminder
- Go to the Configuration section and select a custom package to add the schema.
-
Click Add → Replacing object on the section list toolbar.
-
Select "Lead" in the Parent object property of the Object Designer.
-
Create an object event.
- Open the Events node.
- Go to the Adding block → select the After record added checkbox.
-
Set up the parameter the business process uses to generate the reminder in the object schema.
- Click Save on the Object Designer's toolbar.
- Click Open process on the Object Designer's toolbar.
-
Add a parameter.
-
Open the Parameters tab in the setup area and click Add parameter → Boolean.
-
Fill out the parameter properties in the Object Designer.
- Set Title to "Generate reminding."
- Set Code to "GenerateReminding."
- Click Save.
-
-
Overload the methods.
-
Overload the method called after the object is saved. To do this, open the Methods tab of the setup area and add the source code of the overloaded LeadSaved() method.
The RemindingConsts.NotificationTypeRemindingId value of the remindingConfig.NotificationTypeId constant lets you display the notification on the reminder tab of the notification center. If you set the constant to RemindingConsts.NotificationTypeNotificationId, Creatio displays the reminder on the service message tab of the notification center.
-
Overload the method called before the object is saved. To do this, open the Methods tab and add the source code of the overloaded LeadSavingMethod() method.
Complete source code of the object's embedded process -
- Click Save then Publish on the Object Designer's toolbar.
- Click Cancel on the Object Designer's toolbar.
- Click Publish to create a corresponding database table.
3. Implement the mechanism that displays the reminder
- Go to the Configuration section and select a custom package to add the schema.
-
Click Add → Replacing view model on the section list toolbar.
-
Select "ReminderNotificationsSchema" in the Parent object schema property of the Module Designer.
Click Apply to apply the properties.
-
Implement the mechanism that displays the reminder.
-
Implement the following methods in the methods property:
- getIsLeadNotification(). Determines whether the reminder is connected to the lead.
- getNotificationSubjectCaption(). Returns the reminder caption.
-
Add configuration objects with the settings that determine layouts of the following elements to the diff array of modifications:
- container on the page
- caption container
- image
- date
- reminder text
View the source code of the replacing view model schema below.
-
- Click Save on the Module Designer's toolbar.
Outcome of the example
To view the outcome of the example:
- Refresh the Leads section page.
- Open the lead page → the Opportunity info tab.
- Select the needed date and time of the opportunity update in the Next actualization date field.
- Select your user contact in the Owner field.
As a result, Creatio will display the reminder for the opportunity update date in the lead on the reminder tab of the notification center.