@jja
1. You can need to use the XRM tool Box - Data verse Rest API Builder to create a web api request to get the data from the works like price for example, Example below we need to retrieve Mobile from account so your api request should look like below:

2. Select Request Type= Retrieve Single

3. Choose the Table like works in your case and the fields like Price

4. Then click the XRMweb.api
5. You will be presented with the below javascript:
Xrm.WebApi.online.retrieveRecord("schemanameofworkstable", "GUID of WORKS Place HOlder", "?$select=epd_abn").then(
function success(result) {
console.log(result);
// Columns
var price= result["ShcemaNameofPrice"]; // Text
},
function(error) {
console.log(error.message);
}
);
5. Next step is to get the GUID of the works field to pass to the above function in place of the GUID of WORKS Place HOlder
So to get the ID it should be like below:
function GetWorksPrice(executionContext)
{
var formContext = executionContext.getFormContext();
//This gets the ID you will need to pass the API
var Works = formContext.getAttribute("PLACE Holder for your field name").getValue();
var Id = Works [0].id;
Xrm.WebApi.online.retrieveRecord("schemanameofworkstable", Id , "?$select=epd_abn").then(
function success(result) {
console.log(result);
// Columns
var price= result["ShcemaNameofPrice"]; // Text
},
function(error) {
console.log(error.message);
}
);
}
6. Next you need to set the price field as below:
function GetWorksPrice(executionContext)
{
var formContext = executionContext.getFormContext();
//This gets the ID you will need to pass the API
var Works = formContext.getAttribute("PLACE Holder for your field name").getValue();
var Id = Works [0].id;
Xrm.WebApi.online.retrieveRecord("schemanameofworkstable", Id , "?$select=epd_abn").then(
function success(result) {
console.log(result);
// Columns
var price= result["ShcemaNameofPrice"];
//Set the field on the task
formContext.getAttribute("Place holder for price field name").setValue(lookup);
},
function(error) {
console.log(error.message);
}
);
}
7. Then Go to your Task form in classic mode -> Choose the field Works -> Go to Events Tab and first add your JS file

2. Then Click Add Event

Choose your library and type in your JS Name and tick the pass execution Context

Hope this helps you solve your problem!