Saving Custom Field Data from a Report into Project Insight
Greetings,
I am calculating two custom values in a report. However, I am unable to save that data into PI's database. Can you please help with a solution. Am trying to achieve this through JSON.
Screenshot of the report and custom fields. Further below is the JSON code.
//write insert script here to save
var accountInfo = {"Id":projectIdVal,"CustomFieldValue":{"CustomField7":parseInt(delayval),"CustomField33":timelineStatus}};
var accountInfoJson = JSON.stringify(accountInfo);
$.ajax({
type: "POST",
url: "/api/task",
headers: {
'Content-Type': 'application/json'
},
crossDomain: true,
data: JSON.stringify(accountInfo),
dataType: 'json',
success: function(responseData, status, xhr) {
//alert('success'+responseData);
},
error: function(request, status, error) {
//alert('error'+request.responseText);
}
})
// end of script
Regards,
Srini
Please sign in to leave a comment.
Comments
0 comments