• Siboniso Zwane
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 0
    Replies
Good day Developers,

I am struggling to find the solution to this problem.  

/** this function will get leave reason if needed
*  @param email_linesP is array containing all the email lines
*  @return reason string will be returned
*/
    private String getLeaveReason( List< String > email_linesP ){
        
        String reason_string = '';              //this is the reason string
        
        //check if we dont have reason
        if( m_reason_index != -1 ){
            
            //loop through the email lines
            for( Integer i = m_reason_index + 1; i < email_linesP.size(); ++i ){
                
                //check if current line has : charecter( will indicate keyword )
                if( email_linesP[ i ].contains( ':' ) )
                    break;                                  //leave the loop
                
                reason_string += email_linesP[ i ] + '\n';          //append line
                
            }//end of for-block
            
        }
        else
            reason_string = 'No Reason Provided';       //set the reason string to default value
        
        return reason_string;                   //return the reason 
        
    }//end of function definition

The above code is returning the correct information except for when there is no reason for my reason_string, instead it returns a "NULL" value instead of 'No Reason Provided' which is the reason_string. how do I get it to reflect 'No Reason Provided' instead of "NULL"
Hello

Is there a way of saving files via Salesforce into Sharepoint or Azure. I am aware of the files connect, but that only allows for access to files in these external source. What I am looking for is a way to save files via Salesforce into Sharepoint or Azure without using the limited Salesforce space.

Thank you