SK SKYVVA Documentation

7. Apex Class

In this chapter, we will see one of the operation types which is the "Apex Class".

Apex Class

To obtain more potential to enable the user to execute the business process by practicing an apex class through which SKYVVA passes data & message to the user after the user performs its own business logic already with data that SKYVVA passed, later user must update message status and return it to SKYVVA.

How to use the Apex Class, the process is given below:-

[aux_code language="javascript" theme="tomorrow" title="" extra_classes=""] global class TestApexOperation extends skyvvasolutions.ApexCustomClassOperation{ global override void execute(List lstObj, ListlstMessage){ List lst = new List(); Account up = new Account(); for(Integer j=0; j< lstObj.size(); j++){ up = (Account)lstObj[j]; up.Name = up.Name ; up.AccountNumber = (up.AccountNumber + 500); lst.add(up); } Database.SaveResult[] srList = Database.insert(lst, false); for(Integer i=0; i< srList.size(); i++){ if(srList[i].isSuccess()){ lstMessage[i].skyvvasolutions__Status__c = 'Completed'; lstMessage[i].skyvvasolutions__Comment2__c = 'Comment success form custom Apex Class'; }else{ lstMessage[i].skyvvasolutions__Status__c = 'Failed'; lstMessage[i].skyvvasolutions__Comment2__c = 'Comment Failed from custom Apex Class'; } } } } [/aux_code]

The configuration on the interface

Open this article in the interactive viewer →