Set up a custom communication type
To implement the example:
- Create a custom communication type. Read more >>>
- Bind the communication option to the communication type. Read more >>>
- Add an icon to the custom communication type. Read more >>>
Add the Other communication type to contact page. Bind the existing Email, Skype, and Web communication options to the Other communication type. Use the icon for custom communication type.
1. Create a custom communication type
-
Open the Lookups section. To do this, click in the top right → System setup → Lookups.
-
Create a lookup.
-
Click New lookup.
-
Fill out the lookup properties.
Property
Property value
Name
Communication types
Object
Type of Communication
-
Save the changes.
-
-
Open the Communication types lookup.
-
Click New.
-
Fill out the properties of the custom communication type.
Property
Property value
Name
Other
Code
Other
-
Save the changes.
-
Refresh the page that contains the custom communication type.
As a result, the Other custom communication type will be created.
2. Bind the communication option to the communication type
-
Open the Lookups section. To do this, click in the top right → System setup → Lookups.
-
Open the Communication option types lookup.
-
Open the communication option page. To do this, click on the Email communication option.
-
Unbind the communication option from other communication types to switch the communication option to the Other communication type.
- Select all records on the Communication types detail.
- Click → Delete.
- Confirm the deletion.
-
Clear the Use for accounts checkbox.
-
Add a communication type for the communication option. To do this, click on the Communication types detail.
-
Select the Other checkbox.
-
Save the changes.
-
Repeat steps 3–8 for the Skype and Web communication options.
As a result, the Other communiсation type will be added to contact page. The Email, Skype, and Web communication options will be switched to the Other communication type.
3. Add an icon to the custom communication type
-
Make sure the icon meets the requirements. Instructions: Add an icon (step 1).
-
Upload an icon to the
[SysImage]
database table.-
Create the Image upload Freedom UI app. Instructions: Create an app.
-
Open the Image upload form page Freedom UI page.
-
Add the Image type field to an arbitrary place on the Freedom UI page. Leave default field parameter values.
-
Save the changes.
-
Open the
Image upload
app page and click Run app. -
Click New on the toolbar of the
Image upload
app list page. -
Fill out the image properties.
Property
Property value
Name
Image_1
Click to upload the icon.
-
Save the changes.
-
-
Find the icon ID.
-
Open the Lookups section. To do this, click in the top right → System setup → Lookups.
-
Create a lookup. To do this, click New lookup on the Lookups section toolbar.
-
Fill out the lookup properties.
Property
Property value
Name
Images
Object
Image
-
Save the changes.
-
Open the Images lookup.
-
Set up the lookup list. To do this, click View → Select fields to display on the lookup toolbar.
-
Add the column to the lookup list. To do this, click → select the Id column → Select.
-
Save the changes.
-
View the icon ID in the Id column.
-
-
Bind the icon ID to the communication type.
-
Open the Configuration section. Instructions: Open the Configuration section.
-
Select a user-made package to add the SQL script.
-
Add temporary SQL script. To do this, click Add → SQL script on the section list toolbar.
-
Fill out the SQL script properties.
Property
Property value
Code
UsrAddIconForCommunicationTypeMSSQL
Installation type
AfterPackage
Backward compatible
Select the checkbox
-
Add the following SQL script in the Script Designer.
UsrAddIconForCommunicationTypeMSSQLupdate "Communication"
set "ImageLinkId" = '1bb30ed3-8a2b-8225-4c13-aad2700af726'
where "Name" = 'Other'where:
[Communication]
is the database table that stores communication types.1bb30ed3-8a2b-8225-4c13-aad2700af726
is the icon ID from the Images lookup (i. e., icon from the[SysImage]
database table).Other
is the communication type from the Communication types lookup (i. e., communication type from the[Communication]
database table) to bind an icon. -
Save the changes.
-
Install the SQL script. To do this, click → Install in the section list for the
UsrAddIconForCommunicationTypeMSSQL
. -
Confirm the installation.
-
As a result, the icon that has the 1bb30ed3-8a2b-8225-4c13-aad2700af726
ID will be added to the Other communication type.
View the result
- Open a contact page. For example, Alexander Wilson.
- Click Add communication option → Other.
As a result, Creatio will add the icon to the Other communication type that will be displayed on the contact page. The Other communication type will include the Email, Skype, Web communication options. View result >>>
Source code
update "Communication"
set "ImageLinkId" = '1bb30ed3-8a2b-8225-4c13-aad2700af726'
where "Name" = 'Other'