• Daytona Jim
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies

I"m attempting to strip a specific line of text from a text field.  In my current trigger, I can substring the text field but what I really want to do is have the starting position of the substring to be dynamic based on finding specific text.   In other words, when I find the text 'subject:', I want to start at subject and get the next x number characters of text.  It would be great if I could get all text starting at subject and then ending at another string such as :end...but I'd settle for just retrieving subject: plus 100 characters.  Any idea how to use FIND other function to making the starting position of the substring dynamic.

 

This is my trigger.

 

1
2
3
4
5
6
7
8
9
trigger PassLongField on BMCServiceDesk__Incident__c (before update) {
    for (BMCServiceDesk__Incident__c Incident : System.Trigger.new) {

                      
            Incident.Description_Strip_Text__c=Incident.BMCServiceDesk__incidentDescription__c.substring(0,100); 
       
  }

}

I"m attempting to strip a specific line of text from a text field.  In my current trigger, I can substring the text field but what I really want to do is have the starting position of the substring to be dynamic based on finding specific text.   In other words, when I find the text 'subject:', I want to start at subject and get the next x number characters of text.  It would be great if I could get all text starting at subject and then ending at another string such as :end...but I'd settle for just retrieving subject: plus 100 characters.  Any idea how to use FIND other function to making the starting position of the substring dynamic.

 

This is my trigger.

 

1
2
3
4
5
6
7
8
9
trigger PassLongField on BMCServiceDesk__Incident__c (before update) {
    for (BMCServiceDesk__Incident__c Incident : System.Trigger.new) {

                      
            Incident.Description_Strip_Text__c=Incident.BMCServiceDesk__incidentDescription__c.substring(0,100); 
       
  }

}

Hello,

 

I've instaled Milestones PM - Project Management however when I click on Initialize the app I get the following error:

 

Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, Milestone1_Task_Trigger: execution of AfterInsert caused by: System.DmlException: Insert failed. First exception on row 0; first error: LIMIT_EXCEEDED, Maximum per user subscription limit reached.: [] Class.Milestone1_Task_Trigger_Utility.handleTaskAfterTrigger: line 65, column 9 Trigger.Milestone1_Task_Trigger: line 8, column 3: []

 

An unexpected error has occurred. Your development organization has been notified.

 

 

Can anyone help?

 

Thanks

Matt