Vlocity Facts #17 | How to Delete a record from the flexcard Datatable

Flexcard Datatable: 

Datatable is used to display a tabular structure of data fetched from a data source on a flexcard. 
For example: Displaying Contacts and opportunities details related to Accounts.


Let us consider a scenario where user need to delete contact or opportunity records related to accounts and display in tabular structure.

1. First, we need to create flexcard by using datatable and datasource as Dataraptor or Integration procedure...etc

2. After creating flexcard with datatable, navigate to datatable properties under attributes check[true] the row delete check box.

            Now you can see the delete icon in the datatable.


3. We need to trigger a custom event when user clicks on delete icon. For that navigate to setup and click Add New for Event Listener. 

                            Choose Event Type as Custom Event and mention Event Name.

            Under Actions
 Click on Add New and select Action type as Data from Data Source Type choose Integration Procedure in which you have used Delete Action to delete the particular records.


           Under Input Map 
Pass the {recordId} to AccountId and pass contact or opportunity id. You can get the deleted id value by using this synatx {action.result.Id} -- If use click on delete icon from the table that id will be passed.

4. Now we can test the custom event by passing the account id and Contact or Opportunity Id under test parameters.


Like this we can delete the records from datatable in flexcard by calling custom event.

=========================================================================

  • For more Details about DataRaptors and Types check this link DataRaptors
  • For OmniScripts elements refer this link OmniScript Elements -1
  • How to launch Omniscript in difference ways Launch Omniscript
  • Resources: Vlocity Resources
  • Best Practices of OmniScript, Integration Procedure, Data Raptors
  • Debugging Angular OmniScript. 


  •  

    Comments

    Post a Comment

    Popular posts from this blog

    Vlocity Facts #01 | OmniStudio DataRaptors

    Vlocity Facts #34 || Getting the details from the URL in a FlexCard and an Omniscript

    Vlocity Facts #44 || Communication between Omniscript and Flexcard [Pub/Sub]