Baked beans are not safe for dogs because they contain several ingredients that are toxic to dogs. Onions, bacon and many spices and flavorings can cause serious ailments such as pancreatitis and damage to the red blood cells.
If a dog eats something potentially toxic, the dog owner should call his veterinarian right away. Vomiting should not be induced without consulting a veterinarian, especially if the dog is not fully alert. Vomiting can also worsen the dog's condition if he ingested a caustic or petroleum-based product. If a veterinarian is not available, a local emergency pet clinic or the ASPCA Animal Poison Control Center can be contacted.