Hi all,
I've setup some webservices which returns the contents of a XMLport. Therefor i used the guides found here:
http://www.kauffmann.nl/blog/index.php/ ... ervices-1/
Also i've set up some specific filtering in the result, which works from the codeuit. But it seems that when the input isn't correct the webservice returns a unfiltered XMLPort as a result. Is there a way to just return with an empty XMLport or error string?
Heres the code i've tried:
UserPermissions(VAR UserPermission : XMLport "User Permissions";userId : Code[10])
IF userId <> '' THEN
BEGIN
users.SETFILTER(users."No.", userId);
UserPermission.SETTABLEVIEW(users);
END
ELSE
//TODO: empty values instead of unfiltered XMLPort
ERROR('Enter UserID');
Thanks in advance,
NoiK
Comments
users.setfilter("no.", '%1', '');
or something like that.
eg
OnPreXMLPort
IF Users.GETFILTER("No.") = '' THEN
currXMLport.BREAK;