• Valentin F.
  • NEWBIE
  • 35 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 25
    Replies
Hello everybody,

I'm trying to display a list of products in a visualforce page that I'm rendering as PDF. 
I already tried a lot of options and figured out the best option could be creating tables. 
<table>
<apex:variable var="i" value="{!0}"/>
<apex:repeat value="{!listProduct}" var="product">
<!--<tr style="display: {!IF((MOD(i,4) == 0), 'table-row', 'none')};">
  <td>
    <table>
      <tr>
        <td>
          <apex:outputText value="{!product.Title}"/>
        </td>
      </tr>
      <tr>
        <td><apex:image width="120" height="50"  value="{!URLFOR(product.image)}"/></td>
      </tr>
    </table>
  </td>  
  <apex:variable var="i" value="{!i+1}"/>
  </apex:repeat>
  </table>
This is my base code to display products. The problem is that it just displays in a single row and I can't dynamically add a <tr> as I get a Salesforce error because </tr> is missing.

I would like to display my products in a new row each n elements.

Any idea ? 
 
Hello everybody,
I'm creating an app with 3 different components.
I already have an application event to pass results of my queries in my component 1 to components 2 & 3.
I'd like to pass informations from component 2 to component 1 (the one binded to apex controller), do a soql query with these informations and sent the results in the first event.
The problem is that my second event is already fired when I try to select it and set it parameters.

Here is my code : 
Component2.cmp

<aura:registerEvent name="Event2" type="c:Event2"/>
Component2Helper.js

var object1 = object;
var event = $A.get("e.c:Event2");
event.setParams({"object1": object1});
event.fire();
Event2.evt

<aura:event type="APPLICATION">
    <aura:attribute name="object1" type="Object"/>
</aura:event>
And here is the error I get :
User-added imageThank you for your help and your answers !


 
Hello everybody,
I needed to modify an apex class I deployed to production before.
The problem is that the code coverage is now 45% and I don't understand why it doesn't enter if neither if nor else. 

I'm doing a callout into a future method, using HttpCalloutMock.
Main class example :
User-added imageTest class :
Test.startTest();
        Test.setMock(HttpCalloutMock.class, new AppelAPIMock());
        ExpeditionSearchDPD.updateExpe(expeditions);
Test.stopTest();
AppelAPIMock :
@isTest
global with sharing class AppelAPIMock implements HTTPCalloutMock{
    global HTTPResponse respond(HTTPRequest req){
        HttpResponse res = new HTTPResponse();
        res.setHeader('Content-Type', 'text/xml');
        res.setBody('<?xml version="1.0" encoding="utf-8"?>' +
        	'<soap12:Envelope xmlns:soap12="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">' +
        		'<soap12:Body>' + 
            		'<getShipmentTraceResponse xmlns="http://www.cargonet.software/">' + 
            			'<getShipmentTraceResult>' + 
                            '<ShippingDate>02.08.2019</ShippingDate>' + 
                            '<DeliveryDate>05.08.2019</DeliveryDate>' + 
                            '<Weight>0</Weight>' + 
                    	'</getShipmentTraceResult>' + 
                 	'</getShipmentTraceResponse>' + 
               	'</soap12:Body>' + 
            '</soap12:Envelope>');
        res.setStatusCode(200);
        return res;
    }
}
Thank you for your answers

 

Hello everybody,

I need to test a callout situated in a @future method.
I used the 'Test.setMock(HttpCalloutMock.class, new AppelAPIMock());' to do it but I am not able to test XmlNode.

Here is an example to make it easier for you to understand :
 

@future(callout=true)
...
//Method realizing the callout
HttpResponse resp = appelDpd.getTrackingDPD(xmlBody);
            String responseBody = resp.getBody();
            if(resp.getStatusCode() == 200) {
                Dom.Document xmlD = new Dom.Document();
                xmlD.load(responseBody);

 //All this part is not supported by tests method               
                Dom.XmlNode root = xmlD.getRootElement();
                Dom.XmlNode body = root.getChildElement('Body',null);
                Dom.XmlNode trace = body.getChildElement('getShipmentTraceResponse', null);
                Dom.XmlNode traceResult = trace.getChildElement('getShipmentTraceResult', null);
                
                for(Dom.XmlNode node : traceResult.getChildElements()) {
if(node.getName() == 'ShippingDate' && node != null && node.getText().trim() != ''){}
When I change record, my map is not refreshing and I got the following error : 
'[Map container is already initialized.]'

The workaround I found was to put map as a global variable and then, in my init function :
if(map != null && map != undefined) {
   map.remove();
}
This way I've no more errors but I've to refresh twice the record page to get the map displaying. When I change page I get a blank map but it doesn't recreate.
User-added image
Thank you for helping me !
I'm not able to test getters/setters neither understand how it works to test them.
public with sharing class ALSearchController 
{
public class Location{
        @AuraEnabled 
        public String icon{get;set;} 
        @AuraEnabled 
        public String title{get;set;} 
        @AuraEnabled 
        public GeoLocation location{get;set;} 
        @AuraEnabled 
        public String description{get;set;} 
        @AuraEnabled 
        public String id{get;set;} 
        @AuraEnabled 
        public String type{get;set;} 
        @AuraEnabled 
        public String status{get;set;} 
    }
}
I tried 
Location loc = new Location();
String icon = loc.icon;
icon = 'test';
System.assertEquals(icon, 'test');
but I got an error for the = sign : Unexpected token '=' even if the Location object belong to ALSearchController. 

 
I'd like to change the color or image of lightning:map marker.
I tried : http://releasenotes.docs.salesforce.com/en-us/summer15/release-notes/rn_vf_maps_enhancements_custom_icons.htm?edition=&impact= (releasenotes.docs.salesforce.com/en-us/summer15/release-notes/rn_vf_maps_enhancements_custom_icons.htm?edition=&impact=)
but I couldn't make it works.
 
Dear SF community, 

I am a novice to development and am having trouble getting a test class to even get 1% of coverage for the below code:
 
global with sharing class LeopardSubscriptionUpdate {
    
    @InvocableMethod(label='Get Opp Id' description='Send Opportunity Into after closing')
    global static void GetOppId(List<Id> NewOppId) {
        List<Opportunity> NewOppIds =[Select Id 
                from Opportunity 
                where Id in :NewOppId ];
        System.enqueueJob(new makeGetCallout(NewOppId));
    }

    global class makeGetCallout implements System.Queueable, Database.AllowsCallouts {
        List<Id> NewOppId = new List<Id>() ; 
        global makeGetCallout(List<Id> ids){
            NewOppId = ids ;
        }

        global void execute(System.QueueableContext ctx) {

            Opportunity o= [Select Id ,
                Owner.Name,
                Subscription_Type__c,
                AVSFQB__Primary_Contact__r.FirstName, 
                AVSFQB__Primary_Contact__r.LastName, 
                SBQQ__PrimaryQuote__r.InHouse_Credits__c, 
                SBQQ__PrimaryQuote__r.SBQQ__EndDate__c, 
                Account.name, Account.Id, Account.Market_Segment__c, 
                AVSFQB__Billing_State__c, 
                AVSFQB__Primary_Contact__r.Email 
                from Opportunity 
                where Id in :NewOppId ] ; 
            List<OpportunityLineItem> prodCodeList = [Select ProductCode from OpportunityLineItem];
            JSONGenerator gen = JSON.createGenerator(true); 
            gen.writeStartObject();      
            gen.writeStringField('CustomerUserFirstName', o.AVSFQB__Primary_Contact__r.FirstName);
            gen.writeStringField('CustomerUserLastName', o.AVSFQB__Primary_Contact__r.LastName);
            gen.writeStringField('CustomerName',o.Account.name);
            gen.writeStringField('UpdatedBy',o.Owner.Name);
            gen.writeStringField('SubscriptionLevel',o.Subscription_Type__c);
            gen.writeStringField('CustomerSalesforceId',o.Account.Id);
            gen.writeFieldName('Products');
            gen.writeStartArray();
            for ( OpportunityLineItem  c : prodCodeList) {
                gen.writeString( c.ProductCode);
                }
            gen.writeEndArray();

            gen.writeStringField('OrganizationType',o.Account.Market_Segment__c);
            gen.writeNumberField('InHouseDownloadCredits',o.SBQQ__PrimaryQuote__r.InHouse_Credits__c);
            gen.writeDateField('EndDate',o.SBQQ__PrimaryQuote__r.SBQQ__EndDate__c);      
            gen.writeStringField('Region',o.AVSFQB__Billing_State__c);
            gen.writeStringField('Email', o.AVSFQB__Primary_Contact__r.Email);
            gen.writeEndObject();    
            String jsonS = gen.getAsString();            
            System.debug('jsonMaterials'+jsonS);

        // Sending the http body with JSON 

            String endpoint = '*endpoiint*.com';
            HttpRequest req = new HttpRequest();
            req.setEndpoint(endpoint);
            req.setMethod('POST');
            req.setbody(jsonS);
            Http http = new Http();
            HTTPResponse response = http.send(req);
            //return response;  

        }
    
    }
}

I'm attempting to trigger this via the process builder on an opportunity field update. If anyone has any thoughts on test classes for this, I'd be forever indebted. 

All the best,

Joe
Hi,
I am implementing sync between Salesforce and another system.
When Account is updated in Salesforce I need to call web service to update the account in the other system.

For this, I have trigger on Account after update that gets the fields being changed, builds json string from that and calls future method that does the callout.
This is all no problem but I want to make sure that the change is done all the way. (I am responsible for this until I get handshake back from the web service)
What can happen in the future method is that the web service callout gives me timeout, I can receive other response codes than 200/201 etc.

How can I monitor this callout and for example try again if I get timeout, notify the user etc ?
Hello everybody,
I'm creating an app with 3 different components.
I already have an application event to pass results of my queries in my component 1 to components 2 & 3.
I'd like to pass informations from component 2 to component 1 (the one binded to apex controller), do a soql query with these informations and sent the results in the first event.
The problem is that my second event is already fired when I try to select it and set it parameters.

Here is my code : 
Component2.cmp

<aura:registerEvent name="Event2" type="c:Event2"/>
Component2Helper.js

var object1 = object;
var event = $A.get("e.c:Event2");
event.setParams({"object1": object1});
event.fire();
Event2.evt

<aura:event type="APPLICATION">
    <aura:attribute name="object1" type="Object"/>
</aura:event>
And here is the error I get :
User-added imageThank you for your help and your answers !


 
Collection size 2,043 exceeds maximum size of 1,000  Error Face Any Solution
VisualForce Page :-

<apex:page standardController="Account"  tabstyle="account" sidebar="false" extensions="mergeAccount">
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/dt/jq-3.3.1/dt-1.10.18/datatables.min.css" />
<script type="text/javascript" src="https://cdn.datatables.net/v/dt/jq-3.3.1/dt-1.10.18/datatables.min.js"> </script>
     <style> 
          
       
         .dataTables_wrapper .dataTables_paginate .paginate_button.current, .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
        color: white!important;
        border: 1px solid #cacaca;
        background-color: white;
        background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, white), color-stop(100%, gainsboro));
        background: -webkit-linear-gradient(top, white 0%, gainsboro 100%);
        background: -moz-linear-gradient(top, white 0%, gainsboro 100%);
        background: -ms-linear-gradient(top, white 0%, gainsboro 100%);
        background: -o-linear-gradient(top, white 0%, gainsboro 100%);
        border-radius: 7px;
        background: dodgerblue;
        }
        <!-- List View (DataTable CSS)-->
        
        .dataTable>tbody>tr:nth-child(even)>td, 
        .dataTable>tbody>tr:nth-child(even)>th {
        background-color: #e8e8e8 !important; 
        }
        
        .dataTable>tbody>tr:nth-child(odd)>td, 
        .dataTable>tbody>tr:nth-child(odd)>th {
        background-color: #d2deea!important; 
        }
        
        .header_styling{
        font-family:Raleway:200;
        background-color: #e1e1e1 !important ; 
        }
        
        .dataTables_length, .dataTables_filter, .dataTables_info, .dataTables_paginate {        
        padding: 3px;        
        }       

        
        
    </style>
 <apex:form id="dForm">
  <apex:pageBlock >
      
      <apex:pageBlockTable value="{!wrapAccountList}" var="a" id="d" styleclass="example" rendered="{!bolvar1}">
        <apex:column >
                        <apex:inputCheckbox value="{!a.selected}" >
                            <!-- <apex:actionSupport action="{!processSelected}"  event="onchange" />-->
                        </apex:inputCheckbox>
                    </apex:column>
        <apex:column value="{!a.acc.name}"/>
        <apex:column value="{!a.acc.type}" />
        <apex:column value="{!a.acc.phone}"/>
            </apex:pageBlockTable>
         <apex:commandButton value="Account Merge" action="{!nextButton}" reRender="dForm" rendered="{!bolvar1}"/>
        <br/>
             <apex:pageblock id="table" rendered="{!bolvar2}">
         choose master account&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    
            <apex:selectList value="{!SelectAccount}" size="1">                                 
                <apex:selectOptions value="{!lstSelectOption}"/>
                 
            </apex:selectList>
                <apex:commandbutton value="Get Selected" action="{!Selectedmaster}"  /> <br/>
                    
                </apex:pageblock>
         
                        
             
        </apex:pageBlock>   
                 
  </apex:form>
  <script>
    $('table.example').DataTable({
       
        "pagingType": "full_numbers"

        });
    </script>
</apex:page>


Controller :-

public class mergeAccount {
    
    public List<wrapAccount> wrapAccountList {get; set;}
    public List<wrapAccount> selectedAccounts{get;set;}
    public Boolean bolvar {get; set;}
    public Boolean bolvar1{get;set;}
    public Boolean bolvar2{get;set;} 
    public Boolean bolvar3{get;set;} 
    public String SelectAccount{get;set;}
    public Account objMasterAccount {get;set;}
    public List<SelectOption> lstSelectOption {get;set;}
    public String AccountId;
    public Account objAccount;
    public string AccountName ;
    public ID AccountID1;
    public List<Account> lstAccount = new List<Account>();
    public List<Account> lstAccount1 = new List<Account>();
    public mergeAccount(ApexPages.StandardController controller) {
        
        system.debug('lstAccount'+lstAccount);
        bolvar1 = true;
        bolvar2 = false;
        //objAccount= (Account)Controller.getRecord().id;
        system.debug('objAccount'+objAccount);
        
        if(wrapAccountList == null) {
            wrapAccountList = new List<wrapAccount>();
            Map<String, Schema.SObjectField> objectFields = Schema.getGlobalDescribe().get('Account').getDescribe().fields.getMap();
            String query='select id';
            for(String s : objectFields.keySet()) {
                if(s != 'Id'){
                    SObjectField test=objectFields.get(s); 
                    //system.debug('test' +test);
                    //if(test.getDescribe().isUpdateable()){ 
                    query += ', ' + s + ' ';
                }
                //}
            }
            
            query +=' FROM Account';
            System.debug(query);
            List<Account> lstAccount = new List<Account>();
            lstAccount = database.query(query);
            //System.debug(lstAccount);
            for(Account a: lstAccount) {
                wrapAccountList.add(new wrapAccount(a,bolvar));
                
                
            }
        }
    }
    
    public void getAccountNames() {
       lstSelectOption= new List<SelectOption>();
        lstSelectOption.add( new SelectOption('','--Select--'));
        for( wrapAccount wrapacc :  selectedAccounts) {
            lstSelectOption.add( new SelectOption(wrapacc.acc.Id,wrapacc.acc.name));
           system.debug('accOptions'+lstSelectOption);
        }   
    }
    
    public void nextButton(){
        selectedAccounts = new List<wrapAccount>();
        for(wrapAccount wrapAccountObj : wrapAccountList) {
            if(wrapAccountObj.selected == true) {
                selectedAccounts.add(new wrapAccount(wrapAccountObj.acc,wrapAccountObj.selected));  
            }
        }
        getAccountNames();
        bolvar1 = false;
        bolvar2 = true;
        
    }
    
    public PageReference  Selectedmaster(){
        objMasterAccount = new Account();
        objAccount = new Account();
        SobjectField[] fields =  Schema.getGlobalDescribe().get('Account').getDescribe().fields.getMap().values();
        System.debug(fields);
        for(wrapAccount wrapacc :selectedAccounts){
            if(wrapacc.acc.id == SelectAccount) 
                objMasterAccount = wrapacc.acc;
            //AccountID1 = wrapacc.accId;
            system.debug('objMasterAccount'+objMasterAccount);
        }
        
        for( wrapAccount wrapacc :selectedAccounts){
            if(wrapacc.acc.id != SelectAccount){
                for(SObjectField field:fields){  
                    if(field.getDescribe().isUpdateable()){   
                        system.debug('masterLead.get(field)'+objMasterAccount.get(field));
                        if(objMasterAccount.get(field)==null && wrapacc.acc.get(field)!=null ){     
                            objMasterAccount.put(field,wrapacc.acc.get(field));
                        }
                    }
                }
            }
        }
        update objMasterAccount;
        bolvar3 = false; 
        PageReference pageRef = new PageReference('/apex/PopUp');
        pageRef.setRedirect(true);
        return pageRef;
    }
    
    public PageReference ok(){
        PageReference pageRef = new PageReference('/001/o');
        pageRef.setRedirect(true);
        return pageRef; 
    }
    
    public class wrapAccount {
        public Account acc {get; set;}
        public Boolean selected {get; set;}
        //public id accId {get;set;}
        public wrapAccount(Account a,Boolean bolvar) {
            acc = a;
            selected = bolvar;
            //accId = aId;
        }
    } 
}
Hi all -

1. I need to create a report to find opportunities based on team member names (Not line owner or manager)/ opportunities in pursuit. Is this something to be done in Einstein?

2. How do I start using Einstein in Salesforce?  
  • September 21, 2019
  • Like
  • 0
I want to write a apex class that doctors should see only the patients of the city where doctor belongs.Can anyone help me 

Example Doctor city is Hyderabad , he sholud see only  the records of the patient who lives in hyderabad
Hi all!

I'm trying to replace an information with [ from JSON (String)..
From:
 "name":[    

To:
"name_list":[ 

I tried couple like:

sResp = SResp.replaceAll('\"name\":\\[', '\"name_list\":\\[');

Nothing seems to work since I cannot get this list after during the execution.

Thanks!!
Hi there, I've been trying to create a report that includes a field with comments from the Approval History in the Related Lists in Service Cloud. It is not available anywhere, any ideas how can I use this field on a report?

Thanks!
How can I pass data from one lightning component and to another lightning component. Please help ?

Thanks in advance
 
A custom object is associated with account and contact via a lookup field.  Is it possible to find all accounts and contacts of all the custom object records which are updated using a SOQL query? 
Can we customize the location list in Lightning-Map ? Instead of location I would like to have another field.
Hello
I am 95% done with writing a Lightning Component. What this app does is when a user types in a phone or name, it lists all the contact records associated with the search result. On of the columns is the account name associated with the contact. It also displays a radio button that you need to select. The only thing I have left to do is the following(and I am struggling to get it working):
If the account name starts with a P and a number, so P0232 - Greenwood, then I dont need to select the radio button. Currently, i have an error message popup when its not selected, which should only happen if the name was just Greenwood, for example. Not sure what to put in the conditional to make this work. Here is my code:

Component:
<div style="font-size: 20px">Customer Information</div>
    <table>
        <tr style="width: 100%;">
            <td>
                First Name: <lightning:input name="sFirstName" value="{!v.sFirst}"/>
            </td>
            <td>
                Last Name: <lightning:input name="sLastName" value="{!v.sLast}"/>
            </td>
            <td>
                Phone Number: <lightning:input name="sPhone" value="{!v.ani}"/>
            </td>
            <td style="vertical-align:bottom;">
                <lightning:button label="Search" onclick="{!c.doConSearch}" />
            </td>
        </tr>
    </table>
    <br />
    <aura:if isTrue="{!v.hasContactResults}">
        <table>
            <thead>
                <th>First Name</th>
                <th>Last Name</th>
                <th>Phone</th>
                <th>Mobile</th>
                <th>Email</th>
                <th>Current Account</th>
                <th>City</th>
                <th>State</th>
                <th>Use This Contact</th>
            </thead>
            <aura:iteration items="{!v.contacts}" var="con">
                <tr>
                    <td>{!con.FirstName}</td>
                    <td>{!con.LastName}</td>
                    <td>{!con.Phone}</td>
                    <td>{!con.MobilePhone}</td>
                    <td>{!con.Email}</td>
                    <td>{!con.Account.Name}</td>
                    <td>{!con.MailingCity}</td>
                    <td>{!con.MailingState}</td>
                    <td><ui:inputRadio name="cons" label="{!con.Id}" labelClass="invis" change="{!c.onRadio}" /></td>
                </tr>
            </aura:iteration>
        </table>
    </aura:if>
    
Here is the Controller:
doConSearch : function(component, event, helper) {
        helper.searchContacts(component);
        component.set("v.selectedCon", "");
        helper.searchCases(component);
        
        if(!component.get("v.showAct")){
            var a = component.get('c.getCallQueue');
            $A.enqueueAction(a);
        }
    },
  createCase : function(component, event, helper) {
        component.set("v.hasErrors", false);
        component.set("v.errors", "");
        var studio = component.get("v.selectedCon");
        if(component.get("v.selectedStudio") || component.get("v.selectedOpp") || studio.Account.Name.contains('????')) {
            
            if(component.get("v.selectedCon") || (component.get("v.sFirst") && component.get("v.sLast") && component.get("v.ani"))){
                helper.createNewCase(component);
            } else {
                component.set("v.hasErrors", true);
                component.set("v.errors", "Please select a Contact or enter a first name, last name, and phone");
            }
            
        } else {
            component.set("v.hasErrors", true);
            component.set("v.errors", "Please select a studio or opportunity");
        }
        
    },
    
    onRadio: function(cmp, evt, helper) {
        var selected = evt.getSource().get("v.label");
        cmp.set("v.selectedCon", selected);
        helper.searchCases(cmp);
     },
    
    selectStudio: function(cmp, evt, helper) {
        var selected = evt.getSource().get("v.label");
        cmp.set("v.selectedStudio", selected);
     },

The if statement where you see the bold item is where the logic needs to go. I dont have the right syntax for the item in bold. Any help wuld be appreciated. Thanks
Hello everybody,
I needed to modify an apex class I deployed to production before.
The problem is that the code coverage is now 45% and I don't understand why it doesn't enter if neither if nor else. 

I'm doing a callout into a future method, using HttpCalloutMock.
Main class example :
User-added imageTest class :
Test.startTest();
        Test.setMock(HttpCalloutMock.class, new AppelAPIMock());
        ExpeditionSearchDPD.updateExpe(expeditions);
Test.stopTest();
AppelAPIMock :
@isTest
global with sharing class AppelAPIMock implements HTTPCalloutMock{
    global HTTPResponse respond(HTTPRequest req){
        HttpResponse res = new HTTPResponse();
        res.setHeader('Content-Type', 'text/xml');
        res.setBody('<?xml version="1.0" encoding="utf-8"?>' +
        	'<soap12:Envelope xmlns:soap12="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">' +
        		'<soap12:Body>' + 
            		'<getShipmentTraceResponse xmlns="http://www.cargonet.software/">' + 
            			'<getShipmentTraceResult>' + 
                            '<ShippingDate>02.08.2019</ShippingDate>' + 
                            '<DeliveryDate>05.08.2019</DeliveryDate>' + 
                            '<Weight>0</Weight>' + 
                    	'</getShipmentTraceResult>' + 
                 	'</getShipmentTraceResponse>' + 
               	'</soap12:Body>' + 
            '</soap12:Envelope>');
        res.setStatusCode(200);
        return res;
    }
}
Thank you for your answers

 

Hello everybody,

I need to test a callout situated in a @future method.
I used the 'Test.setMock(HttpCalloutMock.class, new AppelAPIMock());' to do it but I am not able to test XmlNode.

Here is an example to make it easier for you to understand :
 

@future(callout=true)
...
//Method realizing the callout
HttpResponse resp = appelDpd.getTrackingDPD(xmlBody);
            String responseBody = resp.getBody();
            if(resp.getStatusCode() == 200) {
                Dom.Document xmlD = new Dom.Document();
                xmlD.load(responseBody);

 //All this part is not supported by tests method               
                Dom.XmlNode root = xmlD.getRootElement();
                Dom.XmlNode body = root.getChildElement('Body',null);
                Dom.XmlNode trace = body.getChildElement('getShipmentTraceResponse', null);
                Dom.XmlNode traceResult = trace.getChildElement('getShipmentTraceResult', null);
                
                for(Dom.XmlNode node : traceResult.getChildElements()) {
if(node.getName() == 'ShippingDate' && node != null && node.getText().trim() != ''){}