A method for controlling an auxiliary function by a control element in an electronic control system of an agricultural machine (20, 21), the electronic control system being provided with a data bus to which a user terminal and an electronic control unit assigned to a functional element of the agricultural machine (20, 21) are connected, the method comprising: - displaying a virtual control element configuration menu on a terminal display provided on the user terminal and / or an additional user terminal separated from the user terminal and connected to the data bus and the user terminal, whereas a plurality of auxiliary functions and a plurality of virtual control elements are presented on the terminal display to the user, - through the user terminal, receiving user configuration input for mapping one of the plurality of auxiliary functions to one of the plurality of virtual control elements, - mapping the selected virtual control element to the selected auxiliary function of the electronic control unit according to the user configuration input, whereas the mapping is done by storing electronic information about the assignment of the selected virtual control element and the selected auxiliary function to each other in a memory, - displaying the at least one virtual control element on the terminal display, - through the user terminal and / or the additional user terminal, receiving user control input for the selected auxiliary function using the at least one virtual control element displayed on the terminal display, and - generating a control signal mapped to the selected auxiliary function of the electronic control unit according to the user control input and providing the control signal to the electronic control unit through the data bus for having the electronic control unit controlled the functional element of the agricultural machine (20, 21) according to the control signal. - displaying a virtual control element configuration menu on a terminal display provided on the user terminal and / or an additional user terminal separated from the user terminal and connected to the data bus and the user terminal, whereas a plurality of auxiliary functions and a plurality of virtual control elements are presented on the terminal display to the user, - through the user terminal, receiving user configuration input for mapping one of the plurality of auxiliary functions to one of the plurality of virtual control elements, - mapping the selected virtual control element to the selected auxiliary function of the electronic control unit according to the user configuration input, whereas the mapping is done by storing electronic information about the assignment of the selected virtual control element and the selected auxiliary function to each other in a memory, - displaying the at least one virtual control element on the terminal display, - through the user terminal and / or the additional user terminal, receiving user control input for the selected auxiliary function using the at least one virtual control element displayed on the terminal display, and - generating a control signal mapped to the selected auxiliary function of the electronic control unit according to the user control input and providing the control signal to the electronic control unit through the data bus for having the electronic control unit controlled the functional element of the agricultural machine (20, 21) according to the control signal.