CRM-14342 : introduced generalized assignProfiles function to be used in confirm and thank you pages