You need to sign in to do that
Don't have an account?
MohanaGopal
I got following error
But In my Task_connector__c object I have a field 'Lighting_Measures__c' ..
Message Edited by MohanaGopal on 01-07-2009 11:54 PM
Delete Override Problem
Hi..
I have overrided my custom object delete button using S-control...
Because when I delete my record I have to delete this connector object record also..
There is no master detail connection between my object and connector object..
Here is my code..
Code:
<html> <script type="text/javascript" src="/soap/ajax/9.0/connection.js"></script> <script> function init() { var taskqry=sforce.connection.query("select Id,Project__c from Custom_Tasks__c where Id='{!Lighting_Measures__c.TaskId__c}'"); var taskRec=taskqry.getArray('records'); var conf=confirm('Its delete connector object records also.Do you want to continue'); if(conf==true) { try{ var conObj=sforce.connection.query("select Id,Lighting_Measures__c from Task_Connector__c where ID ='{!Lighting_Measures__c.Id}'"); }catch(e){alert(e);} alert(conObj); var conRec=conObj.getArray('records'); alert(conRec.length); for(i=0;i<conRec.length;i++) { alert(conRec[i]); var delConRec=sforce.connection.deleteIds([conRec[i]]); } var delrec=sforce.connection.deleteIds(['{!Lighting_Measures__c.Id}']); window.parent.location.replace("https://na5.salesforce.com/"+prjRec[0].Id); } else { window.parent.location.replace("https://na5.salesforce.com/"+taskRec[0].Project__c ); } } init(); </script> </html>
I got following error
Code:
--------------------------- Windows Internet Explorer --------------------------- {faultcode:'sf:INVALID_FIELD', faultstring:'INVALID_FIELD: select Id,Lighting_Measures__c ^ ERROR at Row:1:Column:11 No such column 'Lighting_Measures__c' on entity 'Task_Connector__c'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.', detail:{fault:{exceptionCode:'INVALID_FIELD', exceptionMessage:' select Id,Lighting_Measures__c ^ ERROR at Row:1:Column:11 No such column 'Lighting_Measures__c' on entity 'Task_Connector__c'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.', row:'1', column:'11', }, }, } --------------------------- OK ---------------------------
But In my Task_connector__c object I have a field 'Lighting_Measures__c' ..
What is the problem here...
Message Edited by MohanaGopal on 01-07-2009 11:54 PM
so if the user who you are testing with doesn't have access to that field, you will run into that error. Does this work if you log in as a System Admin who definitely has the permissions?
Hi..
Thanks for ur reply..
I have loggin as a admin profile.
That field Lighting_Measure__c is a lookup field in Task_Connector__c object...
Hi..
Thanks for ur reply...