Hello!
Does anyone know why a Null Exception Error is happening at this page? (see video) This is a form that's using a very simple logic for the text field. I checked the logs and didn't get anything there, so I tried remapping the record fields. That didn't work. The logic for this text field is very simple so I'm confused why it would give an error like this, see below. Thanks for any help in advance!
Also, let me know if you need any details on this, I'll be happy to provide them!
Code:
Discussion posts and replies are publicly visible
HI Tamara Saadeh ,The value property of a!textField might be null, and some operations are being performed on it without handling null cases.Since this rule is called by others, check if data is being passed correctly between them.I don't see any mistake made in code, maybe due to null data being passed into value/saveInto parameter.Ensure ri!otherUser is not null before accessing .companyWebsitewrite value : a!defaultValue(ri!otherUser.companyWebsite, ""), to avoid null values, try using "" in validations instead of {}.Hope this helps you!!!
value
a!textField
ri!otherUser
.companyWebsite
Hi,
thanks for looking into this! You're right, it is getting passed from two other interfaces. The record is being passed from the parent interface, and then all the way down to this interface. I tried doing the default value and it was giving me the same error :/ I came up with a fix where I save the value in a local variable which is getting passed down from the parent, and then on the parent level, I save that local variable on the record, which removed the error from text field, but then when you click the action button to create the account, it errors out again, which makes me think the record itself is compromised? Not sure.
Anyway, TLDR: working on it still and will update this discussion if I come up with fix.
Thank you so much for your help again!
Any details in the tomcat stdout log file?
Is this text field inside gf_uisectionotherdetails interface ?
Checked the logs and found nothing there. I did fix it though! I'll include the fix on this reply since I'm unable to update my post
FIX:
I created two local variables on the parent interface, which then got sent down to the children interfaces, all the way down to the interface where the textfield is erroring out.
Instead of saving directly to the record as in the original post, I saved to the local variable getting passed down from the parent interface as rule inputs.
In the parent interface's save expression, I basically used a save() where the local variables were mapped to the fields there. Below is a screenshot of what I'm talking about
crossed out some values for client confidentiality purposes
Thank you Stefan Helzle for your help!
It was happening in that interface. Got it fixed and outlined in the reply above. Thank you!