Preview Image

The official internal PHP utility library and Flight tooling reference for SuiteCRM .development.   16 UTIL FUNCTIONS 16 FLIGHT TOOLS  Reference portal: flight.outrightcrm.com — login required   Outright Utils is the internal PHP utility library built on top of SuiteCRM's core SDK.

The official internal PHP utility library and Flight tooling reference for SuiteCRM .development.  


16 UTIL FUNCTIONS 16 FLIGHT TOOLS 

Reference portal: flight.outrightcrm.com — login required  


Outright Utils is the internal PHP utility library built on top of SuiteCRM's core SDK. Rather than repeating the same patterns across every project, the team consolidated the most commonly used operations such as bean retrieval, relationship handling, SQL execution, email dispatch, logging, and more into 16 globally available functions. This reference covers every function signature, its parameters, and how they combine in real-world workflows.  


What is Outright Utils?  


Internal PHP utility library for SuiteCRM development 


Outright Utils is the internal PHP utility library developed and maintained by the team. It wraps commonly repeated SuiteCRM patterns into clean, reusable functions — reducing boilerplate and enforcing consistent patterns across all projects.  


Think of it as the team's standard library on top of SuiteCRM's core SDK. All functions are globally available after the library is loaded.  


flight.outrightcrm.com/search_utils.php — login required via Google or Microsoft 


Learn More: Day 5: SuiteCRM SQL — MySQL & PHPMyAdmin Practice


All 16 Utility Functions  


Complete reference with signatures, parameters, and usage descriptions  


1. outright_retreive   



    Retrieves a single SuiteCRM Bean record by module name and record ID. Returns null if not found or deleted.


    PARAMETERS



    2. outright_find_relationship_name



    Finds and returns the relationship link name between two modules. Useful when you need the link name dynamically rather than hardcoding it. 


    PARAMETERS



    3. outright_run_sql



    Executes a raw SQL query and returns all rows as an array of associative arrays. Always includes error handling and logging on failure.


    PARAMETERS



    4. outright_run_sql_one_row



    Executes a SQL query and returns only the first row as an associative array. Returns .null if no rows found. Ideal for COUNT queries and single-record lookups.


    PARAMETERS



    5. outright_retreive_list



    Fetches a list of Bean records from a module with optional WHERE clause, ORDER BY, and LIMIT. Returns an array of SugarBean objects.


    PARAMETERS



    6. outright_add_relationship



    Creates a relationship link between two Bean records using SuiteCRM's native relationship API. Fires all relationship hooks correctly.


    PARAMETERS



    7. outright_send_email



    Sends an email using SuiteCRM's configured outbound mail settings. Supports HTML body, CC/BCC, and attachments via options array.


    PARAMETERS



    8. outright_html_table_new



    Generates an HTML table string from headers and data rows. Used for building dynamic email content, PDF reports, and inline HTML outputs.


    PARAMETERS



    9. outright_return_fields_info



    Returns detailed metadata for all fields in a given module — including type, label, required flag, default value, and options for dropdowns. Reads from vardefs.  


    PARAMETERS 



    10. outright_get_module_fields



    Returns a flat array of all field names for a given module. Lighter than outright_return_fields_info when you only need field names, not full metadata.


    PARAMETERS 



    11. outright_return_fields_by_type



    Returns all fields of a specific type from a module's vardefs. Useful for finding all related fields, currency fields, or custom fields of a type.


    PARAMETERS



    12. outright_print



    Debug helper that pretty-prints any variable as formatted HTML output. Optionally halts execution after output. Use in development only.


    PARAMETERS



    13. outright_get_correct_bean



    Returns a fresh empty Bean instance for the given module name, handling custom module path resolution. Safer than calling BeanFactory::getBean() directly.  


    PARAMETERS  



    14. outright_do_repair



    Programmatically triggers SuiteCRM repair operations — Quick Repair & Rebuild, rebuild extensions, clear vardefs cache. Returns an array of results for each action.


    PARAMETERS



    15. outright_error_log



    Writes a structured log entry to suitecrm.log with a consistent format including timestamp, level, and optional context data.


    PARAMETERS



    16. outright_load_relationship



    Loads and returns all related Bean records through a named relationship link on a given bean. Handles load_relationship() internally and returns a clean array of related beans.


    PARAMETERS



    Usage Example — Combining Utils Functions


    A real-world example using multiple utils together. The example below chains 8 util functions together:


    • Retrieve an Account bean by ID
    • Find the relationship link name dynamically
    • Load all related Contact beans via that link
    • Build rows for an HTML table
    • Generate the HTML table string
    • Send it as an email
    • Run a COUNT query to get the total contacts
    • Log the result to suitecrm.log

      PHP



      Internal Flight Tools


      Web-based scaffolding tools available at flight.outrightcrm.com


      Emergency Entry Point


      A special always-accessible entry point for critical server-side operations. Use when normal admin routes are unavailable — e.g. broken cache, locked-out admin, or a corrupt extension blocking the UI.


      Access via /index.php?entryPoint=emergency with server-level credentials.


      NEVER expose or share this endpoint externally. Treat it like a master key.


      # TOOL NAME VER DESCRIPTION 
      01 Create Models 1.0 Generate a perfectly structured SuiteCRM Bean model — vardefs, metadata, and language files — in one click. The definitive starting point for any new custom module. 
      02 Create Dropdown Language File 1.0 Create dropdown language files by pasting CSV content directly or uploading a CSV file. Outputs ready-to-deploy PHP language arrays with correct array keys. 
      03 Manifest Generator 1.0 Build a valid manifest.php for Module Loader packages. Ensures the correct structure for installable zip deployments — no more hand-crafting manifest arrays. 
      04 Export Module 1.0 Export all Outright custom modules into a single deployable package. Ideal for migrating between staging and production environments. 
      05 Cron Job Creator 1.0 Scaffold a complete Scheduled Job without writing code — generates the function, scheduler registration entry, and language metadata file. 
      06 EntryPoint Builder 1.0 Generate a complete Entry Point package — registry file, handler PHP with security guard, and auth flag — without manually writing any code. 
      07 Fake Subpanel 1.0 Create SQL query-based subpanels that display custom data on any Detail View. Not limited to native SuiteCRM relationships — any SQL query can power the panel. 
      08 API Builder 1.0 Generate API field definitions and layouts for custom modules without writing vardef code. Point-and-click field configuration with immediate output. 
      09 Logic Hook Generator (Lite) 1.0 Scaffold basic Logic Hook registration files and handler class skeletons for any module and hook type — before_save, after_save, and more. 
      10 Logic Hook Generator (Premium) 1.0 Advanced hook generator with full template support — includes condition scaffolding, notification stubs, Google Chat integration, and multi-hook batching in one package. 
      11 Button Manager 1.0 Add custom action buttons to any view (DetailView, EditView, ListView, etc.) without editing core layout files manually. Configure label, action, and target module via UI. 
      12 Replace Manager 1.0 Clone an existing module package and perform a bulk key replacement across all files at once — e.g. swap every instance of gcal -> office365 to create a parallel integration. 
      13 Virtual Host Creator (VHOSTS) 1.0 Generate Apache or Nginx Virtual Host configuration files for new SuiteCRM instances with correct directory paths, permission settings, and SSL stubs. 
      14 Menu Manager 1.0 Create and manage module navigation menus instantly — add or reorder items in the top navigation bar without writing PHP extension files manually. 
      15 Outright Utils (v44) 1.0 The interactive reference and search tool for all Outright Utils functions. Browse signatures, parameter descriptions, and live usage examples. Always reflects the current installed version. 
      16 Code Generator 1.0 Generate fields, buttons, and UI components for any module without writing code. Input your requirements and receive deployable PHP output ready for the custom/ directory. 

      Outright Utils — Internal Developer Reference | Dev Only


      All 16 tools at flight.outrightcrm.com — Login with Google or Microsoft company account


      Conclusion


      Beyond the utility functions themselves, the Outright Utils ecosystem extends into Flight — a suite of 16 web-based scaffolding tools available at flight.outrightcrm.com. From generating Bean models and Logic Hooks to managing menus and virtual hosts, Flight eliminates repetitive manual work. Tool 15 serves as the interactive reference for Outright Utils itself, always reflecting the current installed version. Both resources together define the team's standard development workflow on SuiteCRM.

      Respond to this article with emojis
      You haven't rated this post yet.