SLA based rate in timesheets

Hello community, we are IT service company and we are trying to adapt ERPNext as our ERP. We bill our customers based on timesheets and SLAs. So each customer has defined SLA and each SLA/Customer combination has a price. Thanks to customize form function, I was able to add price in the SLA/Customer detail and field priority to the timesheet detail page, but then I am struggling.

What I am trying to accomplish:

  1. In the timesheet detail, I would like the priority to be fetched from Issue.
  2. I would like rate to be calculated from the priority of the customer SLA, not from the activity type.

Is this possible? Is there some documentation on fetch functionality in the customize form?

Thank you in advance.

Best regards,

Radek