Hi,
I am seeing the below error when opening the Record Type:
The Requested Record Type Is Not Available Expression evaluation error [evaluation ID = 7b41e:b21e2] at function a!recordList: A grid component [label="null"] has an invalid value for "columns". A grid column [label="Image"] has encountered an error. Expression evaluation error at function a!imageField [line 47]: The image at index 1 in an image gallery component [label=""] has an invalid value for "document". "document" must not be null. (APNX-1-4198-000)
Can anyone pls help me to resolve this issue. Let me know if you need more details to debug this issue.
Thanks,Suneetha.
Discussion posts and replies are publicly visible
Hi
You can check the code of the record list by editing it
You can check all the columns coming in the list and identify the one causing the issue, the error seems to be because the display image component expects a document to be present which I guess in your case is not coming up, you either need to check if the value is coming up correctly, or if the document can be null for a particular record row then you need to handle the null value for the image display.
Hope this helps
Hi ,
The error clearly states document must not be null as you are trying to display document Image.
Add a null check before a!imageField component like below:
if(
rule!APN_isBlank(fv!row.columnName)
{},
a!imageField(
images:a!documentImage(
document: fv!row.columnName
)
Hope this helps !!!
Thank you for your response.. but I was not able to fix the issue.
Also created a new Record Type and followed the Exercise 5 steps again and still was able to reproduce the error..
These are the steps that I tried and it throws the error:
4. Format the Image column by following the steps below:
● Under Columns, click Image.
● Under Display Value, click Display Options.
● Select Document Image.
● Under Display Value, click Image.
● Under Images, click Document Image.
● Under Document, click a!EXAMPLE_DOCUMENT_IMAGE(), and clear everything in the expression editor.
● Enter the expression: fv!row[recordType!AX Vehicle.fields.vehicleImage
● Click OK. You will see the vehicle images appear.
Is there a way we could connect and resolve the issue?
Thank you Vinay, Really appreciate on the response but I have not started looking the code in expression mode yet.. so still following the exercise in Design mode.. will definitely give a try once I get more comfortable in expression mode..
Regards,Suneetha.
In my profile you will be able to find my email, we can connect over there and discuss this further.