• wpatters
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 13
    Questions
  • 18
    Replies
Is it possible, using an s-control, to get the install date for the package that it was installed on?
Ok, so I have an object called "Project" and it has a child object called "Phase".  There's a field on Project called "Number of Phases".  A user creates a new project and let's say they put in 3 for the number of phases. I want it to automatically begin the creation of these phases, to automatically redirect the page to the "New Phase" page, and when they create that phase, to automatically go to phase 2, and so forth depending on how many phases they specified on the project.  Is this possible?
Hello everyone.  I have an S-control on a custom object which (among other things) populates fields on the object based on other object's fields.  It has lots of SOQL queries which work just fine, but for some reason, one is throwing an error.

Code:
var resourceresult = sforce.connection.query("Select Team_Member__c, Days_Budgeted__c from ResourceObj__c where Project__c = '{!ProjectObj__c.Id}'");
var resourceRec = resourceresult.getArray("records");
 

Error: uncaught exception: {faultcode:'sf:INVALID_TYPE', faultstring:'INVALID_TYPE: sObject type 'ResourceObj__c' is not supported.', detail:{InvalidSObjectFault:{exceptionCode:'INVALID_TYPE', exceptionMessage:'sObject type 'ResourceObj__c' is not supported.', row:'-1', column:'-1', }, }, }

As far as I can tell, this query is no different than the many others I am running on the s-control, and there is nothing unique about the object "ResourceObj__c" that it's referencing.  What could be causing this error?
Hello everybody, I was wondering if there are any special steps that must be taken when including a read only field in a package.  I have uploaded my package a few times, and each time when I test it out, it makes my read only fields into regular read/write fields.  How do I keep them as read only fields? Thanks
Ok, so I'm trying to create tables based on strings i have in a couple of parallel arrays using visualforce.  My code is good, but when I run it, strange things occur:

Code:
tableText+="<tr><td class='included' onClick=\"toggleObj("+i+", '"+ObjArr2[i]+"', this)\" colspan='2' onMouseOver='flipOn(this)' onMouseOut='flipOff(this)' id='"+ObjArr[i]+"TD'><span class='fieldhdr'>"+ObjArr2[i]+" Object</span></td></tr>";

 becomes:

Code:
tableText+="<tr><td class="included" colspan="2" id="&quot;+ObjArr[i]+&quot;TD" onMouseOut="flipOff(this)" onMouseOver="flipOn(this)" onClick=\"toggleObj("+i+", '"+ObjArr2[i]+"', this)\"><span class="fieldhdr">"+ObjArr2[i]+" Object</span></td></tr>";


Quotation marks are turned into &quot; and it totally re-arranges things, puts double quotes instead of singles, and I don't understand why.  I've tried putting \ in front of the ', and this does prevent the text from being re-arranged but throws the same error in firefox: "Missing ; before statement"  This would be incredibly useful for me, and make my page much more dynamic.  Is there a workaround?
Hi, I'm pretty new with visualforce, and I've created a page using html/css/javascript that I want to make into a visualforce page.  The HTML & CSS are working fine, but the javascript is not working at all.  I tried making the javascript file into a static resource, and I couldn't figure out how to call the functions, so I put the javascript right into the html head within <script> tags.  Now it is completely changing my javascript when I run it.

This is the original code:
Code:
var tds=document.getElementsByTagName('td');
for(i=0; i<tds.length; i++){
if(tds[i].className=="selected"){
tds[i].className="regular";}
}

And this is what happens to it when I run the VF page
Code:
var tds=document.getElementsByTagName('td');
for(i=0; i<tds className="regular" .length; i++){
if(tds[i].className=="selected"){
tds[i].;}
}
}

You'll notice that it totally moved everything after the tds[i]. up into the for loop.  There are other places where it is modifying my code, apparantly randomly.  How do I stop this??


Message Edited by wpatters on 10-20-2008 09:13 AM
Hello everyone.  I was wondering if it was possible to edit xml files within salesforce using visualforce, javascript, triggers, or anything?  I'm using a javascript s-control and I need to pull the values from salesforce objects into an xml file to get it to work properly.  I have tried creating a visualforce page with the type set to "text/xml" with test data, and for some reason this is not working at all. It works if I upload the test .xml file as an attachment on the object, but I cannot figure out how to modify the file dynamically.  Any help would be appreciated, thanks!
Hello everyone, I was just curious if anyone uses a linux based OS and salesforce (and associated applications, dataloader, eclipse, etc) regularly?  If so, which distribution do you use or recommend, and why?


Message Edited by wpatters on 09-29-2008 08:17 AM
Is it possible to make a field read only with an s-control? like field_name__c.read-only = true or something along those lines?
Ok, so this has been immensely irritating.  I am trying to do a soql query in an s-control to get all the children of the parent element.  My query is set up just fine, and it gives good results in Eclipse, but when I run it in firefox or explorer in the s-control, it keeps saying that there's no ParentId column in the campaign table... here's the query

Code:
var c1result = sforce.connection.query("SELECT NumberSent, Market_Code__c, Actual_Cost_of_Tactic__c, Total_Gross_Revenue__c  FROM Campaign WHERE Campaign.ParentId = '{!Campaign.Id}'");

 I have also tried Parent, ParentID, Parent.ParentID, and Parent.Id in place of the Campaign.ParentId field.  Any help would be greatly appreciated! Thanks





Message Edited by wpatters on 09-15-2008 05:07 PM
Hello everybody, I'm pretty new with writing apex, and I'm trying to write a trigger which causes a checkbox to be checked or unchecked in my contacts object when a field is updated in another object (Legislature).  I'm not sure what is going wrong with the code I've written, but I've got the sneaking suspicion that it is entierly too simple.  I am trying to update all of the contacts from the state associated with the Legislature object that got updated.  Also, the Presently_in_Session__c field is a formula field that returns "TRUE" or "FALSE" depending on the current date, and is the field which will determine the state of the Legislature_in_Session__c checkbox on the contact object.  Anyway, here it is:

Code:
trigger Session_Check on Legislature__c (before update) {
List<Contact> updatedContacts = new List<Contact>();

for(Contact c : [SELECT id, Legislature_in_Session__c FROM contact WHERE Calculated_State_From_KeyPerson_Home_Bus__c = '{!Legislatures__c.State__c}']){
if('{!Legislature__c.Presently_In_Session__c}'=='TRUE'){
c.Legislature_in_Session__c = true;
}else{
c.Legislature_in_Session__c = false;
}
updatedContacts.add(c);
}
update updatedContacts;
}

I am not getting any errors, but it is not doing anything.  Any help would be greatly appreciated.



Message Edited by wpatters on 09-12-2008 01:15 PM

Message Edited by wpatters on 09-12-2008 01:34 PM
Hello everybody, I was just wondering, is it possible to create a new custom link on one page when you create a new object on another? I have a custom object called information, and all it has is a large text area with a name. What I want is for it to create a new custom link on my opportunity object for onClick Javascript when a new information entry is added. Is it possible to create a custom link dynamically, with a workflow rule or something? Or maybe an s-control? This would make my life a lot easier, thanks!
Hello experts,

I'm trying to load a custom Apex Class I created in a sandbox into a production org.  I have downloaded Eclipse, and installed the Apex Eclipse Toolkit.  I was able to import all the apex stuff from my production org, but I can't export-- I am not seeing the force.com/deploy option for anything.  Is there another plug-in I must install?  Also, when I try to create a new 'package' (which I'm assuming are the classes), it says "unexpected token: package".  So I opened an existing package, copied the code I created in the sandbox, and did a 'save as' to save my file.  This all worked fine, but it won't let me run tests on it, or deploy it, or anything.  Please help!
Hello everyone.  I was wondering if it was possible to edit xml files within salesforce using visualforce, javascript, triggers, or anything?  I'm using a javascript s-control and I need to pull the values from salesforce objects into an xml file to get it to work properly.  I have tried creating a visualforce page with the type set to "text/xml" with test data, and for some reason this is not working at all. It works if I upload the test .xml file as an attachment on the object, but I cannot figure out how to modify the file dynamically.  Any help would be appreciated, thanks!
Hello everyone.  I have an S-control on a custom object which (among other things) populates fields on the object based on other object's fields.  It has lots of SOQL queries which work just fine, but for some reason, one is throwing an error.

Code:
var resourceresult = sforce.connection.query("Select Team_Member__c, Days_Budgeted__c from ResourceObj__c where Project__c = '{!ProjectObj__c.Id}'");
var resourceRec = resourceresult.getArray("records");
 

Error: uncaught exception: {faultcode:'sf:INVALID_TYPE', faultstring:'INVALID_TYPE: sObject type 'ResourceObj__c' is not supported.', detail:{InvalidSObjectFault:{exceptionCode:'INVALID_TYPE', exceptionMessage:'sObject type 'ResourceObj__c' is not supported.', row:'-1', column:'-1', }, }, }

As far as I can tell, this query is no different than the many others I am running on the s-control, and there is nothing unique about the object "ResourceObj__c" that it's referencing.  What could be causing this error?
Hello everybody, I was wondering if there are any special steps that must be taken when including a read only field in a package.  I have uploaded my package a few times, and each time when I test it out, it makes my read only fields into regular read/write fields.  How do I keep them as read only fields? Thanks
Hi There,

I need to deactivate a trigger and it's test class through Eclipse with the Force.com plugin.

If I edit the meta file and set the state to inactive and try to deploy I get the error 'Class cannot be saved inactive'.

Can anyone advise on how to do this?

TIA
Hello everybody, I have a question.  Is it possible to mass insert salesforce content? I have 30,000 files that must be uploaded into the content object, is there any way to insert these without doing them one by one manually?  Any help/advice would be greatly appreciated, this will take many months of incredibly tedious work if I can't come up with a solution. Thanks
  • September 30, 2008
  • Like
  • 0
Is it possible to make a field read only with an s-control? like field_name__c.read-only = true or something along those lines?
Ok, so this has been immensely irritating.  I am trying to do a soql query in an s-control to get all the children of the parent element.  My query is set up just fine, and it gives good results in Eclipse, but when I run it in firefox or explorer in the s-control, it keeps saying that there's no ParentId column in the campaign table... here's the query

Code:
var c1result = sforce.connection.query("SELECT NumberSent, Market_Code__c, Actual_Cost_of_Tactic__c, Total_Gross_Revenue__c  FROM Campaign WHERE Campaign.ParentId = '{!Campaign.Id}'");

 I have also tried Parent, ParentID, Parent.ParentID, and Parent.Id in place of the Campaign.ParentId field.  Any help would be greatly appreciated! Thanks





Message Edited by wpatters on 09-15-2008 05:07 PM
Hello everybody, I'm pretty new with writing apex, and I'm trying to write a trigger which causes a checkbox to be checked or unchecked in my contacts object when a field is updated in another object (Legislature).  I'm not sure what is going wrong with the code I've written, but I've got the sneaking suspicion that it is entierly too simple.  I am trying to update all of the contacts from the state associated with the Legislature object that got updated.  Also, the Presently_in_Session__c field is a formula field that returns "TRUE" or "FALSE" depending on the current date, and is the field which will determine the state of the Legislature_in_Session__c checkbox on the contact object.  Anyway, here it is:

Code:
trigger Session_Check on Legislature__c (before update) {
List<Contact> updatedContacts = new List<Contact>();

for(Contact c : [SELECT id, Legislature_in_Session__c FROM contact WHERE Calculated_State_From_KeyPerson_Home_Bus__c = '{!Legislatures__c.State__c}']){
if('{!Legislature__c.Presently_In_Session__c}'=='TRUE'){
c.Legislature_in_Session__c = true;
}else{
c.Legislature_in_Session__c = false;
}
updatedContacts.add(c);
}
update updatedContacts;
}

I am not getting any errors, but it is not doing anything.  Any help would be greatly appreciated.



Message Edited by wpatters on 09-12-2008 01:15 PM

Message Edited by wpatters on 09-12-2008 01:34 PM
Hello everybody, I was just wondering, is it possible to create a new custom link on one page when you create a new object on another? I have a custom object called information, and all it has is a large text area with a name. What I want is for it to create a new custom link on my opportunity object for onClick Javascript when a new information entry is added. Is it possible to create a custom link dynamically, with a workflow rule or something? Or maybe an s-control? This would make my life a lot easier, thanks!
Hello experts,

I'm trying to load a custom Apex Class I created in a sandbox into a production org.  I have downloaded Eclipse, and installed the Apex Eclipse Toolkit.  I was able to import all the apex stuff from my production org, but I can't export-- I am not seeing the force.com/deploy option for anything.  Is there another plug-in I must install?  Also, when I try to create a new 'package' (which I'm assuming are the classes), it says "unexpected token: package".  So I opened an existing package, copied the code I created in the sandbox, and did a 'save as' to save my file.  This all worked fine, but it won't let me run tests on it, or deploy it, or anything.  Please help!
I found the Timeline S-Control on the AppExchange and the documentation says you can use it for Custom Objects.
Has anyone tried this and gained some insight as to how one might accomplish this?
I have a multi-select picklist on my accounts page.  Several possible options can be chosen.  I have created a read-only formula field on the contact page to display the chosen values from the picklist.   I want to be able to create views for my contacts page that include this account info in order to easily add contacts to differing campaigns.  Unfortunately I cant seem to find a function that will allow me to identify which values have been chosen in the picklist.  Every function I have tried has told me that this particular field type is not supported.  Does anyone know of a work around for this?  Any help would be much appreciated.

Thanks,

Chris
  • August 15, 2008
  • Like
  • 0
Mail Merge Error Help EeXception CMMHOST GENMAILMERGE EXCEPTION

Please ensure  word is installed on your machine
The object does not support attached text . 5917

I already have  word installed on my desktop