November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
Seems that the promotion needed to be saved to database before schedule could be set.
So first save the promotion, then set the schedule and then save again.
PromotionSchedule is just a BlockData, so you should not have to save the Promotion first before setting it. But I think your code is not the way you should do it, you can just set it like this
promotion.Schedule.ValidFrom = new DateTime(2017, 04, 20);
promotion.Schedule.ValidUntil = new DateTime(2017, 04, 23);
promotion.Schedule.UseCampaignDate = false;
without having to create a new instance of PromotionSchedule.
Regards,
/Q
Hi,
Trying to set a different schedule for a promotion/ItemDiscount in code.
For example.
The Promotion gets saved and shows up in epi, and "UseCampaignDate" seems to be set correctly, but the validfrom and until are empty so the discount acts as "Expired".
Am I missing something?
//T