I would like help getting this pop up message working. It gives a ‘NullReferenceException’ error when the part does not have a memo record. Shouldn’t it return and empty string if there is no memo record?
Should I make the pop up message using a custom code block instead of trying to use the widgets?
Hi @YGT,
may i ask why using [set argument/Variable] widget for this code block ? if i were you i would use Custom Code so i can validate against null value and then cast what ever value i got to your argument or to any CallContext variable
Sometimes if you want to reuse the data you are retreiving (generally in a condition, logic and/or messages or any combo of those) it’s nice to only get the data once, store it then use it in those different locations. This is an approach I use quite often. That being said I have had a heck of a time trying to get the linq null stuff to work with Epicor in any of it’s various normally C# accepted ways. I’m not sure why that is but when I need to handle these generally the one way that seems to work 100% of the time is, unfortunately, storing the query to a variable and checking for null. I think it has to do with DB being a database context object vs something a little more static where the null stuff usually works.
thanks @jgiese.wci, so what stopping us from retrieve the data as per this approach ( i use it as well) then cast it to variable array rather than add it on the C# of the argument variable which is not desined to deal with multiple line of codes