there's two approaches that I think can both work, you can have the record created in dynamic mode, and when you set the trandate, the postingperiod should match that...
I suppose its possible if you're transforming maybe that's not getting triggered and updated correctly?
the more hands on way, is that postingperiod is actually a record type, so you can search for it and then use date filters to bring back the correct internalid of the appropriate posting period and set that value.