You need to sign in to do that
Don't have an account?
Andrefec
Dynamic Visualforce Component Error on Test Method
Hello,
I have the next code created:
Component.Apex.outputText firstNameField = new Component.Apex.outputText(); firstNameField.value = opp.Primeiro_Nome__c; firstNameField.label = 'Primeiro Nome'; firstNameField.id = 'firstNameField';
And it will result on a dynamic Pageblock on a visualpage.
Opening it on a page everything is ok, but when i run the test class it give me the next error:
" System.VisualforceException: Invalid value for property label: null"
What can i do? I need to complete my test class to move to production.
Thank you
Hi,
Probably...You need to set a value in the opp.
Thank you for the reply
The problem is on firstNameField.label, because if i coment that the test pass.
I did not know the cause of the error.
There was no error in this method.