Skip to main content
Akshay Juwa (Slalom) ha fatto una domanda in #Apex
Hey everyone! Im trying to see if you can help with update the tracking number url over the old one. All the shipment info is stored in ShipmentList/Shipment/Container. I was told to Handle a list of shipments instead of taking the first one. And I also need help with parsing, they want me to initialize a Map<String, String> orderLineTrackingNumberMap as well as a boolean flag to indicate if there's a reship, as we loop through the ShipmentList, update map's orderLine Key with tracking value (if the reshipment update the parent orderline tracking to new tracking, if this operation happens update the flag true.) Could you guys guide on what the syntax would look like for these?
2 risposte
  1. 6 ott 2022, 17:02
    This is the one that I'm working with rn.

    Dom.XmlNode trackingXML = detailsXML.getChildElement('ShipmentList', null);

            System.debug('AJ1001 tracking xml:' + trackingXML);

            if(trackingXML!=null)

            {

                trackingXML = trackingXML.getChildElement('Shipment',null);

                System.debug('AJ1001 shipment xml:' + trackingXML);

                if(trackingXML!=null)

                {

                    trackingXML = trackingXML.getChildElement('Containers',null);

                    if(trackingXML!=null)

                    {

                        trackingXML = trackingXML.getChildElement('Container',null);

                    }

                }

                

            } 

            if(trackingXML!=null)

            {

                detailsParsed.tracking = trackingXML.getAttributeValue('TrackingNo', null);

                System.debug('AJ1001 tracking xml:' + trackingXML);

            }  
0/9000