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
Erin Ryan 52Erin Ryan 52 

Fedex/UPS Tracking link formula not working

I created a formula field link to the Fedex/UPS tracking page , but it stopped working and I"m not sure why. Any support is appreciated. Thanks!

IF(
 LEN( Tracking_Number__c  ) = 18,
    HYPERLINK("http://wwwapps.ups.com/WebTracking/processRequest?HTMLVersion=5.0&Requester=NES&AgreeToTermsAndConditions=yes&loc=en_US&tracknum="&Tracking_Number__c , 'UPS Tracking Info'),
  IF(
     LEN( Tracking_Number__c ) = 12,
        HYPERLINK("https://www.fedex.com/apps/fedextrack/?action=track&trackingnumber="&Tracking_Number__c  & "cntry_code=us", 'FedEx Tracking Info'),
     IF(
        ISBLANK(Tracking_Number__c  ), "",
       'No Tracking Number'
    )
  )
)
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Erin,

For 12 character tracking number, I guess it is not working there are some spaces in the url and i have corrected it. Can you check with below.
 
IF(
 LEN( Tracking_Number__c  ) = 18,
    HYPERLINK("http://wwwapps.ups.com/WebTracking/processRequest?HTMLVersion=5.0&Requester=NES&AgreeToTermsAndConditions=yes&loc=en_US&tracknum="&Tracking_Number__c , 'UPS Tracking Info'),
  IF(
     LEN( Tracking_Number__c ) = 12,
        HYPERLINK("https://www.fedex.com/apps/fedextrack/?action=track&trackingnumber="&Tracking_Number__c&"cntry_code=us", 'FedEx Tracking Info'),
     IF(
        ISBLANK(Tracking_Number__c  ), "",
       'No Tracking Number'
    )
  )
)

If this solution helps, please mark it as best answer.

Thanks,
​​​​​​​
Erin Ryan 52Erin Ryan 52
Thanks Sai, but I'm still receiving the fedex message " The tracking number you entered is invalid.
Please correct it and retry". The formula works when I remove the cntry_code=us.
Erin Ryan 52Erin Ryan 52
Hi Sai, the 'No Tracking Number' isn't appearing as well. Thanks so much.