Friday, January 4, 2019

PHP Toolkit 2012.2 : Add Request Level Preference

The out-of-the-box version of the PHP Toolkit 2012.2 does not include Preferences setting for web service requests. You can add this by adding a function similar to the one below in NSPHPClient.php and invoking it after setPAssport:

public function setPreferences($warnerror, $mandavalid, $custnotes, $readonly) {
        $this->preferences = new Preferences();
        $this->preferences->warningAsError = $warnerror;
        $this->preferences->disableMandatoryCustomFieldValidation = $mandavalid;
        $this->preferences->disableSystemNotesForCustomFields = $custnotes;
        $this->preferences->ignoreReadOnlyFields = $readonly;

        $this->addHeader("preferences", $this->preferences);


No comments:

Post a Comment