Could we access the webservice objects within javascript too? for example this:
global class TestInvocable<br />{<br /> global class DispatchInfo <br /> {<br /> webservice Date dispatchDate;<br /> webservice String shippingCompany;<br /> }<br /> webservice static String testInvocableMethod(DispatchInfo dispatch)<br /> {<br /> System.debug('Dispatch info');<br /> System.debug('date: ' + dispatch.dispatchDate);<br /> System.debug('shipping company: ' + dispatch.shippingCompany);<br /> <br /> return 'Ok';<br /> }<br />}
I need to access the ‘DispatchInfo’ object within my code snippet. I tried doing something like this:
var dipatchInfo = sforce.Xml('DispatchInfo');
but this doesnt work as dipatchInfo was always undefined. Any help on this would be appreciated. Thanks.