You need to sign in to do that
Don't have an account?
agab
Error when invoking an Apex method with arguments from an s-Control
Hello,
I have an Apex method that takes an argument; I am invoking this method from an s-Control. The call works fine when I invoke the method with no arguments or with an argument such as a String or a Standard SF Object (e.g. Lead, Account, etc...). However when the argument is of the type of my own Apex Class i get the following error:
{faultcode:'soapenv:Client',faultstring:'There is no public member called 'type' in the Apex class 'myApexClass',}
'myApexClass' in fact does not have an attribute called 'type' (which is a reserved keyword so I cannot create such an attribute anyway) and nowhere in my code am I referring to such an attribute so I do not understand why it is looking for it.
Has anyone encountered this error before? Thanks.
agab-
So you can't pass in a class into an argument for a method. You can pass in an instance of that class into an argument for a method.
I think the error message is not telling you what the issue really is.
In your scontrol you need to create an instance of that Apex class then pass the instance to the class.
I am just guessing here but this is what I would think of if I were faced with the same issue.
http://community.salesforce.com/sforce/board/message?board.id=ajax_toolkit&message.id=5312