function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sumant Kuchipu 1Sumant Kuchipu 1 

URL field

Hi,

Working on replacement of standard Notes & Attachments, for this Created a custom attachment object which has fileName, filedownloadLink, etc
and created a VF page which uploads file 
and controller to upload process to BOX and returns the download URL (its too big) and inserts custom attachment object  with that information
and as soon as uploaded, the current page loads with the created new attachment record with download link.

Here I was not able to insert attachment since the following error is throwing.
Attachment Creation Error Insert failed. First exception on row 0; first error: STRING_TOO_LONG, BoxDownloadUrl: data value too large:
BoxAttachment__c obj = new BoxAttachment__c();
obj.FileName__c = fileName; // this text field
obj.BoxDownloadUrl__c = fileDownloadURL; // this URL field 
obj insert;
I think URL field doesn't allows morethan 255 chars, is there any alternate way to have a download link to a field? 

 
NagendraNagendra (Salesforce Developers) 
Hi Sumant Kuchipu 1,

Please find the below thread with similar discussion. Hope this helps.

Best Regards,
Nagendra.P