Summary:

Users may be unable to create views longer than 3900 characters in Sage CRM when using browsers other than Internet Explorer.

Symptoms: 

The issue can be reproduced by attemptign to create a view with a length greater than 3900 characters. Here's an example:

create view vLongView as
select comp_name as comp_name1, comp_name as comp_name2, comp_name as comp_name3, comp_name as comp_name4, comp_name as comp_name5,
    comp_name as comp_name6, comp_name as comp_name7, comp_name as comp_name8, comp_name as comp_name9, comp_name as comp_name10,
    comp_name as comp_name11, comp_name as comp_name12, comp_name as comp_name13, comp_name as comp_name14, comp_name as comp_name15,
    comp_name as comp_name16, comp_name as comp_name17, comp_name as comp_name18, comp_name as comp_name19, comp_name as comp_name20,
    comp_name as comp_name21, comp_name as comp_name22, comp_name as comp_name23, comp_name as comp_name24, comp_name as comp_name25,
    comp_name as comp_name26, comp_name as comp_name27, comp_name as comp_name28, comp_name as comp_name29, comp_name as comp_name30,
    comp_name as comp_name31, comp_name as comp_name32, comp_name as comp_name33, comp_name as comp_name34, comp_name as comp_name35,
    comp_name as comp_name36, comp_name as comp_name37, comp_name as comp_name38, comp_name as comp_name39, comp_name as comp_name40,
    comp_name as comp_name41, comp_name as comp_name42, comp_name as comp_name43, comp_name as comp_name44, comp_name as comp_name45,
    comp_name as comp_name46, comp_name as comp_name47, comp_name as comp_name48, comp_name as comp_name49, comp_name as comp_name50,
    comp_name as comp_name51, comp_name as comp_name52, comp_name as comp_name53, comp_name as comp_name54, comp_name as comp_name55,
    comp_name as comp_name56, comp_name as comp_name57, comp_name as comp_name58, comp_name as comp_name59, comp_name as comp_name60,
    comp_name as comp_name61, comp_name as comp_name62, comp_name as comp_name63, comp_name as comp_name64, comp_name as comp_name65,
    comp_name as comp_name66, comp_name as comp_name67, comp_name as comp_name68, comp_name as comp_name69, comp_name as comp_name70,
    comp_name as comp_name71, comp_name as comp_name72, comp_name as comp_name73, comp_name as comp_name74, comp_name as comp_name75,
    comp_name as comp_name76, comp_name as comp_name77, comp_name as comp_name78, comp_name as comp_name79, comp_name as comp_name80,
    comp_name as comp_name81, comp_name as comp_name82, comp_name as comp_name83, comp_name as comp_name84, comp_name as comp_name85,
    comp_name as comp_name86, comp_name as comp_name87, comp_name as comp_name88, comp_name as comp_name89, comp_name as comp_name90,
    comp_name as comp_name91, comp_name as comp_name92, comp_name as comp_name93, comp_name as comp_name94, comp_name as comp_name95,
    comp_name as comp_name96, comp_name as comp_name97, comp_name as comp_name98, comp_name as comp_name99, comp_name as comp_name100,
    comp_name as comp_name101, comp_name as comp_name102, comp_name as comp_name103, comp_name as comp_name104, comp_name as comp_name105,
    comp_name as comp_name106, comp_name as comp_name107, comp_name as comp_name108, comp_name as comp_name109, comp_name as comp_name110,
    comp_name as comp_name111, comp_name as comp_name112, comp_name as comp_name113, comp_name as comp_name114, comp_name as comp_name115,
    comp_name as comp_name116, comp_name as comp_name117, comp_name as comp_name118, comp_name as comp_name119, comp_name as comp_name120,
    comp_name as comp_name121, comp_name as comp_name122, comp_name as comp_name123, comp_name as comp_name124, comp_name as comp_name125,
    comp_name as comp_name126, comp_name as comp_name127, comp_name as comp_name128, comp_name as comp_name129, comp_name as comp_name130,
    comp_name as comp_name131, comp_name as comp_name132, comp_name as comp_name133, comp_name as comp_name134, comp_name as comp_name135,
    comp_name as comp_name136, comp_name as comp_name137, comp_name as comp_name138, comp_name as comp_name139, comp_name as comp_name140,
    comp_name as comp_name141, comp_name as comp_name142, comp_name as comp_name143, comp_name as comp_name144, comp_name as comp_name145,
    comp_name as comp_name146, comp_name as comp_name147, comp_name as comp_name148, comp_name as comp_name149, comp_name as comp_name150,
    comp_secterr, comp_createdby, comp_channelid, comp_primaryuserid
from company



Cause:

This issue is being caused by a maxlength of 3900 being applied to the CuVi_ViewScript textarea. This maxlength property is also present in IE, but doesn't do anything. The maximum statement length in SQL Server is much more than 3900 characters long.

Resolution:

This issue was raised to the development team for a fix, and is resolved in patch 7.3c (August 2015) onwards.

In earlier versions of Sage CRM, the issue can be worked around by using Internet Explorer, or by adding the following script at the end of the SecTerrColumnsRequiredForPrimaryEntityView caption:

<script>
$(document).ready(function () {

$('textarea[name=CuVi_ViewScript]').removeAttr("maxLength");
});
</script>