Hi all… 3.7sp1 here. I am trying to make a button from the warehouse shipment screen that takes you to Mapquest and shows a map of how to get to the customers location. I have tried this before but ran into the problem of having to many characters in the string. The string needs to look like below. For the address of: 1565 California St. Denver CO, 80202 US The string looks like: http://www.mapquest.com/maps/map.adp? city=denver&state=CO&address=1565+california+st&zip=80202&country=us&zoom=5 This information is available from the Ship-to Address table. I tried the string as follows: Ship1 := “Ship-to Address”.“Address” Ship2 := “Ship-to Address”.“City” Ship3 := “Ship-to Address”.“County” Ship4 := “Ship-to Address”.“Post Code” HYPERLINK(“http://www.mapquest.com/maps/map.adp?city= + ‘Ship2’ + &state= + ‘Ship3’ + &address= + ‘Ship1’ + &zip= ‘Ship4’ + &country=US&zoom=5”); When this is tried I cannot get all of the code to fit on one line in the C/AL editor. Anyone ever sucessfully get anything like this to work? Any tips or suggestions? Thanks, JP
You can break the code into multiple lines in the C/AL Editor. For example:
HYPERLINK( 'http://www.mapquest.com/maps/map.adp?city=' + Ship2 + '&state=' + Ship3 + '&address=' + Ship1 + '&zip=' + Ship4 + '&country=US&zoom=5'); Complementarily, you could also use the STRSUBSTNO function to make your code easier to read. Look at the online help for STRSUBSTNO and at function StartTrackingSite in Table 110 Sales Shipment Header in order to better understand it.
and you can put main url to a nice Text Constant…
Ok…looks like that did the trick. Even got it to go to the Customer table if ship-to was not there. Thanks for all your help. Thanks, JP