Coder Social home page Coder Social logo

lwcquestionbank's Introduction

Salesforce Randomised Question Component

Introduction

This repository contains a Salesforce Lightning Web Component (LWC) designed for demonstration purposes only. It serves as a guide on how to display a randomised question to a Salesforce user from a list of active questions stored in a custom object called "Question__c".

Setup and Installation

Step 1: Deployment

Deploy all the necessary components to your Salesforce organization. This includes the Lightning Web Component, Apex Controller, and the necessary object and field definitions. Additionally, deploy the created permission sets "Questions User" and "Questions Admin" to manage access levels to the Question__c object.

Step 2: Permission Set Assignment

After deploying the components, you need to assign a permission set to the respective users. There are two permission sets available:

  1. Questions User: Grants read-only and view all access to the Question__c object.
  2. Questions Admin: Grants full CRUD access to the Question__c object.

Assign the appropriate permission set based on the user's role and responsibilities.

Step 3: Including the Component in a Flow

To use this component, include it in a Salesforce flow. An example metadata file for a flow is Question_Bank.flow-meta.xml. However, the component can be modified to be used in other contexts as per your requirements.

Step 4: Importing Sample Data (Optional)

If required, you can import sample questions from ./scripts/data/Question__c.csv to populate the Question__c object.

Component Details

  • Component Name: questionBank
  • Apex Controller: QuestionController
  • Primary Function: The component relies on the QuestionController Apex class to select a random question from the Question__c object where Active__c is set to true.

Disclaimer

This component is created for demonstration purposes only and serves as a guide to showcase how a randomised question can be displayed to a Salesforce user. It is not intended for production use.

Conclusion

By following the above steps, you should have the questionBank component set up and running in your Salesforce organization. This component serves as a great starting point for developers looking to understand how to create and use custom Lightning Web Components in Salesforce.

Feel free to modify and adapt the component as per your requirements and use case.

Example Usage

lwcquestionbank's People

Contributors

carlcarter avatar

Watchers

 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.