• Viktor Ilyuhin
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 2
    Replies
Hi gays

I have standart page with button section. This section has any custom buttons, which call JavaScript. It is work very well, but only classical mode.

How I can make button with call to metod the Apex class from in Lightning mode ?
Hi guys

I try to create Custom web service for call it from external application

1. Created simple apex class in sandbox
global class MyWebService {    webService static Integer SumValue(Integer a, Integer b) {
        return a + b;
    }
}
 
// Test class for the previous class.
@isTest
private class MyWebServiceTest {
  testMethod static void testSumValue() {
    Integer x = MyWebService.SumValue(5,10);
  }
}
2. Deployed to production

3. Get Seeeion ID from 
Enterprise WSDL

When i Try to call SumValue from MyWebService   

Request (SoapUI)
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:myw="http://soap.sforce.com/schemas/class/MyWebService">
   <soapenv:Header>
      <myw:SessionHeader>
         <myw:sessionId>……….</myw:sessionId>
      </myw:SessionHeader>
   </soapenv:Header>
   <soapenv:Body>
      <myw:SumValue>
         <myw:a>10</myw:a>
         <myw:b>10</myw:b>
      </myw:SumValue>
   </soapenv:Body>
</soapenv:Envelope>

Anser
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body>
      <soapenv:Fault>
         <faultcode>soapenv:Client</faultcode>
         <faultstring>No operation available for request {http://soap.sforce.com/schemas/class/MyWebService}SumValue</faultstring>
      </soapenv:Fault>
   </soapenv:Body>
</soapenv:Envelope>
 
SoapUI

How I can to call my web service ?
 
Hi

I need to get order data through WSDL AIP. When I call query "Select id from order", I receive 

MALFORMED_QUERY: 
select id from Order  order by Id desc 
              ^
ERROR at Row:1:Column:15
line 1:15 no viable alternative at character '"'

I understand Order's object is conflicting with sentence "order by". 

How get data order ?
Hi gays

I have standart page with button section. This section has any custom buttons, which call JavaScript. It is work very well, but only classical mode.

How I can make button with call to metod the Apex class from in Lightning mode ?
Hi

I need to get order data through WSDL AIP. When I call query "Select id from order", I receive 

MALFORMED_QUERY: 
select id from Order  order by Id desc 
              ^
ERROR at Row:1:Column:15
line 1:15 no viable alternative at character '"'

I understand Order's object is conflicting with sentence "order by". 

How get data order ?