function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Akshay JuwaAkshay Juwa 

Updating the tracking number!

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?
PriyaPriya (Salesforce Developers) 
Hey Akshay,

The requirement is not clear. Can you please elaborate this with an example.

Thank You
Priya Ranjan
Akshay JuwaAkshay Juwa
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);
        }