You need to sign in to do that
Don't have an account?
DJ 367
TypeError: unable to get property of 'TemplateID__c' of undefined or null reference
Hello All,
I am getting above error, I have written a code in javascript button in Account, my query is not returning anything, I have a if condition like if it is null then do something else do something else. but it is not working properly and getting error. how to handle it. Thanks
I am getting above error, I have written a code in javascript button in Account, my query is not returning anything, I have a if condition like if it is null then do something else do something else. but it is not working properly and getting error. how to handle it. Thanks
var Acc = sforce.connection.qwery(select Id,name ,website, Industry from Account where website = 'www.test.com' ); var websiteVal = Acc.getArray("records").[0].website; if(websiteVal.length >=1){ // code } else{ // code }
Thanks for all you reply, I have resolved it thru
All Answers
You should avoid typos first : qwery instead of query and put your query as a string (with quotes).
it could be a bit better then...
That is correct on my original code.
Check once below code :
Hope this helps you!
If my answer helps resolve your query, please mark it as the 'Best Answer' & upvote it to benefit others.
Thanks
Varaprasad
@For Support: varaprasad4sfdc@gmail.com
Blog: http://salesforceprasad.blogspot.com/
Salesforce latest interview questions :
https://www.youtube.com/channel/UCOcam_Hb4KjeBdYJlJWV_ZA?sub_confirmation=1
Thanks for all you reply, I have resolved it thru