Why am I getting link is not a function in service portal?

Sushma R1
Tera Expert

Hi Folks,

Does anybody have got this error in console while debugging even when we are not using link function in WIDGETS service portal?

Any leads would be really helpful and appreciated ?

Much thanks in advance!!

Sushma

link isnot a function.PNG

1 ACCEPTED SOLUTION

kevinanderson
Giga Guru

I blame the missing boilerplate code for the link function in the widget record:



function(scope, element, attr, ctrl){


    /* place jQuery client side code here */



}



Capture_widget_link_function_boilerplate.PNG



I am really tired of having to parse the boilerplate code out of the video in the wiki doc:


Widget Editor CSS and Link Function


View solution in original post

5 REPLIES 5

Yes, Kevin I literally had to debug why it's happening and then forgot to mark this as an answered one.



To fix this we will have to name the function which is there in link function. anonymous function does throw an error saying link is not a function.



Sorry for not marking this an answered, it would really have saved your research time.



Regards,


Sushma