Create an instance of your Example class and call the Execute method in the script task. For example study how the CreateReminding method is called in the "Push notification" script task of the OOB "Push expired licenses notification" business process.
But when I run the business process this is the error I am getting :
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified
Most probably you haven't added Terrasoft.Configuration namespace as a using in your process as well as System.Threading.Tasks. Additionally to it I cannot see creating an instance of the Example class in your script task code.
From the day I have started development on one of the trial instance I have set "Current package" system setting to my package, but I see after some time objects started reflecting in custom package.
I want ask :
1. Is there any other system setting (other than "Current Package" ) which is required to change ?
2. Is this the reason that If there are more than one users (system admin) involved in development.
Please tell me what could be the possible reason ? And does it create any major issue during data binding?
Thank you for you response, related to point number 2, I want to ask
that whenever we create our custom package (VirtuosRefac_version_1) then by default it is marked as locked (please see the below image) then how to unclock it?
And how can I create a field that has the same behaviour as the email field in the default contact page? I have a "linkedin" field that I need to sync with the communication option (which has a linkedin field added under "website") and I need to sync it with the same behaviour as the email field (which takes the main email in the communication option, automatically adds a new email or updates it etc.).
As for your second question - the logic behind the email column is stored in the BaseCommunication and ContactCommunication objects in the Base package (processes on these objects). You need to study how the logic is declared there.
Thank you for your answer, about my first question I mean a mini page that shows when you hover on a record :
I need to change a field that shows on the minipage to a link (with target _blank). On a page directly I can use a "ShowAsLink" attribute, but the component on a minipage that shows a text field is a label, which don't have a "ShowAsLink" attribute.
Thank you for your answer on the second question, I'll dig into the Base Package.
This minipage is a "view" type minipage for the section that is used as a lookup reference. So you need to create the same logic described in the community post I shared above for the field on that minipage.
Ok, we can do it in another way. We can create a virtual column, populate it with the value from the main record and display it not as a label in the minipage, but as a string field. For example using the code below (was added to the ContactMiniPage in my case):
I'm working with a business process, I have added a "Perfom Task" element, but I need to be able to set a custom parameter to it. The field already exists in the activity, but I'm not able to set it from them "Perfom Task" element.
According to your need you can use another approach of saving a record: you can call the save function directly (save method parent implementation can be found in the BaseEntityPage module):
this.save();
just add it at the beginning of the code for your button click handling. And also you can execute methods synchronously using Terrasoft.chain method (an example of the usage can be found in this community post).
Please study the logic of the SaveRecordButton element in the BaseDataView module and the logic of the onCardAction method and the "save" tag of the button and apply the same logic to your button.
I have created a button Generate Reference Price (marked with Red), which calls a web-service that populates the Collateral Price indicator detail(marked with yellow).
In the moment That I click the Generate Reference Price button i want that the information entered in the page is saved (just like clicking the Save button marked with brown). You can get a better understanding from the image below.
According to your need you can use another approach of saving a record: you can call the save function directly (save method parent implementation can be found in the BaseEntityPage module):
this.save();
just add it at the beginning of the code for your button click handling. And also you can execute methods synchronously using Terrasoft.chain method (an example of the usage can be found in this community post).
We are able to update the global search result for a few of the OOTB object schemas by replacing the corresponding module such as AccountSearchRowSchema and for contacts - ContactSearchRowSchema.
b)I couldn't find any schema as BankCardSearchRowSchema for the OOTB object
BankCard. How to get this XSearchrowSchema generated?
No details on BankCardSchema
Please note the indexing for the object BankCard is enabled and the results are retrieved but wanted to update the result for this object. Unable to find
You can track if the global search results for the section uses its own SearchRowSchema or the BaseSearchRowSchema using the query below (MS SQL):
SELECT
sme.Id, sme.ActionKindName, ss.[Name], ss.[UId]
FROM
SysModuleEdit sme
JOIN
SysSchema ss
ON
sme.SearchRowSchemaUId= ss.UId
WHERE
sme.SearchRowSchemaUId IS NOT NULL
But you can create a custom SearchRowSchema module for some section that doesn't have its own SearchRowSchema. The example below is for Documents section that also doesn't have its own SearchRowSchema module.
Here is the screenshot of the base result that the Global Search returns when searching a document:
Let's say we want to add the "Status" column to the search result (the one from the screenshot below):
To achieve this:
1) Create the "Page view model" in configurations with "UsrDocumentSearchRowSchema" code, "Document search row" name and select BaseSearchRowSchema as a parent:
3) Find the SysModuleEdit record related to the Documents section (for example using the query below):
SELECT
*
FROM
SysModuleEdit
WHERE
ActionKindName ='Document'
and then update the value for the "SearchRowSchemaUId" column in this record:
UPDATE
SysModuleEdit
SET
SearchRowSchemaUId ='63388eba-74f2-4bc4-85f2-e6c326adb3e5'
WHERE
Id
IN
(
SELECT
Id
FROM
SysModuleEdit
WHERE
ActionKindName ='Document')
4) Refresh the page and check the result. The "Status" column should appear in the SearchRowSchema for documents:
Same operation can be performed to any section needed.
You can track if the global search results for the section uses its own SearchRowSchema or the BaseSearchRowSchema using the query below (MS SQL):
SELECT
sme.Id, sme.ActionKindName, ss.[Name], ss.[UId]
FROM
SysModuleEdit sme
JOIN
SysSchema ss
ON
sme.SearchRowSchemaUId= ss.UId
WHERE
sme.SearchRowSchemaUId IS NOT NULL
But you can create a custom SearchRowSchema module for some section that doesn't have its own SearchRowSchema. The example below is for Documents section that also doesn't have its own SearchRowSchema module.
Here is the screenshot of the base result that the Global Search returns when searching a document:
Let's say we want to add the "Status" column to the search result (the one from the screenshot below):
To achieve this:
1) Create the "Page view model" in configurations with "UsrDocumentSearchRowSchema" code, "Document search row" name and select BaseSearchRowSchema as a parent:
3) Find the SysModuleEdit record related to the Documents section (for example using the query below):
SELECT
*
FROM
SysModuleEdit
WHERE
ActionKindName ='Document'
and then update the value for the "SearchRowSchemaUId" column in this record:
UPDATE
SysModuleEdit
SET
SearchRowSchemaUId ='63388eba-74f2-4bc4-85f2-e6c326adb3e5'
WHERE
Id
IN
(
SELECT
Id
FROM
SysModuleEdit
WHERE
ActionKindName ='Document')
4) Refresh the page and check the result. The "Status" column should appear in the SearchRowSchema for documents:
Same operation can be performed to any section needed.
I am sorry, but I don't need the BaseSearchRowSchema from your app (I do also have access to the BaseSearchRowSchema module from the bank bundle app), I need your custom SearchRowSchema code for the BankCard schema.
Please read my post with the instruction carefully. I've asked to create a replacing view module using the BaseSearchRowSchema as a parent and then connect it to the SysModuleEdit record of your section using the SearchRowSchemaUId column (and provided an example with the Documents section that also don't have its own SearchRowSchema).
I have followed the same steps as suggested and there needs a little update.
Step 1: Find the target object for GS result update (Here, it is BankCard)
Step 2: Create the "Page view model" in configurations with "CTZBanCardSearchRowSchema" code, "BankCard search row" name and select BaseSearchRowSchema as a parent
Step 3: Update the design of the schema and save.
Step 4: Find the SysModuleEdit record related to the BankCard section (for example using the query below):
SELECT
*
FROM
SysModuleEdit
WHERE
ActionKindName ='BankCard'
Step 5: update the value for the "SearchRowSchemaUId" column in the target objects record.
UPDATE
SysModuleEdit
SET
SearchRowSchemaUId ='XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'
WHERE
Id
IN
(
SELECT
Id
FROM
SysModuleEdit
WHERE
ActionKindName ='BankCard')
**Note: This Column's "SearchRowSchemaUId" value should be the UID of the newly created Page view model performed in Step 2.
UID can be obtained by using the below query,
select Id, UId, Name from SysSchema
where
Name like ('%CTZBanCardSearchRowSchema%')
I have a business scenario where let's say a user will first filter records for export(let's say export to excel) and if the records are more than 50 then before exporting the records user requires an approval from the department admin over email, Once the user receive an approval over email then only he/she will be able to export those records from system.
Note : Email for approval can be sent from the system, but approval email received will not come into the system.
Please suggest you solution how we can achieve this in Creatio.
This task can be achieved using the following scenario:
1) Create two boolean columns in the "System administration object" (SysAdminUnit) object. One of them will be called "Was approval sent?" the second will be "Was approved?"
2) The preparation method that is called when clicking the export to excel action is called exportToExcel and located in the BaseDataView module that then calls the exportToExcel method from the GridUtilitiesV2 that then calls exportToExcelFile method from the DataUtilities module (all according to the call stack of calls, you can debug it on your end).
You need to add additional check if the "Was approved?" and "Was approval sent?" booleans are checked for the user that initiated the export. To get the current user info you can use the user session (can be received using Terrasoft.sessionId) and then you can perform an ESQ select query to SysUserSession object to get the UserId and then perform another ESQ select query to get information from the SysAdminUnit object directly (we are interested in two boolean columns and the SysAdminUnit Id column value).
3) If the "Was approved?" and "Was approval sent?" booleans are not checked then you need to trigger a business process that will send an email (using ProcessModuleUtilities). You need to pass the SysAdminUnit Id column value as a parameter of this process and use it inside the process to form a link to either Reject and Approve "Call to action" buttons.
4) To either approve or reject the possibility of export an email with two options "Approve" and "Reject" should be sent. The link should lead you to the webservice on the Creatio side. This webservice should update the specific SysAdminUnit record with an Id that will be passed as a parameter to this webservice (and the parameter will be specified as a part of the link).
As for the link itself it can be formed as a text parameter (based on the Id passed from the UI using ProcessModuleUtilities) and passed to the HTML body of the custom template in the "Send email" element as:
Before sending an email the "Was approval sent?" checkbox should be checked for the SysAdminUnit record (using modify data for example).
5) The webservice will update the boolean columns "Was approved?" and "Was approval sent?" using the following scenario:
5.1) If the approval was rejected - uncheck both "Was approved?" and "Was approval sent?" checkboxes for the user
5.2) If the approval was approved - check the "Was approved?" boolean and uncheck the "Was approval sent?".
6) On the section module also add additional check for both boolean columns (as in step 2): if the "Was approved?" is checked and the number of exported items is greater than 50 - permit the export and uncheck the "Was approved?" checkbox for the user.
Please study the scenario I described above and use it when implementing the logic on your end.
Any idea how can I achieve this requirement. I am throwing a custom exception message from object validation. However, in mobile it is showing as generic error, user needs to click on "Send Report" to view the actual exception message I was throwing from object validation. How can I show it on mobile's pop dialog right away?
I am sure that your task can be achieved in another way. Please see this Academy article regarding push notifications where you can pass the validation message.
I want to override qualify button method in Leads section and check if some of the fields have appropriate value. If not, I want to stop the lead qualification process. Can someone help me in achieving the same?
As I already stated here the method that is called upon the "Qualify" button click is onLeadManagementButtonClick (for the LeadPageV2 module). In the LeadSectionV2 the method is onLeadManagementSectionButtonClick. You can override both methods in the replaced modules: in LeadPageV2 you can add additional this.get(Column)!= check and then call parent method and in the LeadSectionV2 you need to get ActiveRow and perform an ESQ select query to check if the record by ActiveRow has the data needed to start the process.
ESQ is asynchronous so you won't be able to call the parent method. But we can do it in another way. Try this code:
onLeadManagementSectionButtonClick: function(){
var gridData =this.get("GridData");
var activeRow =this.get("ActiveRow");
var activeRowGridData = gridData.get(activeRow);
var activeRowGridDataAccount = activeRowGridData.get("Account");
var activeRowGridDataEmail = activeRowGridData.get("Email");if(!activeRowGridDataAccount ||!activeRowGridDataEmail){
Terrasoft.showErrorMessage("error msg");return;}this.callParent(arguments);}
But in this case you will have to display both account and email columns in the lead section grid:
This approach works on my side, should also work on your end.
Not sure, the code should be debugged to find out the proper way of the customer's business task completeness. I just gave an example, the final implementation can differ.