Coder Social home page Coder Social logo

caretgrowth / zoho-grid-widget-vue Goto Github PK

View Code? Open in Web Editor NEW
13.0 3.0 8.0 1.29 MB

A Zoho widget example based on Vuejs to display a table of data from an external source

License: GNU General Public License v3.0

JavaScript 57.31% HTML 3.28% Vue 39.41%
zoho vue vuex javascript zoho-widget zoho-crm zoho-creator

zoho-grid-widget-vue's Introduction

zoho-grid-widget-vue

This is an example widget that leverages the Vue Javascript Framework (w/ Vuex) to create a dynamic related list that can fetch data from any external source and display directly in your CRM or Creator app.

This project integrates the Zoho Embbeded SDK to leverage callouts to external services as well as providing data from the related record. This example fetches a list of public repos in the ZohoDevelopers github organization by default, but can also accept custom values based on a custom field from the module.

image

Project setup

Download and install the app

git clone [email protected]:caretgrowth/zoho-grid-widget-vue.git
cd zoho-grid-widget-vue
yarn install

Setup Zoho Connector

To make callouts to 3rd party APIs, you must setup a Connector to the service you want to leverage. Be sure to note the link name as it is required in the script. For this specific demo, you must create a connector to Github service with the user scope. You must update the value in store/index.js file with the link name of your connection.

image

Create Widget and Related List (CRM)

  1. Create and login to a sandbox (local hosted only works with sandboxes)
  2. Create a widget
    1. Widget Type: Related List
    2. Hosting: External
    3. Base URL: http://localhost:8080/index.html
      • make sure this url matches your locally running app
  3. Add the related list to the record view
    • Open a record of the type you wish to install
    • Click "Add Related List" from the side panel on the left
    • Choose Widget and Install the widget you created in step 2
  4. Make sure you are running the app with yarn serve and that you can access it outside the CRM at the Base Url from above. It won't fully work, but you should be able to see the controls load with no errors in the console.
  5. Refresh the page and navigate to the new widget in the CRM

Optional: Create Github Username Field

To demonstrate the integration with the related record, you can create a field on the module called "Github Username". Updating this value will fetch all public repos for that user. The username should match the value from the github url to the repository.

Compiles and hot-reloads for development

yarn serve

Compiles and minifies for production

yarn build

This command will compile all files in the dist directory and uses zet pack to create a deployable zip file. The zip file will be the name of the root folder of the project and be put in the dist directory. This is the file you can upload to be hosted by Zoho. Built files will be created /app for compatibility with zet pack command.

Lints and fixes files

yarn lint

Customize configuration

To make this a creator app, all you need to do is update the value in the plugin-manifest.json from "CRM" to "CREATOR". This value is leveraged by the Zoho Extension Toolkit and will cause build/validate errors if removed.

For most APIs where you only want to recieve data and display in the grid, you should only have to change two parts of the application to get it working:

  1. store.state.grid_columns - You must modify the array to include the fields from the returned data with the exact names of the post processed data.
  2. Customize the Action setGridData to fetch and process the specific API you need to interact with.

It is recommended you remove the Debug Information Buttons before publishing. These are good for troubleshooting async issues but aren't necessary to the users.

Code of Conduct

Please refer to the code of conduct for expectations of contributors and participants.

Contributions

Check out the contributing guidelines for more information.

zoho-grid-widget-vue's People

Contributors

dependabot[bot] avatar mikesimps avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

zoho-grid-widget-vue's Issues

Debugging not working on Visual Studio Codespaces

Due to time constraints wasn't able to also test on a more local setup of VS Code. Clean clone of the widget code into a Codespaces environment ran just fine connected to a live CRM instance using the README.md instructions, but debugging doesn't seem to work even when running 'serve' in Debug mode.

Styling doesn't match new CRM UI styling

Font size used in widget code doesn't quite match that of the new CRM UI making the widget look slightly out of place.

See screenshot, 'Attachments' is standard CRM and 'StarG' is the out-of-the-box widget code.

Screenshot 2020-05-01 at 21 10 44

Screenshot taken on macOS Catalina running Edge (Chromium) - Version 81.0.416.64 (Official build) (64-bit).

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.