Implementing Role-Based Access Control (RBAC) in Payload CMS with Next.js

Role-Based Access Control (RBAC) in Payload CMS and use it in a Next.js frontend to restrict access. Steps: Define Roles in Payload CMS Update users collection in payload.config.ts: ts Copy Edit import { CollectionConfig } from ‘payload/types’; const Users: CollectionConfig = { slug: ‘users’, auth: true, access: { read: ({ req: { user } })… Continue reading Implementing Role-Based Access Control (RBAC) in Payload CMS with Next.js

Work orders not listing for completion

In NetSuite, work orders which are “In Progress” can only be marked as “Completed.” To ensure a work order is eligible for completion, the WIP (Work in Progress) checkbox must be checked in the Work Order record. The WIP checkbox in NetSuite’s work order helps you track the Work in Progress status of the work… Continue reading Work orders not listing for completion

Implementing Secure Server-Side Configurations in Payload CMS

Securely managing server-side configurations in Payload CMS prevents vulnerabilities and unauthorized access. This article covers environment variables, access control, and authentication best practices. Key Features: Using .env for secure configuration Implementing API authentication with JWT Restricting data access using Payload’s built-in access control Example: Securing API Calls with JWT Enable JWT Authentication in Payload CMS:… Continue reading Implementing Secure Server-Side Configurations in Payload CMS

Building Custom Lexical Plugins in Payload CMS 3.x

he introduction of the Lexical editor allows developers to create custom plugins for rich text editing in Payload CMS. This article explains how to add custom toolbar buttons and new block types. Key Features: Creating a custom Lexical editor plugin Adding new toolbar actions Extending block elements Example: Custom Toolbar Button in Lexical Editor Adding… Continue reading Building Custom Lexical Plugins in Payload CMS 3.x

Integrating Payload CMS with Next.js: Best Practices

 Since Payload CMS 3.0 introduced native support for Next.js, developers can now build high-performance CMS-driven applications efficiently. Key Features: Server-side rendering (SSR) and static site generation (SSG) API routes for dynamic content fetching Authentication and session management Example: Fetching CMS Data in Next.js Using getServerSideProps for SSR: export async function getServerSideProps() {  const response =… Continue reading Integrating Payload CMS with Next.js: Best Practices

Optimizing MongoDB Queries in Payload CMS 3.24

Description: Learn how the latest Payload CMS update enhances MongoDB query performance through optimized indexing, pagination improvements, and better filtering techniques. Key Features: Improved indexing strategies for faster lookups Optimized .find() queries to reduce load time Using aggregation pipelines for efficient data processing Example: Optimizing Query Performance Instead of fetching all documents and filtering in… Continue reading Optimizing MongoDB Queries in Payload CMS 3.24

Alert on Sales Order for Item $0.00

Limitations of Standard Workflow Possibilities: NetSuite does not provide a Confirm (Warning) action for sublist items after adding each item or before submitting the record. If we use the Return User Error action before submitting the record, all entered details will be lost since the error message appears in a new tab. Additionally, it is… Continue reading Alert on Sales Order for Item $0.00

Unable to Fetch Values from Email Message ST & Email Activities ST in Saved Search

Communication Messages – Need to include all communication messages, excluding invoices and service order emails. Communication Activities – Need to include all activity types (calls, events, etc.). Sales Email Messages ST – Should fetch all email messages under Sales. Sales Email Activities ST – Should fetch all email activities under Sales. Provide a solution to… Continue reading Unable to Fetch Values from Email Message ST & Email Activities ST in Saved Search

Created By field Setup in Sales Order

For new transactions, create a new workflow as mentioned in the description. Navigate to Customization > Workflow > Workflows > New On the Workflow setup page, click the set the fields below: Name: <Set your Workflow name here> Record Type: Transaction Sub Types: <Select any transaction type> Execute as Admin: Yes Release Status: Testing/Released Keep… Continue reading Created By field Setup in Sales Order