Thanks for posting. I ran across this post when I was trying to figure out why my feature layers were not listed in layerIDs. Just in case anyone else lands here for the same reason, it should be noted that feature layers (and other "graphic layers") will be listed in graphicsLayerIds. Your previous post spelled that as "graphicLayerId" and it didn't work when I pasted that word into my code.
Thanks again for posting that follow up.