• Carl_V1
  • 5 Points
  • Member since 2006

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
  • 47
Question -

Is it possible to nest VF components inside an IF..THEN statement that uses record level criteria to determine true or false?

Example -

if (account.recordtype = 'type1') {
     <apex:page> version 1 of your custom VF page </apex:page>
} else {
     <apex:page> version 2 of your custom VF page </apex:page>

If it is, I cant find the syntax to be able to get it right. Any advice most appreciated.

Message Edited by Carl_V1 on 10-09-2008 04:48 PM
Hi All,
Question - trying to get the C# samples working in Visual C# 2008 Express Edition and having seemingly successfully imported a Partner WSDL into the project as a web reference (named 'sforce' per the API docs) I get the following runtime error repeatedly when trying to compile and run -
The type or namespace name 'SforceService' could not be found (are you missing a using directive or an assembly reference?) 
In addition, I also get the following warnings -
Custom tool warning: Schema validation error: Schema item 'simpleType' named 'FaultCode' from namespace 'urn:fault.partner.soap.sforce.com' is invalid. The Enumeration constraining facet is invalid - 'fns' is an undeclared namespace. 
Custom tool warning: Schema could not be validated. Class generation may fail or may produce incorrect results. 
Being a newbie to C# development I'd love to get the samples going but cant get beyond these initial issues - any suggestions would be most appreciated.  All I've done is copy the login sample to a button click method.
I would like to redirect to a Visualforce page I've created when a user saves an Opportunity, and the Opportunity is closed/won. I've written a trigger to test the logic and the new VIsualforce page, but I'm stumped on how to accomplish the redirect because apparently according to this thread: http://community.salesforce.com/sforce/board/message?board.id=apex&message.id=3321 you can't redirect from a trigger.

Does anyone have any ideas on how to accomplish this?

Thanks in advance...

           I am working on a solution, where i have the ID of a record and would like to get the details of this record, say the object type of the record. This ID is from the ParentID of an attachment object. So basically i want to get the object type of record that contains this attachment. Any suggestions ? Thank you.

I followed this demo but can't list custom objects in the tabs.
If my custom object is "Transfer Station" and is child to Account in Master - Detail relationship, how do I code this?
I was able to figure out Closed Activities, Contracts, on my own, but beyond that, no custom object.
 <apex:tab label="Open Activities" name="OpenActivities" id="tabOpenAct">
         <apex:relatedList subject="{!account}" list="OpenActivities" />
 <apex:tab label="Closed Activities" name="ActivityHistories" id="tabClosdAct">
         <apex:relatedList subject="{!account}" list="ActivityHistories" />

Those work. How would Transfer Station get in there? Thanks in advance!

  • October 22, 2008
  • Like
  • 0
Hi all.......any suggestions????
I have two fields which are of data type checkbox on a custom object. Upon selection of one check box the other one should be automatically selected. Is there any way in SFDC to solve this issue.
Ex: Status and In-Process are two fields upon selection of Status ,In-process should be selected.
I tried this using Trigger , but the problem with that is the trigger fires only when i press save button.
But i need this immediately upon selection of status.
  • June 13, 2008
  • Like
  • 0
HI all I am new to salesforce and I have an issue if anyone can help me....

I need some information regarding email to sales force . I want to log the activity at salesForce if I am sendiing an email from outside the salesForce to any of my salesforce contact is there any way to do this... please guide me..

Message Edited by zahid on 06-13-2008 04:18 AM
  • June 13, 2008
  • Like
  • 0
More specifically - I have an Scontrol link that generates an email and sends it to specific people. I want to be able to automate this sending function from some place like Demand Tools to be set to run automatically on a schedule. Any ideas?


What's the best way to programmatically grab an object's id / name?  Can I create an s-control that is generic enough to parse the URL and determine if I am looking at a Contract record or an Account record or a custom record?   Is that even the best way to determine object type?


I am new to Salesforce and any guidance would be great.  Thanks.




Message Edited by Shiztastic on 05-30-2008 10:33 AM
In related lists, some of my users have a link that says "Show More" with only 10 records showing, while other with the same profile just have all the records on showing on the page.

Where can these settings be changed?

Thanks for the help! :smileyvery-happy:
We have a system admin who installed something from the app exchange and created some custom pieces attached to that app.  That user will no longer be an admin, so I need to transfer the stuff he created to my login so that I can still access/edit it.  So far I have not figured out how to do this.  Anyone have any experience with this?
  • May 30, 2008
  • Like
  • 0
Hi all,
I am trying to access custom object records from external web application. Is it possible to access the record from S-control and expose S-control as webservice?
My requirement is to send URL from salesforce to external application to access custom object record page.
thanks in advance,
          I am creating webpages using s-controls. That page contain so many links... I write seperate s-control for each link...
         I am using s-controls called for another s-control...
 My issue is
         I want to track which s-control call current s-control.. from that i want to pass some values for current page..
My idea is i pass the name or id of one s-control to another s-control from that  i track which scontrol call that scontrol.. Any one give a sample code or any other idea for my issue?
   I have an issue like find out the parent name from the child object.
For instance, I have two parent object name called account and contact. and i have one related list object which is a child to both parent object. Now i wanted to edit the page of child and return to the appropriate object detail page. The issue here is how to find out which object i came from.
In my case all the pages(save and savenew i can able to give return url. Because i used to check null value of the contact or account But in edit page i will not be able to. ) are overridden page.
Child object details:
Account--- Master lookup field
Contact---lookup field
I am writing an s-control which needs to use a merge field to get the Id of the current record so that child records can be retrieved and displayed.  I am using the merge field {!DDEmployee__c.Id} and for some strange reason the Id that is returned is truncated to 15 characters, so I'm getting "a05700000025Clo" instead of "a05700000025CloAAE".  In searching through the discussion board archive I found mention of this truncation problem related to SOA and a solution of setting a useCaseSafeIds option, but I have no idea how that solution relates to my problem, or if it is related.
Does anyone have some sample code to get me started on creating a Campaign Summary Tab that will display a sortable table containing all active campaigns at the beginning of each row, with associated campaign result fields (Total Contacts, Total Responses, Num Sent, etc.) going across to the right. I need a dropdown to select between All Active Campaigns and My Active Campaigns, then sorted by campaign Type.  This needs to be on a Tab called Campaign Metrics.
I have an application that uses the API to allow our users to import data from a Salesforce campaign into our system (mostly the campaign member data). We are an ESP (Email Service Provider) and would like to pull in the HasOptedOutOfEmail value for the campaign members which we import, or at the very least, not allow a user to import those campaign members who have an opted out status.

However, I have noticed in testing that this field is not always available to the user which is logged in via our system. It can be made accessible, but is not so by default.

Currently, our system does a select SOQL statement, like so (in Python):
qry = "SELECT Id, %s FROM CampaignMember WHERE CampaignId = '%s' AND IsDeleted = False %s" % (fields, str(campaign_id), query_limit)

where 'fields' is a string of the field names to select. I can include Contact.HasOptedOutOfEmail in this string but that breaks if the logged in user doesn't have access to that field. Right now, I am getting this list of fields programmatically via the API.

Can I include Contact.HasOptedOutOfEmail in the WHERE clause of the query if the user doesn't have access to the field? That way, I could simply not return those members who are opted out.

I guess, the larger question is, if I know my application absolutely must have access to a field via the API that may or may not be available to the logged in user, what's the best way to handle that programmatically and also inform the user?
  • April 22, 2008
  • Like
  • 0
In our application we want to create a custom field that is either a lookup type of the SFDC OpportunityStage or a picklist type of the OpportunityStage: StageName.  After spending some time searching for a solution, I haven't been able to find a way to do this.  Any help would be greatly appreciated.
We're a new customer with SF and are utilizing IBM Content Manager (CM) for all of our legal documents. Has anyone successfully integrated CM with SF?
  • April 21, 2008
  • Like
  • 0