• Karina Chang
  • NEWBIE
  • 40 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 12
    Questions
  • 10
    Replies
Hi,
Can any of you think of a way to add an alert box when a user clicks on <Convert> on a lead. The idea is to remind the user to check for a specific field. Ideally, the user would have the option to <Convert> or <Cancel> on that alert box.
If I use a validation user, the user will go through the process of selecting an account/ contact and then get the validation rule alert after.

Thanks! 

 
Anybody using SFDC & Power BI? I am using Users and Quota (custom object that stores the quote for each rep per month) tables.
I am trying to have a counter (not sure if I should use 'new column' or 'new measure' on Power Bi to calculate the number of open opportunities for a specific user.

Any help would be appreciated!
 
On an Opportunity, I have created a button to execute Javascript using sforce.apex.execute (I am calling an Apex Class).
The apex class creates a Contract record. I would like to get the record id (of the Contract just created) displayed on an alert after clicking on the button if creation is successful.
_______

{!RequireScript("/soap/ajax/34.0/connection.js")}
{!RequireScript("/soap/ajax/34.0/apex.js")}

function success() {
    // Indicate success
    var alertString="Success!"; 
    window.open('www.google.com');

    alert(alertString); 
}
function error() {
    // Indicate failure
    //window.open('www.yahoo.com');
    var alertString="Fail!"; 
    alert(alertString); 
}
sforce.connection.sessionId = "{!$Api.Session_ID}";
sforce.apex.execute("InsertContractAndPO", "createContractAndPOAsset",
{ accountId: "{!Opportunity.AccountId}", opportunityId: "{!Opportunity.Id}" }, 
{ onSuccess:success , onFailure: error});



 
Hi, I am using <apex:iframe> in a Visualforce page. However, I would like to display only a section of the URL, not the whole page.
Any suggestions on how to accomplish this?
Thanks!
Hi, I need to move the following extension to production - however, I am not sure how to write the test class for the code below (since there is a VisualForce using the Extension): 

public class TrainingExtension {

    private final Training_Courses__c tc;
       
    public List<Training_Courses_Dates__c> Training_Dates {get;private set;}
    public String TrainingCourseDateId {get; set;}
    public String LocationDate {get; set;}
    
    public TrainingExtension (ApexPages.StandardController stdController) {
        this.tc= (Training_Courses__c)stdController.getRecord();
        Training_Dates = [SELECT Status__c,Class_Name__c,Location__c, Start_Date__c, Start_Date_Formula__c, Location_and_Date__c from  Training_Courses_Dates__c  where Training_Course__c =: tc.id and Status__c != 'Completed' order by Start_Date__c asc LIMIT 100 ];
         
  
    }
    
    public void DisplayDate ()
    {
        TrainingCourseDateId = ApexPages.currentPage().getParameters().get('TCDID');
        List <Training_Courses_Dates__c> crtCourseDates = [SELECT Location_and_Date__c from  Training_Courses_Dates__c where ID = : TrainingCourseDateId];

        LocationDate = crtCourseDates [0].Location_and_Date__c;

    }
 
 
}

Thanks,
Karina
I have created a form in Visualforce page, which will create a lead in SFDC. So far, it is looking and working as expected.
However, I would like to pass some values without making it visible on the Visualforce page.

For example, the URL ends in ".......?param1=ClassName&param2=ABC"
I have an extension that gets the values of param1 and param2.

On the visualforce page - I have:  <apex:outputText value="{!Param2}" style="width:225px"/> 
and other fields that are getting entered manually: <apex:inputText value="{!lead.Company}" style="width:225px"/>
 

How can I store the {!Param2} value into a custom lead field (Training_Location_and_Date__c)?
When the lead is created, the custom field is empty.



 
I have the following pageBlock and I am trying to get rid of the border and lines in between rows.
Is that possible?

<apex:pageBlock mode="maindetail"> <p></p> 
         <apex:pageBlockTable value="{!train_courses}" var="tc" align="center" frame="none">
                  <apex:column>              
                           <p></p> <apex:commandLink value="{!tc.Training_Class_Name__c}" action="{!displayId}"> <p></p> 
                                         <apex:param name="AID" assignTo="{!tc.ID}" value="{!tc.ID}" /> 
                           </apex:commandLink>
                  </apex:column>    
          </apex:pageBlockTable>         
</apex:pageBlock> 
I have 2 PageBlocks.... currently, each pageblock takes 50% of the screen. Is there a way to control the width of each one?  

<apex:pageBlock mode="maindetail" > <p></p>
         <apex:pageBlockSection >
                    <apex:pageBlock mode="maindetail" >
                        <apex:pageBlockTable value="{!Training_Course}" var="tc" id="pgtable" >     
                            <apex:column >        
                                <apex:commandLink value="{!tc.Training_Class_Name__c}" >
                                    <apex:param name="AID" value="{!tc.ID}" />
                                </apex:commandLink>
                            </apex:column>          
                        </apex:pageBlockTable>    
                    </apex:pageBlock> 
                    
                    <apex:pageBlock mode="maindetail" > 
                        <apex:detail subject="{!$CurrentPage.parameters.AID}" relatedList="false"  />        
                    </apex:pageBlock>     
        </apex:pageBlockSection>    
</apex:pageBlock>

Thanks!
 
Hi,

I have created a Visualforce page that shows all records from a Custom Object.This page is associated with a Force.com site page.  
When I attempt to open the link of the Force.com site... I get an "Authorization Required" page. Is there some sort of permission that I might be missing?

Thanks!
Hi,
I need to create a visualforce page with a list of all opportunities that are in the system.
Not sure where to start... I was able to find some examples, but the show how to display opportunity information but they needed to have the ID on the URL. I just need a list of all opportunities.

Thanks!  
Hi, I am trying to create a Visualforce page to use multiplicklist on contacts - 

<apex:page controller="MultiselectExampleController">
    <apex:form >
        <apex:pageBlock title="Contacts">
            <c:MultiselectPicklist leftLabel="Available Contacts"
                leftOptions="{!allContacts}"
                rightLabel="Selected Contacts"
                rightOptions="{!selectedContacts}"
                size="14"
                width="150px"/>
            <apex:pageBlockButtons >
                <apex:commandButton value="Save" action="{!save}"/>
            </apex:pageBlockButtons>
        </apex:pageBlock>
    </apex:form>
    <apex:outputText >{!message}</apex:outputText>
</apex:page>

However, it is given me an error: Error: Wrong type for attribute <c:multiselectpicklist leftoptions="{!allContacts}">. Expected String, found SelectOptionValue
Not sure what I am missing
Hi,
I am trying to find out if it is possible to display an integer on a visualforce page.
For example, if my Opportunity field (Vertical__c) is "ABC", I want to display 3. If it isn't, it should display 0.

Is this possible? Do I need a Controller?
On an Opportunity, I have created a button to execute Javascript using sforce.apex.execute (I am calling an Apex Class).
The apex class creates a Contract record. I would like to get the record id (of the Contract just created) displayed on an alert after clicking on the button if creation is successful.
_______

{!RequireScript("/soap/ajax/34.0/connection.js")}
{!RequireScript("/soap/ajax/34.0/apex.js")}

function success() {
    // Indicate success
    var alertString="Success!"; 
    window.open('www.google.com');

    alert(alertString); 
}
function error() {
    // Indicate failure
    //window.open('www.yahoo.com');
    var alertString="Fail!"; 
    alert(alertString); 
}
sforce.connection.sessionId = "{!$Api.Session_ID}";
sforce.apex.execute("InsertContractAndPO", "createContractAndPOAsset",
{ accountId: "{!Opportunity.AccountId}", opportunityId: "{!Opportunity.Id}" }, 
{ onSuccess:success , onFailure: error});



 
I have created a form in Visualforce page, which will create a lead in SFDC. So far, it is looking and working as expected.
However, I would like to pass some values without making it visible on the Visualforce page.

For example, the URL ends in ".......?param1=ClassName&param2=ABC"
I have an extension that gets the values of param1 and param2.

On the visualforce page - I have:  <apex:outputText value="{!Param2}" style="width:225px"/> 
and other fields that are getting entered manually: <apex:inputText value="{!lead.Company}" style="width:225px"/>
 

How can I store the {!Param2} value into a custom lead field (Training_Location_and_Date__c)?
When the lead is created, the custom field is empty.



 
I have the following pageBlock and I am trying to get rid of the border and lines in between rows.
Is that possible?

<apex:pageBlock mode="maindetail"> <p></p> 
         <apex:pageBlockTable value="{!train_courses}" var="tc" align="center" frame="none">
                  <apex:column>              
                           <p></p> <apex:commandLink value="{!tc.Training_Class_Name__c}" action="{!displayId}"> <p></p> 
                                         <apex:param name="AID" assignTo="{!tc.ID}" value="{!tc.ID}" /> 
                           </apex:commandLink>
                  </apex:column>    
          </apex:pageBlockTable>         
</apex:pageBlock> 
Hi,

I have created a Visualforce page that shows all records from a Custom Object.This page is associated with a Force.com site page.  
When I attempt to open the link of the Force.com site... I get an "Authorization Required" page. Is there some sort of permission that I might be missing?

Thanks!
Hi,
I need to create a visualforce page with a list of all opportunities that are in the system.
Not sure where to start... I was able to find some examples, but the show how to display opportunity information but they needed to have the ID on the URL. I just need a list of all opportunities.

Thanks!  
Hi, I am trying to create a Visualforce page to use multiplicklist on contacts - 

<apex:page controller="MultiselectExampleController">
    <apex:form >
        <apex:pageBlock title="Contacts">
            <c:MultiselectPicklist leftLabel="Available Contacts"
                leftOptions="{!allContacts}"
                rightLabel="Selected Contacts"
                rightOptions="{!selectedContacts}"
                size="14"
                width="150px"/>
            <apex:pageBlockButtons >
                <apex:commandButton value="Save" action="{!save}"/>
            </apex:pageBlockButtons>
        </apex:pageBlock>
    </apex:form>
    <apex:outputText >{!message}</apex:outputText>
</apex:page>

However, it is given me an error: Error: Wrong type for attribute <c:multiselectpicklist leftoptions="{!allContacts}">. Expected String, found SelectOptionValue
Not sure what I am missing
Hi,
I am trying to find out if it is possible to display an integer on a visualforce page.
For example, if my Opportunity field (Vertical__c) is "ABC", I want to display 3. If it isn't, it should display 0.

Is this possible? Do I need a Controller?