Updating global set from controller This is my code:

$giveaway = Craft::$app-&gt;globals-&gt;getSetByHandle('promotions');
$giveaway-&gt;giveawayName = "New Name";
$success = Craft::$app-&gt;globals-&gt;saveSet($giveaway);
return($success);


Controller returns true, but no changes have been made to the "promotions" global set. What have I missed?
Oli’s comment is mostly right, but I think the solution is event simpler—the method you discovered is specifically for saving the GlobalSet settings/definition (like its name, handle, and the fields it uses), but what you're looking for is a more generic method for saving the Element that contains the actual content (as though you were updating it from the main Globals menu in the CP):

// Generic save method for any Element type, including Globals:
Craft::$app-&gt;getElements()-&gt;saveElement($giveaways);


✌️