Module Builder by VTExperts
  • 1. How to delete or a modify a custom module created via Module builder
  • 2. Custom module shows error on record saving
  • 3. Changing the name of the custom module
  • 4. Mass sending emails through a custom module
  • 5. Can we change the custom module icon?
Powered by GitBook
On this page
  • Problem
  • Reason
  • Solution
  • Solution 1: Deactivate the field you just created
  • Solution 2: Delete unused or inactive fields.
  • Solution 3: Update table column field length.
  • Solution 4: Move fields to another table
Export as PDF

2. Custom module shows error on record saving

The module designed through custom module builder shows error on saving the record

Previous1. How to delete or a modify a custom module created via Module builderNext3. Changing the name of the custom module

Last updated 9 months ago

Problem

Custom module builder shows error when a record is saved (Record you are trying to access is not found), regardless of the error the record is saved and when client tries to access the record it shows the error again

The following error is shown when user tries to save the record in custom module

Reason

This issue arises due to the limitation of adding field to the custom module

If you do it right, you can create unlimited number of fields. VTiger does not have limitations - MySQL does. Long story short, you can create up to 150 text fields with a length of 255

  • This only applies to TEXT fields.

  • This limit is only PER MODULE (not total fields in vtiger).

  • You can create unlimited number of text area, currency, integer, date fields.

VTiger has separate table for each module's custom fields. The table only fills up when you create picklist and text fields, because those are stored as 'varchar'

If you hit the limit (after creating a custom field), you will will not be able to access module and will get error messages:

  • Record you are trying to access is not found

  • {"success":false,"error":{"code":"Record you are trying to access is not found","message":"Record you are trying to access is not found","title":null}}

Solution

There are four different ways to tackle this problem, which are as following

Solution 1: Deactivate the field you just created

Once the field is deactivated, you will be able to use the module. NOTE: You should not re-enable this field, keep disabled and forget about it. (create new one after applying one of the solutions below)

Solution 2: Delete unused or inactive fields.

If there are fields you do not use - delete them. (don't just hide then, but delete them using recycle bin icon).

If there are fields that you've hidden in the past and you will not use those, then you should unhide the fields and delete them.

Solution 3: Update table column field length.

This requires knowledge of MySQL.

  • Find the table used for that module e.g vtiger_contactscf (table ends with cf, contacts - would be name of your module).

  • Look at the columns and you will see many as "cf_xxxx" varchar(255).

    • tiger by default sets 255 length and that is the problem. This is how many characters the field can hold.

  • For fields you are certain, change length to 50, 100, etc.. or whatever makes sense

    • By doing so, you are risking to lose data. If a field holds "150" characters of data and the length changes to '50' - it will truncate the data to 50 chars, meaning that everything after 50th character will be truncated.

Solution 4: Move fields to another table

This requires knowledge of MySQL

  • Find the table used for that module e.g vtiger_contactscf (table ends with cf, contacts - would be name of your module).

  • Copy columns into another table vtiger_contactdetails, etc...

  • For each copied field, delete it from vtiger_contactscf

  • For each copied field, update vtiger_field - tablename.

NOTE: This is not recommended unless you know exactly what you are doing. There can be dependent tables that store original table name (filters, workflows, etc...) and certain things can stop working

Here' why:

https://dev.mysql.com/doc/refman/5.7/en/column-count-limit.html
When record in custom module is created it shows this error
Upon accessing the record, CRM shows this error