Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • To Fetch Records:

    • Table Setup:

      • Drag and drop a Table component onto layout Designer

      • Add Table action as New and Refresh

      • Add row action on Table as Edit and Delete

    • Assign Model Assignmentto Component:

      • Assign a model to the Table with the following details:

        • Type: API

        • Connection: Choose a connection e.g. Sales Connect

        • Label : gets Auto-populates e.g. Sales Connect

        • Name : gets Auto-populates e.g. Sales Connect

    • Request:

      • Method: GET

      • URL: /services/data/v56.0/query?q=select id,name,site from account

      • Record Count: Multirecord

    • Response:

      • Define or create a schema to fetch the response. This schema will structure the data received from the API call

        Code Block
        {
            "data": {
                "records": {
                    "Name": "Test",
                    "Id": "123456789",
                    "Site": "Pune"
                }
            }
        }
    • In Component Attributes:

      • Basic:

        • Model: Select the model e.g. Sales Connect

        • Schema Source: Select "Response" as the source

        • Response code: Set the response code to 200

        • In Fields:

          • Select data > record

        • Click on the Table component, and the Model fields will be displayed on the left side

        • Drag drop the fields on the Table component

    • Create a workflow follow the steps we create it

      • Drag drop Show Spinner Action and define layout item i.e. Table, variant and size

      • Drag drop Rest API Action define

        • Source API Type: Model

        • Model: Select The model assign to the Table e.g. Sales connect

      • Drag drop Hide Spinner Action and define layout item

      • Connect the action i.e. Show Spinner------>Rest API Action------>Hide Spinner

      • Save the workflow

    • Call the workflow on component events

      • Refresh : tableAction

        • Select Action as Workflow

        • Select Config and define Select Workflow: (Select the workflow create for Get e.g. Get and Save

      • Save & Run the Layout

      • On Preview Click on Refresh Button, Get workflow will be executed fetching the records

    • To Create Records:

      • Method: POST

      • URL: Provide the endpoint for creating records.

      • Body: Define the data to be created using the Model and Schema.

    • To Update Records:

      • Method: PUT or PATCH (depending on your API)

      • URL: Set the endpoint for updating records.

      • Body: Specify the data to be updated using the Model and Schema.

    • to To Delete Records:

      • Method: DELETE

      • URL: Input the endpoint for deleting records.

...