Updating multiple records
I have a new script which calculates risk, which is drawing data from a risk matrix, which contains descriptions, and ratings for likelihood and result, I am using the following script on my two lookups:
categoryresult = Risk_Matrix_Risk_Categories [(Min <= (input.Likelihood * input.Result) && Max >= (input.Likelihood * input.Result))];
Risk_Category.select(categoryresult.Risk_Category);
It basically looks to see if the result of the two variables, Likelihood and Result lies in the ranges described in risk category, and then updates the lookup which contains the risk_categorys.
I have categorized all my issues with likelihood and result, but to calculate the risk itself, I need to run this script over all my existing records. At the moment I could just put this in the On Load, and when I load the issue, the Risk_category is updated, and then save, and voila, that one record now has the correct risk category. BUT I have a few thousand issues, and all have different results based on different outcomes of multiplying their variables.
Can I run this as a script?