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
Glenn DalyGlenn Daly 

Hyphen cutting off string when using subject.left

Firstly, apologies, I'm not a developer! We have a piece of code that reads as follows

  String ref = ' (Ref:IN:' + incident.Name + ')';
                  subject = subject.left(235) + ref;

When we try to send an email from within the Remedyforce console it should populate the subject line like so "This is a test subject Ref:IN:00125455"

However if the subject has a hypen, it will not pull through any of the subject before the hyphen.

For example if my subject is "This is a test subject" - This really is a test subject it will pull through "This really is a test subject Ref:IN:012546" 

Any ideas on how we can prevent it chopping anything off to the left of the hyphen?
UC InnovationUC Innovation
Can you provide the line of code where you store the subject. I think i know what is going on but i just want some more info on your issue. Also can you give another example of what your code should do vs what it is doing.