Glad to see you in the Community space, @juliacumiskey.
When you say P&L code, are you referring to the account number? Changing the account number or name is possible if you can access your Chart of Accounts in QuickBooks Online. You can check this article to learn more about a user's access: User types in QuickBooks Online.
The transactions posted will remain as it is as long as you didn't edit or delete the transaction itself.
However, if you meant something else, please let me know. Any additional information you can provide is greatly appreciated.
Just tap the Reply button below for your follow-ups. I'm always around to help. Have a good one.