You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

fetching standard text using folder id and name

Accepted answer
edited Jul 7, 2016 10:56PM in Integrations and APIs 2 comments



I am working on automatically sending Email out of incident status change. We have Standard Texts/Snips for various states of the incident for each language. 

Each of the "ContentTypeValues" object of "$standardContent" in my below code  has null values in it. 

Could someone help me how to get the value (actual text and html text) of the standard text?  

PS: I am using Feb 2016 version.



Senthil K

Code Snippet

             // search condition 
$whereClause = sprintf(" Folder.LookupName = '%s' AND LookupName = '%s' ", RNCPHP\ROQL::escapeString($folderId), RNCPHP\ROQL::escapeString($name));
// Standard Text object
$standardContent = RNCPHP\StandardContent::first($whereClause);

// loop through each content value
foreach ($standardContent->ContentValues as $key => $value) {             
    foreach ($standardContent->ContentValues->$key as $k => $val) {
        Log::Info('StandardContentValue Key - ' . $k);         
        Log::Info('StandardContentValue value -

Howdy, Stranger!

Log In

To view full details, sign in.


Don't have an account? Click here to get started!