I am using UD03, I have created a dashboard for people to create new entry for UD03.
When user create a new entry on UD03, I want Key2 to auto assign to the maximum value of Key2 + 1 with the matching Key1 value.
For example, if the data in UD03 is as follows. If I create a new entry when Key1 = 1000, Key2 should automatically assign to 4.
I have created a BPM on Pre processing update where Key2 is empty, it will assign Key 2 using this Expression
((from ud03Row in Db.UD03 where ud03Row.Key1 == ttResultsRow.UD03_Key1; ud03Row.Key2 != ""; select Convert.ToInt32(ud03Row.Key2)).Max()+1).ToString()
It looks to me that as soon as I put the Convert.ToInt32 into the expression, the code will not execute…
If I remove the Convert.ToInt32, the expressiong works fine.
I ran the code on LinqPad 5 with Convert.ToInt32 and works fine…
Tried debugging and I couldn’t get any exception…
Version is Epicor 10…2.200.4