• mikefitz
  • NEWBIE
  • 135 Points
  • Member since 2010

  • Chatter
    Feed
  • 5
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 61
    Replies

Hi

 

I am having a peculiar problem. I've created a dependent picklist and am trying to display them both on a visual force page. The controlling picklist displays with its values on the VF page. However, the dependent picklist(multi picklist) although displayed on the page has no values in it.

I've checked the field level security and it seems to be correct.

Also when I remove the dependency between the picklists, the 2 separately display all it values(narrowing my thought to the dependency to be the cause of the problem)

both the picklists are on a custom object with no record type.

The visual force page is attached to a custom controller

Is there any reason for this to occur?

 

am I missing anything while trying to display a picklist on a VF page with a custom controller?

 

VF code:

<apex:inputField id="region" value="{!tempCon.Region__c}"/>
<apex:inputField id="subregion" value="{!tempCon.SubRegion__c}"/>

 

The controller just initialises the variable in the constructor

 

Temp_con__c tempCon = new Temp_con__c();

 

 

Hi,

 

In normal operation, Salesforce auto generates the following 3 roles when an Account is enabled as a Partner Account.

- PartnerExecute

- PartnerManager

- PartnerUser

 

I'm trying to enable Partner account via Unit test but I dont think I'm going about it the right way. Below is my code snippet. It failed to generate new partner roles as illustrated in the highlighted below.

 

Please help!

 

    // Create new account. 

      Account testAccount = new Account();

      testAccount.Name = 'My Test Account';

      insert testAccount;  

      

      testAccount = [Select id from Account where id =: testAccount.Id];

      testAccount.IsPartner = true;

      update testAccount;

      

      System.assertEquals(testAccount.IsPartner, true);

         

      //create a new contact

      Contact testContact = new Contact();

      testContact.FirstName = 'Joe';

      testContact.LastName = 'TestUser';

      testContact.ownerid = testUserId;

      testContact.accountid = testAccount.id;

      insert testContact;  

        

       List<UserRole> userRole = [Select Id, Name From UserRole Where PortalAccountId =: testAccount.Id];

       //this assert failed

       System.assertEquals(userRole.size()>0, true);

Hello,

 

I wish to display the latest Open Cases and possibly another "widget" showing oldest open cases in the same way "My Tasks".

Is there anyway to do this, and if so is there a tutorial?

 

Any help would be appreciated.

 

Thanks

Is there any way to access Content Workspace Members through the API. I need to get a list of memebers for a specified Workspace.

I am trying build an outer join to display a list of contacts showing if they have a related portal user records or not.

 

I know you can get a list of related contacts from the user object but is it possible to go from contacts to user? 

 

I know this works...Select u.isactive, u.Contact.name From User u but what about Select name, c.user.isactive From Contact c?

 

Any thoughts how I can outer join these two tables and display one list? 

 

Thanks

 

Does anyone know how to get the currentpage name as in the Visualforce Name in Apex?

 

PageReference pageRef = ApexPages.currentPage(); doesn't give me the name without writing code to pull it out.

 

I simple need a way to grab the name so I can set the title and content dynamically through an object.

 

My only work around would be writing the pageref to the object but when I write to the field I get and error:  Invalid bind expression type of System.PageReference for column of type String.

 

Please help asap.

 

Gracias

I'm trying to display records segregated by recordtype

I seem to be pulling the recortype correctly and I have the repeat working but I can't  figure out how to pass the argument from the VF page into the controller.

I've tried passing an argument such as CasebyRT(rt.name) but it's not working and I can't get a param to work because it appears you can only pull one parameter at a time through the pagereference get method.

 

Any help would be appreciated. I was using this for a custom object but I changed it for cases so anybody can just copy the code below and see what I'm talking about.

 

Basically, I just want to dynamically pull records based on the recordtype in a repeat. If anybody has other thoughts, my ears are open.

 

This should work in anybody's org that has cases available.

 

Visualforce

 

<apex:page controller="DynamicRT">
  <apex:repeat value="{!CaseRT}" var="rt" >
        <apex:pageBlock title="Featured {!rt.name} Cases">
               <apex:pageBlockTable value="{!CasebyRT}" var="c">
                    <apex:column style="width:15%;" value="{!c.id}"/>
                </apex:pageBlockTable>
        </apex:pageBlock>
</apex:repeat>
</apex:page>

 

 

Apex

 

Public class DynamicRT{
public string CaseRType{ get; set; }

Public  List<Schema.RecordTypeInfo> getCaseRT(){
            Schema.DescribeSObjectResult R = Case.SObjectType.getDescribe();
            List<Schema.RecordTypeInfo> RT = R.getRecordTypeInfos();
        return RT;
    }

public list<Case> getCasebyRT() { 
        return [Select c.id
                From Case c 
                where c.RecordType.Name=:CaseRType];
    } 

}

 

 

 

Hi,

Is it possible to copy or retrive the list of opportunity products from an opportunity into a custom object? What i am trying to accomplish is create a custom object that represents a service agreement for a particular type of won opportunity. The idea being that once we win the opportunity with a new client then a custom service agreement object is created that is linked to that opportunity as well as a contract and some other custom fields that are formulas which pull info up from the opportunity and contract records. 

Problem is i would also like to pull up and copy all the diff products, their quantity, name, and price from the opportunity into the custom object but i cant seem to find a way to get to tht information from my custom object. I could re-create the products as another custom object and add those to the service agreement object but that seems cumbersome and redundent.
I have tried to create a formula field that retrieves the data but im assuming thaat because there could be multiple products asociated with an opportunity you cannot access that info in that way. 
Can anyone share an example with me on how i might go about getting this info.

Btw we are using Profesisonal edition and im not really a programmer so hopefully there is still a wayto do this without using custom code?

Thx
  • November 29, 2011
  • Like
  • 0

SOQL Query required to get following result as....

 

select Investment_Asset__r.Fund__r.Scheme_Name__c, Investment_Asset__r.Description__c, Allocation__c, Allocated__c, GoalTracker_Action__c, Investment_Asset__r.entity__r.name from GoalInvestmentAssetAssociation__c

 

I want to print the value of Fund Scheme name which I referenced form Investment_Asset to Fund. & I wrote the query as mentioned above, In that Investment_Asset_r.Description__c is working but & Investment_Asset__r.anyField__c is working but when I insert one more reference in that like Investment_Asset__r.Fund__r.Scheme_Name__c then it do not execute then query.

 

Since Investment_Asset__r.Fund__r.Scheme_Name__c is working on Visualforce but when I use this in query for my website then it do not print any values.

 

I checked my wsdl jar file also but that field is also present there even though I am not getting any error in code but when execute the code then it do not execute that query ???

 

Please tell me why is it happening ????

Thanking you...

Hi

 

I am having a peculiar problem. I've created a dependent picklist and am trying to display them both on a visual force page. The controlling picklist displays with its values on the VF page. However, the dependent picklist(multi picklist) although displayed on the page has no values in it.

I've checked the field level security and it seems to be correct.

Also when I remove the dependency between the picklists, the 2 separately display all it values(narrowing my thought to the dependency to be the cause of the problem)

both the picklists are on a custom object with no record type.

The visual force page is attached to a custom controller

Is there any reason for this to occur?

 

am I missing anything while trying to display a picklist on a VF page with a custom controller?

 

VF code:

<apex:inputField id="region" value="{!tempCon.Region__c}"/>
<apex:inputField id="subregion" value="{!tempCon.SubRegion__c}"/>

 

The controller just initialises the variable in the constructor

 

Temp_con__c tempCon = new Temp_con__c();

 

 

Hi,

 

In normal operation, Salesforce auto generates the following 3 roles when an Account is enabled as a Partner Account.

- PartnerExecute

- PartnerManager

- PartnerUser

 

I'm trying to enable Partner account via Unit test but I dont think I'm going about it the right way. Below is my code snippet. It failed to generate new partner roles as illustrated in the highlighted below.

 

Please help!

 

    // Create new account. 

      Account testAccount = new Account();

      testAccount.Name = 'My Test Account';

      insert testAccount;  

      

      testAccount = [Select id from Account where id =: testAccount.Id];

      testAccount.IsPartner = true;

      update testAccount;

      

      System.assertEquals(testAccount.IsPartner, true);

         

      //create a new contact

      Contact testContact = new Contact();

      testContact.FirstName = 'Joe';

      testContact.LastName = 'TestUser';

      testContact.ownerid = testUserId;

      testContact.accountid = testAccount.id;

      insert testContact;  

        

       List<UserRole> userRole = [Select Id, Name From UserRole Where PortalAccountId =: testAccount.Id];

       //this assert failed

       System.assertEquals(userRole.size()>0, true);

Here is my code:

 

sObject obj = database.query('Select DateField__c From OpportunitySchedule__c Where Id = \'' + string.escapeSingleQuotes(objId) + '\' Limit 1');
date dtSelectedDate = date.valueOf(obj.get('DateField__c'));

 

 DateField__c is of datatype date, not datetime.

 

When I try to run this code, this is the error that I get:

Invalid date: 2011-06-25 00:00:00

 

When I try to cast it as a datetime, this is the error that I get:

Invalid date/time: 2011-06-25 00:00:00

 

When the date is cast as a string, is it converted to a format that is impossible to get back to a date or date/time by any method other than manual parsing?

 

FYI, here's my hack fix, after the query:

 

string strDate = string.valueOf(obj.get('DateField__c'));
strDate = strDate.substring(0, strDate.indexOf(' '));
date dtSelectedDate = date.valueOf(strDate);

 

I have a custom list button on a related list which is displayed on a VF page,the button opens another vf page into an iframe . The page is opening fine in the iframe.

 

I am trying to pre-populate fields in the VF page:

 

 

 

Button code: (I tried it both with a ? and an & after quoteCreate)

 

window.open("/apex/quoteCreate?lead={!Lead__c.Name}",'q','height=450,width=650');

 I set the id of the input field in the vf page I am trying to populate to lead 

 

<apex:inputField id="lead" value="{!Quote__c.Lead__c}" required="false"/>

 but when I inspect the element using chrome it shows the NAME and ID as: j_id0:j_id2:j_id3:j_id12:lead

 

(which i have also tried using j_id0:j_id2:j_id3:j_id12:lead={!Lead__c.Name} this thows an error: The name 'quoteCreate&j_id0:j_id2:j_id3:j_id12:lead=L-0744' can only contain alphanumeric characters, must begin with a letter, and must be unique.)

 

So what i am trying to do is populate the field through my button code! someone please help!

 

JB

Hello,

 

I am trying to create a custom wizard which has VF pages and contains custom objects

 

One of the custom objects is events.

 

The first VF page header looks like:

 

<apex:page
    showHeader="true" sidebar="false"
    controller="TSWPageController"
    id="Page1"
    standardStylesheets="true"
    cache="false" >
<apex:actionsupport reRender="Page1" />

 

I accpet information as:

 

<apex:pageBlockSection columns="1" >          
                              <apex:inputField value="{!Event__c.Name}" required="True"/>                  
                              <apex:inputField value="{!Event__c.Type_of_Event__c}" required="True"/> 

 

When I click save it asks me if I want to create:

Create Apex method 'TSWPageController.getEvent__c'

 

But I understand that the double underscore is reserved in apex for name and namespaces.

 

When I click on "Create Apex method 'TSWPageController.getEvent__c'" I get the VF error: Invalid identifier: getEvent__c

 

How should I work around this?

 

Any help will be really appreciated.

 

Thanks!

 

Pranav

 

 

 

 

For my app, I am trying to mimic this: "Our links are automatically crawled via API provided by hosts below." Is it possible for me to use Force to "crawl" for links based on metadata I provide? I know this is a complex question -- I don't expect a how-to. Just point me in the right direction. Thanks in advance. 

Hi Friends,

 

While Installing the force.com IDE i am getting an error that is JVM terminated nd also some information will be displaying.

 

Please help me how to install the IDE..

  • November 25, 2011
  • Like
  • 0

Hi All

 

I am trying to track my Salesforce Site, by using Google Analytics.

 

My Site URL is : www.fdrclient.com
I added the tracking code to this page, and i am able to track it successfully.

 

Now the problem is, when a Client enters Username and Password in this Site, it redirects the user to my VisualForce Page
www.fdrclient.com ------> https://na5.salesforce.com/home/home.jsp

 

I want to track this VisualForce page(home.jsp) also.
I added <site:googleAnalyticsTracking/> to the end of VisualForce page, but still i am not seing anything in the Google Analytics.

 

Any idea, what should i do?

 

Thanks
Sid

 

hi all,

 

i am having an issue with passing the attachment to my javascript

 

here is my onclick function where i am not getting the value of my attachment

<apex:commandButton onclick="sendMail('{!attachment}');return false;" value="Send"  style="margin-left:110px;margin-top:10px;"/>

 

<apex:inputFile value="{!attachment.body}" filename="{!attachment.name}" style="margin-left:50px;margin-top:50px;">

 

 

and the controller side my code is:

public Attachment attachment
       {
       get
       {
            if(attachment == null)
            {
                Attachment attachment = new Attachment();
            }
            return attachment;
       }     
       set;
       }

  but i am not getting the attachment file ..........

 

i dont know what is going wrong?

 

please help me..........

 

any kind of help will be greatly appriciated........

I want to create a public force.com site where the users are not required to be logged in and would use Guest user licenses.

I want to store their selections made on the site for the duration of the session and save the selection in the force.com object.

 

In most of the earlier posts, I see that there is discussion on maintaining session for logged in users, but there is no information about session management for unauthenticated users.

 

Is there a way out?

 

Ady

  • November 22, 2011
  • Like
  • 0

Hi,

 

Could you please tell me if its possible to create a site where I can put a flow (created with the flow designer) that will ask about some specific information to the client through the site and flow and then create an opportunity out of it?

 

Thanks


We try to setup site on sandbox and set permission for guest user to read only with account object then we created visual force page for this site. our site can see records 

with admin preview but for public site we can't to see records (http://cmpd.crp1.cs6.force.com/Property) we already set permission for object and fields also.

what would we need to do anymore?

 

My Site :

 

Guest Profile :

 

Object Setting :

 

Field Setting :

 

Preview with admin :

 

Direct to Plubic Site :


 

We have a sites URL http://ourcompany.force.com/XYZZY  Some users are trying to access http://ourcompany.force.com/xyzzy and they are getting thrown to a generic page not found.

 

I could put in a redirect from http://ourcompany.force.com/xyzzy to http://ourcompany.force.com/XYZZY but that would work only for that one specific case.  If a user tried http://outcompany.force.com/XYzzy they would still get a page not found.

 

Is there any way to make a sites URL case insensitive or have some sort of case-insenstitve redirect?

Hello,

 

I wish to display the latest Open Cases and possibly another "widget" showing oldest open cases in the same way "My Tasks".

Is there anyway to do this, and if so is there a tutorial?

 

Any help would be appreciated.

 

Thanks

Doing a project for a customer, and they have a login-enabled site.  We're trying to use the Public Knowledge Base AppExchange package with this site, but the CSS keeps having issues.  In doing some research and reviewing the generated HTML for the pages, it's apparent that the Site is including the following snippet in every page if the site is login-enabled.  This is not including the fact that the user is still anonymous when browsing as well (the anonymous users are being forced to inherit this CSS as well).

 

<link class="user" href="/sCSS/23.0/1320195876000/PortalDefault/default/gc/elements.css" rel="stylesheet" type="text/css" />

<link class="user" href="/sCSS/23.0/1320195876000/PortalDefault/default/gc/common.css" rel="stylesheet" type="text/css" />

<link class="user" href="/sCSS/23.0/1320195879000/PortalDefault/gc/dStandard.css" rel="stylesheet" type="text/css" />

<link class="user" href="/sCSS/23.0/1320195879000/PortalDefault/00DV00000000Uh4/00530000004j8Yx/gc/dCustom0.css" rel="stylesheet" type="text/css" />

<link class="user" href="/sCSS/23.0/1320195876000/PortalDefault/default/gc/extended.css" rel="stylesheet" type="text/css" />

<link class="user" href="/sCSS/23.0/1320352245000/PortalDefault/00DV00000000Uh4/060V0000000D0Ua/gc/portal.css" rel="stylesheet" type="text/css" />

<link class="user" href="/sCSS/23.0/1320195876000/PortalDefault/default/gc/setup.css" rel="stylesheet" type="text/css" />

 

How do I make it so that this is not happening?  We include these attributes in all the VF pages and templates for the Site:

  • showHeader="false"
  • sidebar="false"
  • standardStyleSheets="false"

 

But it doesn't seem to respect that if the site is login-enabled.  When I disable the login functionality for the site, teh CSS fo rthe portal is not included, but other standard CSS is.

 

Has anyone run into this with Sites, and if so, how do you overcome it?

 

 

Hi,

 

I'm wondering if its possible to develop a force.com app using the embedded license, and create custom objects to allow some case management functionality, or would that be in violation of the license as it involves some CRM functionality and thus requires a service cloud license? 

 

For example, can I create a custom object to log tech support requests called "ITRequests" , whereby employees log tech support requests into the custom object and put it through a workflow?

 

Thanks

Slim

Background:
Org has Partner portal login enabled through Sites.

Org does not use custom domain.

 

Site-Level Security: RequireNon-Secure Connections (HTTP) is "Not-Checked"

Organization-Level Security: Require DescriptionSecure Connections (HTTPS) - "Not Checked"
Site url: https://mycompany.secure.force.com/sitelogin

 

Site home page: Page A

 

Page A has following code to redirect user to Page B

<apex:page controller="PageAController" action="{!redirect}" showheader="false"><apex:messages /> </apex:page>

 

When user logs in using https://mycompany.secure.force.com/sitelogin
Browser is forwarded to following URL:
http://mycompany.secure.force.com/frontdoor

to

http://mycompany.force.com/frontdoor

to

http://mycompany.force.com/PageA

to

http://mycompany.force.com/PageB

to

http://mycompany.force.com/sitelogin?refURL=PageB

 

However on PageB's controller where the system is querying from the custom object - system thinks that user is not authenticatedand user is directed to http://mycompany.force.com/siteLogin page.


From firebug, I see that sid cookie is present in http://mycompany.secure.force.com/frontdoor redirect with domain of "mycompany.secure.force.com"
sid cookie is not present when the browser is making request to http://mycompany.force.com/PageA or http://mycompany.force.com/PageB

 

Question:Is this expected?

 

From sites documentation, I do see that for following condition:

Site-Level Security: RequireNon-Secure Connections (HTTP) is "Not-Checked"

Organization-Level Security: Require DescriptionSecure Connections (HTTPS) - "Not Checked"

behavior is:   "Site uses HTTP for the post-login session".

 

This instance only occurs in the "Production" environment where there is redirect from http://mycompany.secure.force.com/frontdoortohttp://mycompany.force.com/frontdoor. In Developer or Sandbox edition's this is not replicated as the redirection does not occur.

My only lead right now is to  Organization-Level Security: Require DescriptionSecure Connections (HTTPS) - "Checked" which will force following:

Site uses HTTPS for the post-login session• Upon login, users see the secure.force.com domain

 

Any help would be appreciated.
Thank you.