function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Max PowerMax Power 

webservice attributes from base class aren't being delivered to calling javascript

I've developed an Apex web service that returns a custom Apex object.  The defined return type of the webservice method is an abstract base class, but the actual object returned by the method is an instance of one of two derived classes.  This webservice is being called from the onClick javascript for a custom button that I've added to one of my detail pages.  All the attributes that I want to be able to access are declared using webservice scope.  The problem that I've run into is that the javascript object that is returned as a result of the sforce.apex.execute( ) call contains only the webservice attributes from the derived class.  All of the webservice attributes from the base class are missing in the javascript object.
Why is this?  Is there something special that I have to do here?
To work around this issue, I have temporarily duplicated the data in both derived classes and simply used the base class as a makeshift interface (since Apex wouldn't let me return an interface from a webservice method), and this works, but I shouldn't have to do this.  Does anyone know how I can get this to work?  Any help would be greatly appreciated.
Thanks in advance,