Translate the following English sentence to French:
"It may be necessary to act in this way, but certain principles have to be adhered to in this issue."
Il va sans doute falloir agir de cette façon mais néanmoins conserver certains principes dans cette affaire.