i do not know the code to getPalkia in the grass.
But you can get any pokémon from the mining museum.Where you take your fossils.
this is the code for palkia:
i got this from : http:/www.neoseeker.com/Games/Products/DS/pokemon_pearl/action_replay.HTML
it got a code for ALL Pokemon
plus an Arceus
copy and past that address
scroll down until you see this really long answer read it at the beginning and youll know wat to do next
-hoped this helped-