I am getting below error :

Value assigned to expression field is not valid for <apex:commandButton oncomplete>

I am calling javascript function on 'oncomplete'.

 Component.Apex.commandButton commandbuttonNext = new  Component.Apex.commandButton();
 commandbuttonNext.expressions.action = '{!next}';
 commandbuttonNext.expressions.oncomplete = 'loadResponsiveTable();';

1 Answer 1


The value you are providing to oncomplete is not an expression, but a static value. So you should avoid using expressions property of commandButton and instead provide the oncomplete value directly to commandButton like this.

commandbuttonNext.oncomplete = 'loadResponsiveTable();';

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.