GithubHelp home page GithubHelp logo

eschweitzer78 / omnistudio-recipes Goto Github PK

View Code? Open in Web Editor NEW
8.0 2.0 6.0 41 KB

A collection of easy-to-digest code examples for Omnistudio components on Salesforce Public Sector Solutions

License: Creative Commons Zero v1.0 Universal

Apex 24.13% JavaScript 65.55% HTML 9.52% CSS 0.80%
omnistudio salesforce vlocity

omnistudio-recipes's Introduction

omnistudio-recipes

A collection of easy-to-digest code examples for Omnistudio components on Salesforce Public Sector Solutions.

Disclaimer

Some of these recipes leverage undocumented or very little documented code which may change between releases. This repository is neither an official guide nor an endorsement and you should thoroughly check that the recipes carry on working on new releases by using preview instances.

Calling APEX from an Omnistudio Element

There is a method to call APEX when you leverage the OmniscriptBaseMixin, but no real documentation when you want to do that when implementing OmniscriptBaseElement or are subclassing an existing widget class. Look no further and refer to the orElementCallApexMethod recipe.

Calling an Integration Procedure from an LWC deriving from OmniscriptBaseMixin

We leverage the documented method to call APEX from an OmniscriptBaseMixin and illustrate how you can apply that to invoking an Integration Procedure (IP). Check the orBaseMixinCallIP recipe.

Kindly note that while it may be useful in specific circumstances, that pattern is not best practice. You would generally keep the invocation of the IP as an action in your omniscript and your Custom LWC separate. You can use mappings in the Omnistudio designer (see Custom Lighning Web Component Properties) to get the data retrieved from your IP tied to specific api attributes of your LWC.

Testing an Integration Procedure or DataRaptor being run as a given user

You can very well test an Integration Procedure or DataRaptor with your own user in the associated Designer, but there is no provision to test as someone else. If you want to make sure it does the job for a specific category of users, check the orTestIntegrationProcedure and orTestDataRaptor Apex test method templates.

Going to a named previous step (and doing loops) in an Omniscript

You can go to a named previous step with the orBaseMixinGoto recipe. Loops can be set up by combining a GoTo step and conditional visibility.

omnistudio-recipes's People

Contributors

eschweitzer78 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.