Hi Joachim,
What you ask is explained in this Wiki for how to link records based on expression strings
Basically:
- On the application logs record you need to implement the plugin function from the expression tools plugin
- On the grid of application logs on your saleslines record - you use this function as filter expression. For parameter you need to pass context_object (basically the salesline record you are looking at)