Hi,
What would be the best way to reverse the code below so that I can update the original DAC field with the custom DAC field?
The reason for this reversal is that I created the new custom field to replace the original Description field. This is because I wanted the descripition field to hold 4000 characters, but reports would still be pulling it in as having only 250 characters since I didn’t update the SQL.
Now that I realise my mistake of not updating the length of the description field via SQL, I will need to reverse the code below so that I can move the text back into the original description field as this custom field is no longer needed.
Kind regards,
Andrew
protected void PMRevenueBudget_RowSelected(PXCache cache, PXRowSelectedEventArgs e)
{
PMRevenueBudget row = (PMRevenueBudget)e.Row;
if (row is null || row.Description is null || row.Description == "") return;
var value = row.Description;
cache.SetValueExt<PMBudgetExt.usrDescriptionExt>(row, value);
row.Description = "";
}
protected void PMRevenueBudget_UsrDescriptionExt_FieldSelecting(PXCache cache, PXFieldSelectingEventArgs e)
{
PMRevenueBudget row = (PMRevenueBudget)e.Row;
if (row is null || row.Description is null || row.Description == "") return;
if (row.Description is object)
cache.SetDefaultExt<PMBudgetExt.usrDescriptionExt>(row);
}
Best answer by Django
View original