• AMIT KUMAR 73
  • NEWBIE
  • 10 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 8
    Replies
Hi,

I have written a custom apex code for web service integration. Input parameter is the RecordID. 
The functionality working fine but i am unable to achieve code coverage since i am unable to pass the Input parameter to my method "sfmOperation".

global class ServiceMaxOutbound{
    webservice static SVMXC.INTF_WebServicesDef.INTF_Response sfmOperation(SVMXC.INTF_We  bServicesDef.INTF_Response request)
   {     
       String recordId,logDescription;
       List<SVMXC__Service_Order__c> listWO;
       for(SVMXC.INTF_WebServicesDef.SVMXMap objSVXMMap : request.valueMap) {                                                    if(objSVXMMap.key == 'WorkOrder_ID'){                                                                   
                   recordId = objSVXMMap.value; 
                }
            }

Any suggestions will be highly appreciated as can't find any doc on how to write test classes for servicemax apex class.
Hi,

I am trying to retrieve Product Name, Product code & Pricebook Name associated with a PRODUCT.

--------------------------------------------------------------------------------------------------------------------------------------------------------
Product2 productdet = [Select Id, Name, ProductCode From Product2 where id='01tA00000033x2z'];
--------------------------------------------------------------------------------------------------------------------------------------------------------

How to modify this query to associate PriceBook details this  Product belongs to.

Product

HI,

I am trying to print the Request XML that is getting passed to the invocation method:

processRequest_x.ProcessWorkOrder(account_x);

Reason: The Object schema structure shared as part of the wsdl is very very complex and i am not sure whether i am able to bind objects properly as part of my request. Is there any way to print the request XML that is getting parsed in the invocation part.


Hi,

I am trying to achieve one functionality:

1. Creating a custom button on "CASE" object say "Submit To Web Service"
2. Creating a checkbok field to select one or more case for a certain account.
3. Based on the selection (point#2) it should send out the case related information to some third part web service using Apex call out.

Is this possible to build this logic in salesforce?
Hi,

Kindly suggest the best practice to configure Authentication details (like username / password) inside Salesforce for REST call out using HttpRequest class.

User-added image
Hi,

my requirement is to send all records (Work Order - custom object) to some third part app by exposing a custom WSDL file.
I developer the below code, which compiles fine in salesforce but gives an error while testing the same in SOAP UI tool.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
global class TestWOStatus{
    webservice static LIST<Work_Order__c> getWorkOrder(){
         LIST<Work_Order__c> wo = [SELECT ID,account__c,Product__c,Order_Type__c,Order_Status__c,Billing_Type__c,Closed_By__c FROM Work_Order__c];
         return wo;
       }
      
       /*webservice static String getWorkOrder(){
         return 'HELLO';*/
       }
}
-------------------------------------------------------------------------------------------------------------------------------------------------------

Any suggestions will be highly appreciated.
Hi,

I have written a custom apex code for web service integration. Input parameter is the RecordID. 
The functionality working fine but i am unable to achieve code coverage since i am unable to pass the Input parameter to my method "sfmOperation".

global class ServiceMaxOutbound{
    webservice static SVMXC.INTF_WebServicesDef.INTF_Response sfmOperation(SVMXC.INTF_We  bServicesDef.INTF_Response request)
   {     
       String recordId,logDescription;
       List<SVMXC__Service_Order__c> listWO;
       for(SVMXC.INTF_WebServicesDef.SVMXMap objSVXMMap : request.valueMap) {                                                    if(objSVXMMap.key == 'WorkOrder_ID'){                                                                   
                   recordId = objSVXMMap.value; 
                }
            }

Any suggestions will be highly appreciated as can't find any doc on how to write test classes for servicemax apex class.
Hi,

I am trying to achieve one functionality:

1. Creating a custom button on "CASE" object say "Submit To Web Service"
2. Creating a checkbok field to select one or more case for a certain account.
3. Based on the selection (point#2) it should send out the case related information to some third part web service using Apex call out.

Is this possible to build this logic in salesforce?
Hi,

my requirement is to send all records (Work Order - custom object) to some third part app by exposing a custom WSDL file.
I developer the below code, which compiles fine in salesforce but gives an error while testing the same in SOAP UI tool.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
global class TestWOStatus{
    webservice static LIST<Work_Order__c> getWorkOrder(){
         LIST<Work_Order__c> wo = [SELECT ID,account__c,Product__c,Order_Type__c,Order_Status__c,Billing_Type__c,Closed_By__c FROM Work_Order__c];
         return wo;
       }
      
       /*webservice static String getWorkOrder(){
         return 'HELLO';*/
       }
}
-------------------------------------------------------------------------------------------------------------------------------------------------------

Any suggestions will be highly appreciated.