I am trying to retrieve FilterDefinitions from our account. The Fuel SDK doesn't have this object by default, so I created my own class that looks like this:

// spl_autoload_register( function($class_name) {
//     include_once 'src/'.$class_name.'.php';
// });
namespace FuelSdk;

* ET_FilterDefinition - Represents a FilterDefinition in a Marketing Cloud account.
class ET_FilterDefinition extends ET_CUDSupport
    * @var int  Gets or sets the folder identifier.
    public  $folderId;

    * Initializes a new instance of the class and will assign obj, folderProperty, folderMediaType property 
    function __construct()
        $this->obj = "FilterDefinition";
        //$this->folderProperty = "CategoryID";
        //$this->folderMediaType = "query";

Creating my own class in this way has worked for several other objects including

  • AccountUser
  • Portfolio
  • Query
  • SendClassification
  • SenderProfile
  • Template

This works too, if I pass a few known Properties to it that are listed here: https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-apis.meta/mc-apis/filterdefinition.htm

What doesn't work is if I try to pass NO properties. When I do that, I get the error message below.

The error I'm getting is Error: Partner Properties are not allowed in this context

The reason I am trying to retrieve with no properties is because usually, I get ALL properties back, and that helps me figure out what properties are actually retrievable. But in this case, I cannot get all properties back because of this error.

  • Can you provide the soap envelope your code produces? – EazyE Jun 7 '19 at 15:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.