• kevindotcar
  • NEWBIE
  • 274 Points
  • Member since 2005

  • Chatter
    Feed
  • 10
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 27
    Questions
  • 71
    Replies

Hi salesforce experts,

 

pls help this is my question

 

 What are the deployment methods in salesforce. List advantages and disadvantages of each

I'm receiving a query exception for the highlighted lines in red.  When I run the test, it says my list has no rows.  When I run the select query in the developer console i'm returning the correct value without a problem.  You'll also note that in the RecordType line i'm performing the same logic with similar assignment.  I'm not having any issues with this line so i'd expect that region should function exactly the same.   Please note that pse__region__c is a lookup field though i wouldnt think this could be the problem if the SOQL query is returning the correct result in the developer console. Also, If I hardcode the id value of 'west', the test class will work fine.  Obviously, you don't want to do this.  Any help offered would be much obliged. #noob

 

//setup variables to be used for building projects. Region and Record type are required
//It is important not to hardcode these values as the Id's will differ in production


RecordType rectype = [Select id from RecordType where Name = 'Customer'];
pse__Region__c regtype = [select id from pse__Region__c where name = 'West' LIMIT 1];

//Setup the Project Record
pse__Proj__c p = new pse__Proj__c();
p.RecordTypeId = rectype.id;
p.Name='TestProject';
p.pse__Region__c == regtype.id;
p.pse__Is_Active__c = true;

insert p;

 

I guess the Subject says it.

 

Is there a way to set up a page view so that it automaticaly updates, so that our CSR's don't have to constantly hit the refresh button?

 

 

Hi Guys,

I like to be able to write a SOQL query which is equivalent to SQL query below:

 

UPDATE

                A

SET

                A.col1 = B.col1

FROM

                TABLEA A

JOIN

                TABLE B

ON

                A.col2 = B.col2

                AND

                A.col3 = B.col3

 

So basically, I like to update table A using a some columns from table B where the join condition between the two tables satisfy. I know that one possible workaround is by looping through all rows from table B and testing for matching condition and then looping and setting values then updating the whole lot as below.

The problem with this approach is that I hit the governor limit very quickly (I have +500 rows in table A and +12,000 rows in table B). I am hoping that there is an alternative workaround for this to avoid the limits.

 

for (SObject1 tempA:A)

{

LIST<SObject2> LB = [SELECT

col1, col2,col3

FROM B

WHERE col2 =: tempA.col2 AND col3 = tempA.col3 ];

 

// NOW LOOP THROUGH THE SELECTED OBJECTS AND SET THE CORRECT VALUS

for (SObject2 tempB: LB)

{
tempB.col1 = tempA.SurchargeRate;
}

// NOW WE CAN UPDATE THE WHOLE LOT

update LB;

}

Hi
I need to build a list of records based on logic of a group of picklist values, but I can't seem to find how to do this.  In the below screenshot, I need the logic to be  (1 OR 2 OR 3)  AND 4;
User-added image
Is there a way to do this? 
I was hoping to stay away from putting a formula field on the record because I would like to have all of the logic withing the flow designer, as it's the only place where I need to do this check.

Also, is there a way to get a size (# of records) of the records returned in the fast lookup?  Sorry for the multiple questions - but in my case they are related issues.

Thanks in advance

 
I have a VR that does not allow certain users to edit a closed opporunity (and some can, like Operations and Admins).  
That part works fine and is very simple.

But, I have a a use case where if an Opportunity is closed, I want users with one profile to be able to modify just certain fields on the opportunity.

Is this possible?  
We  have about 150 fields on the Opportunity object, and I obviously can't go off making a VR for each one.
We have been working with a few ideas;  One is  putting all of these fields off onto a separate object and displaying them on the Opportunity with an inline VF page, but that requires two save buttons (one for the custom object and one for the opportunity).  Another is using a different record type and making all fields except the writeable fields read-only, but that's a lot of maintenance also.

Does anyone have any other ideas? Thanks in advance for any advice.
 
Hi everyone,

I'm stuck way at the beginning of the "Getting Started" challenge with the native iOS development challenge
https://developer.salesforce.com/trailhead/mobile_sdk_native_ios/mobilesdk_ios_getting_started

I keep getting 
ld: library not found for -lFMDB

I've made sure that my project Podfile has the FMDB pod specified;
pod 'FMDB/standalone', :subspecs => [
    'SmartSync'
]

But I still get a compile error.
Does anyone have a tip?

Thanks
 

 

Hi all,

 

I have a page that has an extension class, and whenever I try to update a variable in the extension from a SelectList, it just doesn't happen.

 

Page snippet:

<apex:page standardController="Opportunity" extensions="SelfEnrollController" action="{!getParameters}" id="SelfEnrollPage">

<apex:form id="SelfEnrollForm">
...
<b>Primary Category:</b> 
<apex:SelectList id="Positions" value="{!strPrimryCatId}"  size="1" multiselect="false">
<apex:selectOptions value="{!CategoryItems}"/>
</apex:SelectList> <br/>

...

 

 

Controller snippet:

 

public  class SelfEnrollController {
Public String strPrimryCatId{get;set;}
public void getParameters() {
...
Public List<SelectOption> getCategoryItems() {
 List<SelectOption> options = new List<SelectOption>();

   for(jsonPrimaryCategories  c :cloneCategory) {
     System.debug('c.Id: ' + c.Id + ', c.Value: ' + c.Value);
     options.add(new SelectOption (c.Id,c.Value));
     }
   return options;
   }    
}



Do I have to do anything different becayse the selectlist is updating a value in an extension?

 

Help?

 

 

 

 

Well, I've been bugging people about this problem for a couple days, but I think I've been wording the problem wrong.

 

My issue is that SFDC is puting the last lead list view ID (fcf=00B...) that I need in a cookie that is on domain cs4.salesforce.com:

 

 

....And I'm trying to access it from domain  "cs4.visual.force.com" ....

As near as I know, this is not possible...

Am I totally out of luck on this problem?

...Or it there some other possible way I can get to the last lead pageview that I'm missing?

 

Thanks,

 

 

KC

 

 

 

Hi all,

 

I have two instances of SFDC that I manage - one has Customizeable Forecasting, and the other one apparently doesnt-

The site that doesn't customizeable forecasting looks like this:

 

 

I Assume this is "Forcasting Classic" - but I haven't seen "Classic" so I don't really know.

 

....And the site that has costomizeable forecasting looks like this:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

My question is - is there a way I can make the "Customizeable Forecasting" site look like Forecasting Classic?

 

Thanks in advance,

 

 

 

 

 

 

 

 

 

 

 

 

I'd like to build a click-through link in an email template, but I can't seem to find the SFDC hostname

 

I tried;

    https://{!Host}/{!myobj.Id}

 

and

    https://{!HostName}/{!myobj.Id}

 

But both didn't work....

 

Any ideas?

 


Thanks

 

 

Hi all,

 

I'm trying to build a custom button on a page layout for a custom object  that calls javascript that updates other fields on the page.  I defined the behavior as "execute javascript" and the Content Behavior as "OnClick Javascript".  The source is simple;

 

<script language="JavaScript">
try { {!REQUIRESCRIPT("/soap/ajax/13.0/connection.js")} {!Appointment__c.Confirmed_Date__c}={!Appointment__c.ApptDate__c} ; {!Appointment__c.Confirmed_Time__c}={!Appointment__c.ApptTime__c} ; } catch(err){ alert(err); }
</script>

 

...But I keep on getting a popup that says "syntax error"  - help?

 

 

 

Weird,  but I've had no problem deploying change sets for almost a year.  

 

I am assigned the system admin profile, with Create and Upload Change Sets, and Create and Deploy Change Sets checked.

 

But now when deploying a change set (a trigger with a test class) from the sandbox, the sandbox reports  

"Your change set was uploaded successfully." but I never see it in the production organization.

 

Help?

 

 

Hi everybody,

 

I'd like to display a link to an opportunity object in my VF page rather than just the name, but all my efforts seem to be thwarted.  I tried displaying the oppy name as an "OutputLink" tag, and  "{!oppy.Opportunity}" but those didn't work.   My markup for the section in question is;

 

  <apex:pageBlock title="Standard Sales">
    <apex:dataTable value="{!oli_s}" var="oppy" id="detail_s" width="800px" >
        <apex:column width="25%">
            <apex:facet name="header">Name</apex:facet>
            <apex:outputText value="{!oppy.Opportunity.Name}"/>
        </apex:column>

 

Any help is appreciated-

 

I'm trying to stop lead conversion if someone tries to convert a lead that isn't owned by themselves.
I have a custom button for leads that looks like this (Detail Page Button):

../apex/ConvertThisLead?Id={!Lead.Id}

 

...And the apex page looks like this:

<apex:page standardController="lead" 
   action="{!DoConvert}" 
   extensions="leadConvertController">
</apex:page>

 ...And the controller class looks like this:

public class leadConvertController {
        Public lead lObj;
        Public Id leadId;
        
        public leadConvertController (ApexPages.StandardController stdController)  {
            leadId = ApexPages.currentPage().getParameters().get('id');                    
            }
     
     
      public PageReference DoConvert()  {      
            Database.LeadConvert lc = new database.LeadConvert();
            LeadStatus convertStatus = [Select Id, MasterLabel from LeadStatus where IsConverted=true limit 1];            
            
            lObj = [SELECT ID, OwnerId from lead where id =: leadid];         
            lc.setLeadId(leadId);                       
            lc.setConvertedStatus(convertStatus.MasterLabel);                                   
            
            if(lObj.OwnerId == UserInfo.getUserId() ){  // perform the lead convert
                Database.LeadConvertResult lcr = Database.convertLead(lc);
                System.assert(lcr.isSuccess());
                Id oppId = lcr.getOpportunityId();
                String sServerName = ApexPages.currentPage().getHeaders().get('Host');
                sServerName = 'https://' + sServerName + '/';
                PageReference Page = new PageReference(sServerName+oppId);
                Page.setRedirect(true);
                return Page;
                }
            else {  // can't do the convert
                lObj.addError('You must be the Lead Owner to Convert this lead!');
                lObj.addError('Please login as the lead owner');
                }
            return null;
           }           
    }

 Everything seems fine - I get an Opportunity ID back, but the redirect never takes place.

I tried just putting the ID of the created opportunity on the URL line

(like; https://cs4.salesforce.com/006P0000004E...,) and SF replied with "Data Not Available".

 

Anyone know what I'm doing wrong?

 

Thanks,

KC

 

What is the best way to disallow conversion of a lead if the ID of the logged in user is not the owner of the lead?

 

As the subject says, I just want the owner to be able to do this.

 

I have complicated insert triggers because I have assignment rules based on recordtypes, and I have lots of workflow rules that are changing all the time, that I'd rather not interfere with, if possible.

 

Thanks in advance

 

 

Hi team,
I defined a custom link on a lead page, with the idea of popping up  a timer page.
I defined the link as onclick javascript&colon;
< script type="text/javascript">

    window.open ("https://na4.salesforce.com/apex/ApexClock","mywindow","menubar=0,resizable=1,width=350,height=250");

< /script>

...And the ApexClock is just a simple system-clock display:
< apex:page id="thePage" showHeader="false">

< html>

< body>

< center>

< div id="clock"></div> < /center> < br/>

< div align="right"> < button onclick="int=window.clearInterval(int);" id="stop">Stop Clock</button>

< /div>

< /body>

< script type="text/javascript">

var int = self.setInterval("clock()",1000); function clock()  {    

var d=new Date();    

var t=d.toLocaleTimeString();    

document.getElementById("clock").innerHTML = "<B>" + t + "</B>"; }

< /script>

< /html>

< /apex:page>

... I know I shouldn't  hard-code the server name - I'll fix that, but the  popup doesnt show, and I know popup blockers are disabled.
Anyone know what I'm doing wrong?  Any help is appreciated.

KC

 

I've followed  the advice, but no matter what I do, I can't re-install the Force.com IDE... It  appears to be some sort of bare-bones eclipse text-edit only installation with no project definition capabilities.  I  installed Adobe Air and then things just went south fast.   There isn't even an uninstall in  the Control panel.

 

Has anyone figured this out?

 

 It's a Win7 home ed. cptr.

 

Hi,

 

It it possible to install the Sample Salesforce Knowledge  base twice - with one instance being for public knowledge and the other for private data (like CSR-specific info)?

 

Has anyone ever done this before?

 

TIA

 

Sorry, I cross-posted this in the General forum.

 

I'm trying to run the following code in a controller:

 

public ApexPages.StandardSetController con {
        get {
            if(con == null) {
               con = new ApexPages.StandardSetController([SELECT Id, Title FROM Answer__kav

                        WHERE  (PublishStatus = 'Online' AND Language = 'en_US') ])
                con.setPageSize(15);   // sets the number of records in each page set
                }
            return con;
            }
        set;
    }

 

When I call the method, I get

MALFORMED_QUERY: Implementation restriction: When querying or searching the Answer__kav object, you must filter using the following syntax: Id = [single ID], Id IN [list of ID's] or PublishStatus = [status]. In addition PublishStatus is only permitted in a top-level AND condition.

 

... but it runs just fine in SOQL explorer.

 

Anyone see anything that I'm missing?  I also tried the query in the workbench and it ran just fine.

 

Thanks in advance,


Hi all,

I'm getting the dreaded "No operation available for request" when sending an API request.

I'm using Curl because it's just a quick describeObject that I need to do.  It works fine via XML-RPC but I'm missing something with the SOAP equivalent.  Here's my command line:

curl -k  "https://test.salesforce.com/services/Soap/c/18.0" -H "Content-Type: text/xml" -H "SoapAction: ''"   -d "<?xml version='1.0' encoding='UTF-8' ?> <soap-env:Envelope xmlns:soap-env='http://schemas.xmlsoap.org/soap/envelope/' xmlns:tns='salesforce' xmlns:types='salesforce/encodedTypes' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' soap-env:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'> <soap-env:Header> <headerStruct> <version type='string'>2.0</version> </headerStruct> </soap-env:Header> <soap-env:Body> <tns:login xmlns:tns='sfconnector:SalesforceConnector' type='methodCall'> <username type='string'>USERNAME</username> <password type='string'>passwdandtoken</password> </tns:login> </soap-env:Body> </soap-env:Envelope>"

...And the response is:

<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><soapenv:Fault><faultcode>soapenv:Client</faultcode><faultstring>No operation available for request {sfconnector:SalesforceConnector}login</faultstring></soapenv:Fault></soapenv:Body></soapenv:Envelope>

Thanks in advance for any help.

I've searched the forums for info and have tried cobbling together a solution for my needs, but it still doesn't work.   I'm developing a button that is trying to download all attachments for a case. 

The Apex page:

<apex:page standardController="Case" extensions="AllAttachmentsController">
  <h1>Download attachments for case: "{!Case.Id}" </h1>
   {!AttNames}
</apex:page>

And the controller method:

public String[] getAttNames() {
        Id caseid = ApexPages.currentPage().getParameters().get('Id');
        
        String[] attNames = new List<String>();
        String strURL;
        string session = UserInfo.getSessionId();        
        HttpRequest req = new HttpRequest();
        HttpResponse res;
        Http h = new Http();
        String strResult ;
                
        ATT=[SELECT Id, Name FROM Attachment WHERE parentId = :ApexPages.currentPage().getParameters().get('Id')]; 
        integer j = ATT.size();
        
        for(integer i=0; i<j; i++) {                      
            strURL= 'https://' + ApexPages.currentPage().getHeaders().get('Host') 
                + '/servlet/servlet.FileDownload?file=' + ATT[i].Id;
            
            strURL = strURL.replace('visual', 'content');
            req.setHeader('Content-Type', 'application/octet-stream');
            req.setHeader('Authorization', 'OAuth ' + session);
            req.setHeader('Content-Disposition', 
                    'attachment; filename=' + ATT[i].Name);                        
            req.setHeader('Host', ApexPages.currentPage().getHeaders().get('Host'));
            req.setMethod('GET'); 
            req.setEndpoint(strURL);            
            attNames.add(strURL);
            res = h.send(req);       
            
            //...Gotta do it again w/ the return URL...
            strURL =  res.getHeader('Location'); 
            
            System.debug('HTTP REDIRECT (' + session + '): ' + strURL ); 
            req.setEndpoint(strURL);
            res = h.send(req); 
            strResult = res.getBody();              
            System.debug('HTTP Body:' + strResult );
            }
        return attNames;
        }       

 

...But the debug log looks strange to me - in that the "moved" URL is exactly the same as the successful endpoint URL:

15:06:55.095 (95548000)|CALLOUT_REQUEST|[33]|System.HttpRequest[Endpoint=https://c.na4.content.force.com/servlet/servlet.FileDownload?file=00P60000008OlopEAC, Method=GET]
15:06:55.148 (148429000)|CALLOUT_RESPONSE|[33]|System.HttpResponse[Status=Found, StatusCode=302]
15:06:55.148 (148464000)|SYSTEM_METHOD_EXIT|[33]|System.Http.send(APEX_OBJECT)
15:06:55.148 (148500000)|SYSTEM_METHOD_ENTRY|[36]|System.HttpResponse.getHeader(String)
15:06:55.148 (148519000)|SYSTEM_METHOD_EXIT|[36]|System.HttpResponse.getHeader(String)
15:06:55.148 (148536000)|SYSTEM_METHOD_ENTRY|[38]|System.debug(ANY)
15:06:55.148 (148554000)|USER_DEBUG|[38]|DEBUG|HTTP REDIRECT (00D300000000iGb!AQsAQNINwJAlI9D_N1TCE5M438xHt_XNSHaTH2jSvkxiLqdhPh5PkIMvBZ.TnAKbNgXCFsdFQWkLRbcIPhP6DJFNdSYEdNyZ): https://na4.salesforce.com/servlet/servlet.FileDownload?file=00P60000008OlopEAC
15:06:55.148 (148567000)|SYSTEM_METHOD_EXIT|[38]|System.debug(ANY)
15:06:55.148 (148583000)|SYSTEM_METHOD_ENTRY|[39]|System.HttpRequest.setEndpoint(String)
15:06:55.148 (148600000)|SYSTEM_METHOD_EXIT|[39]|System.HttpRequest.setEndpoint(String)
15:06:55.148 (148617000)|SYSTEM_METHOD_ENTRY|[40]|System.Http.send(APEX_OBJECT)
15:06:55.151 (151594000)|CALLOUT_REQUEST|[40]|System.HttpRequest[Endpoint=https://na4.salesforce.com/servlet/servlet.FileDownload?file=00P60000008OlopEAC, Method=GET]
15:06:55.206 (206214000)|CALLOUT_RESPONSE|[40]|System.HttpResponse[Status=Found, StatusCode=302]
15:06:55.206 (206244000)|SYSTEM_METHOD_EXIT|[40]|System.Http.send(APEX_OBJECT)
15:06:55.206 (206282000)|SYSTEM_METHOD_ENTRY|[41]|System.HttpResponse.getBody()
15:06:55.206 (206293000)|SYSTEM_METHOD_EXIT|[41]|System.HttpResponse.getBody()
15:06:55.206 (206307000)|SYSTEM_METHOD_ENTRY|[42]|System.debug(ANY)
15:06:55.206 (206318000)|USER_DEBUG|[42]|DEBUG|HTTP Body:The URL has moved <a href="https://na4.salesforce.com/servlet/servlet.FileDownload?file=00P60000008OlopEAC">here</a>

 

Any help is greatly appreciated.

 

 

 

 

 

 

 

<apex:page standardController="Case" extensions="AllAttachmentsController">
  <!-- Begin Default Content REMOVE THIS -->
  <h1>Download attachments for case: "{!Case.Id}" </h1>
   {!AttNames}
  <!-- select  Id from Attachment Where parentId = "{!Case.Id}" !-->
  <!-- SELECT Name, Body From Attachment  WHERE Id = "{!This.Id}" !-->
  <!-- (dump  Body to browser in base64 encode format... !-->
  <!-- End Default Content REMOVE THIS -->
</apex:page>
Hi all,

I apologize if this is a presumptuous statement- but I ran a report of our organization's cases, and it looks like (to my eyes) case  records are being stored three times-   Once to create the case, twice to modify it, and thrice to close it.

Is this true?

If so- it there a "best practices" for minimizing the space used from using cases?


Thanks in advance.

KC



Message Edited by kevindotcar on 05-21-2008 10:54 AM

Message Edited by kevindotcar on 05-21-2008 10:54 AM

Message Edited by kevindotcar on 05-21-2008 11:48 AM
Hi to all,
Is it true that SOQL statements can now perform joins?
I thought that this syntax would work:

Code:
Select a.ID, a.Account__c, a.SomeField__c, 
(SELECT c.AccountId, c.Name__c from Contact c) 
from Account a Where a.ID = c.AccountId
Thanks in adv for any info/corrections

KC
 



A candidate may apply to multiple jobs at the company Universal Containers by submitting a single application per job posting, that application cannot be modified to be resubmitted to a different job posting.
What can the administrator do to associate an application with each job posting in the schema for the organization?
A. Create a lookup relationship on both objects to a junction object called Job Posting Applications.
B. Create a master -detail relationship in the Job Postings custom object to the Applications custom object.
C. Create a master -detail relationship in the Application custom object to the Job Postings custom object.
D. Create a lookup relationship in the Applications custom object to the Job Postings custom object.
Hi,
I am preparing for Developer 1 exam. As I am confused with below questions, it would be much helpful to find out the correct answer for them. My Answers are menioned in the brackets.

1.  Which requirement needs to be implemented by using standard workflow instead of Process Builder? Choose 2 answers.
             A.Create activities at multiple intervals.   (ANS)
             B. Send an outbound message without Apex code. (ANS)
            C. Copy an account address to its contacts.
            D. Submit a contract for approval.

2.  How can a developer refer to, or instantiate, a PageReference in Apex? Choose 2 answers
           A. By using a PageReference with a partial or full URL. (ANS)
           B. By using the Page object and a Visualforce page name. (ANS)
           C. By using the ApexPages.Page() method with a Visualforce page name.  
           D. By using the PageReference.Page() method with a partial or full URL.

3.  A developer has a single custom controller class that works with a Visualforce Wizard to support creating and editing multiple sObjects. The wizard accepts data from user Inputs across multiple Visualforce pages and from a parameter on the initial URL. Which statement is unnecessary inside the unit test for the custom controller?
            A. public ExtendedController(ApexPages.StandardController cntri) { }  
            B. ApexPages.currentPage().getParameters() put('input', 'TestValue);
            C. Test.setCurrentPage(pageRef);
            D. String nextPage = controller.save().getUrl(); (ANS)

4. A developer wants to display all of the available record types for a Case object. The developer also wants to display the picklist values for the Case.Status field. The Case object and the Case Status field are on a custom visualforce page. Which action can the developer perform to get the record types and picklist values in the controller? Choose 2 answers

           A. Use Schema.PIcklistEntry returned by Case Status getDescribe().getPicklistValues(). (ANS)
           B. Use Schema.RecordTypelnfo returned by Case.SObjectType getDescribe().getRecordTypelnfos()
           C. Use SOQL to query Case records in the org to get all the RecordType values available for Case.  (ANS)
           D. Use SOQL to query Case records In the org to get all value for the Status pickiest field.

5. An sObject named Application _c has a lookup relationship to another sObject named Position_c. Both Application _c and Position c have a picklist field named Status_c. When the Status c field on Position __c is updated, the Status_c field on Application _c needs to be populated automatically with the same value, and execute a workflow rule on Application c. Flow can a developer accomplish this?

      A. By changing Application c.Status_c into a roll-up summary field.
      B. By changing Application c.Status_c into a formula field.  (ANS)
      C. By using an Apex trigger with a DML operation.
       D. By configuring a cross-object field update with a workflow.

6. )   Which type of code represents the Controller in MVC architecture on the Force.com platform? Choose 2 answers

        A.JavaScript that is used to make a menu item display itself.
        B. StandardController system methods that are referenced by Visualforce.(ANS)
        C. Custom Apex and JavaScript code that is used to manipulate data. (ANS)
        D. A static resource that contains CSS and images.

7. A developer needs to provide a Visualforce page that lets users enter Product-specific details during a Sales cycle. How can this be accomplished? Choose 2 answers

            A. Download a Managed Package from the AppExchange that provides a custom Visualforce page to modify.
            B. Create a new Visualforce page and an Apex controller to provide Product data entry.  (ANS)
            C. Copy the standard page and then make a new Visualforce page for Product data entry.
            D. Download an Unmanaged Package from the AppExchange that provides a custom Visualforce page to modify.  (ANS)

8.  The Review_c object has a lookup relationship up to the Job_Application_c object. The job_Application_c object has a master-detail relationship up to the Position_ object. The relationship field names are based on the auto-populated defaults What is the recommended way to display field data from the related Review_c records on a Visualforce for a single Position_c record?

          A. Utilize the Standard Controller for Position_c and cross-object Formula Fields on the Job_Application c object to display Review_c data.
          B. Utilize the Standard Controller for Position_c and a Controller Extension to query for Review _C data.
          C. Utilize the Standard Controller for Position_c and expression syntax in the Page to display related Review c data through the Job_Application_c object.
          D. Utilize the Standard Controller for Position_c and cross-object Formula Fields on the Review_c object to display Review_c data.   (ANS)

9.  On a Visualforce page with a custom controller, how should a developer retrieve a record by using an ID parameter that is passed on the URL?
             A. Use the constructor method for the controller.   (ANS)
             B. Use the $Action.View method in the Visualforce page.
             C. Create a new PageReference object with the Id.
             D. Use the <apex:detail> tag in the Visualforce page.

10. A developer creates an Apex helper class to handle complex trigger logic. How can the helper class warn users when the trigger exceeds DML governor limits?
           A. By using ApexMessage.Message() to display an error message after the number of DML statements is excel
           B. By using Messaging.SendEmail() to conthtinue the transaction and send an alert to the user after the number DML statements is exceeded.
            C. By using PageReference.setRedirect() to redirect the user to a custom Visualforce page before the number DML statements is exceeded.
             D. By using Limits.getDMLRows() and then displaying an error message before the number of DML statements exceeded. (ANS)


Thanks Much for the help in Advance
Regards,
Reshmi
I wrote a simple test class today in a sandbox.
When I attempt to run it from the developer console by itself using
Test->New Run
it fails and the results look like 
image of test failure from developer console

If I run the same test in a new run with pre-existing tests it runs fine.
The test also runs correctly from the Apex Test Execution Window.  I tried this on 2 sandboxes with same result.

The test only calls a method in 1 class that I wrote today.

is this related to the new release? Could be related to the known issue with opening classes in the dev console https://success.salesforce.com/issues_view?id=a1p30000000T2sSAAS I am unable to open a class from the console - although I do not get the same error as reported in the known issue.
I have a VR that does not allow certain users to edit a closed opporunity (and some can, like Operations and Admins).  
That part works fine and is very simple.

But, I have a a use case where if an Opportunity is closed, I want users with one profile to be able to modify just certain fields on the opportunity.

Is this possible?  
We  have about 150 fields on the Opportunity object, and I obviously can't go off making a VR for each one.
We have been working with a few ideas;  One is  putting all of these fields off onto a separate object and displaying them on the Opportunity with an inline VF page, but that requires two save buttons (one for the custom object and one for the opportunity).  Another is using a different record type and making all fields except the writeable fields read-only, but that's a lot of maintenance also.

Does anyone have any other ideas? Thanks in advance for any advice.
 
I have a custom visual force page that calculates prices when fields are changed. The only problem is I have a required field that does not need to be required in order to do the calculations but is required in order to save.  I'm not great with styling and everything is in the exact spot I need it in using the code I have provided. Is there a way to just ignore that field?
 
<apex:page standardController="EventPackageRevenueBreakdown__c"
		   extensions="EventPackageRevenueBreakdownExt" standardStylesheets="true"
		   tabstyle="EventPackageRevenueBreakdown__c"
		   docType="html-5.0">
	<apex:form >
		<apex:sectionHeader title="{!$ObjectType.EventPackageRevenueBreakdown__c.label} {!$Label.new}"
							subtitle="{!EventPackageRevenueBreakdown__c.Name}"
							help="{!$Label.NIBaseHelpURL}#cshid= event_package_revenue_breakdown_new">
		</apex:sectionHeader>
		<apex:pageBlock mode="edit"
						title="{!$ObjectType.EventPackageRevenueBreakdown__c.label} {!$Label.new}">
			<apex:pageblockbuttons >
				<apex:commandbutton action="{!save}" value="{!$Label.Package_Save}"></apex:commandbutton>
				<apex:commandbutton action="{!SaveAndNew}"
									value="{!$Label.Package_SaveAndNew}"></apex:commandbutton>
				<apex:commandbutton action="{!cancel}"
									value="{!$Label.Package_Cancel}"></apex:commandbutton>
			</apex:pageblockbuttons>
			<apex:pagemessages ></apex:pagemessages>
			<apex:pageblocksection title="{!$Label.Package_Information}" id="block123">
				<apex:actionFunction name="CalculateInclusive" action="{!CalculateInclusive}"
									 rerender="block123"></apex:actionFunction>
				<apex:actionFunction name="CalculateExclusive" action="{!CalculateExclusive}"
									 rerender="block123"></apex:actionFunction>
				<apex:pageBlockSectionItem >
					<apex:outputpanel layout="block" styleClass="requiredInput"></apex:outputpanel>
				</apex:pageBlockSectionItem>
				<apex:outputpanel layout="block" styleClass="requiredBlock"></apex:outputpanel>
				<apex:inputfield required="true"
								 value="{!EventPackageRevenueBreakdown__c.UnitPrice__c}" label="inclusive label" onChange="CalculateInclusive()">	</apex:inputfield>
				<apex:inputfield required="false"
								 value="{!EventPackageRevenueBreakdown__c.Location__c}"></apex:inputfield>
				<apex:pageBlockSectionItem rendered="{!NOT(showInclusivePrices)}">
					<apex:outputLabel value="{!inclusiveLabel}"></apex:outputLabel>
				</apex:pageBlockSectionItem>
				<apex:pageBlockSectionItem rendered="{!showInclusivePrices}">
					<apex:outputLabel value="Inclusive Rate"></apex:outputLabel>
					<apex:input type="number" value="{!InclusiveRate}" onChange="CalculateExclusive()"  onkeypress="if (event.keyCode==13) {CalculateExclusive(); return false;} else return true;"></apex:input>
				</apex:pageBlockSectionItem>
				<apex:inputfield value="{!EventPackageRevenueBreakdown__c.BookingPackageEvent__c}"/>
				<apex:inputfield required="true"
								 value="{!EventPackageRevenueBreakdown__c.RevenueClassification__c}" onChange="CalculateInclusive()"></apex:inputfield>

				<apex:inputfield required="true"
								 value="{!EventPackageRevenueBreakdown__c.Name}"  ></apex:inputfield>
			</apex:pageblocksection>
			<apex:pageblocksection title="{!$Label.AdminChargeAndGratuity}">
				<apex:inputfield required="false"
								 value="{!EventPackageRevenueBreakdown__c.AdminCharge__c}" onChange="CalculateInclusive()"></apex:inputfield>
				<apex:inputfield required="false" value="{!EventPackageRevenueBreakdown__c.Gratuity__c}" onChange="CalculateInclusive()"></apex:inputfield>
			</apex:pageblocksection>
			<apex:pageblocksection title="{!$Label.InclusivePrice}"
								   rendered="{!showInclusivePrices}"
								   collapsible="true">
				<apex:inputcheckbox value="{!EventPackageRevenueBreakdown__c.AdminIsIncludedInInclusivePrice__c}" onChange="CalculateInclusive()"></apex:inputcheckbox>
				<apex:inputcheckbox value="{!EventPackageRevenueBreakdown__c.GratuityIsIncludedInInclusivePrice__c}" onChange="CalculateInclusive()"></apex:inputcheckbox>
			</apex:pageblocksection>
		</apex:pageBlock>
	</apex:form>
</apex:page>

 
Hi Guys,

Please share some key points in spring 16 release
Hi everyone,

I'm stuck way at the beginning of the "Getting Started" challenge with the native iOS development challenge
https://developer.salesforce.com/trailhead/mobile_sdk_native_ios/mobilesdk_ios_getting_started

I keep getting 
ld: library not found for -lFMDB

I've made sure that my project Podfile has the FMDB pod specified;
pod 'FMDB/standalone', :subspecs => [
    'SmartSync'
]

But I still get a compile error.
Does anyone have a tip?

Thanks
 
I would like to go back and retake few tests/challenges. Is there a way do that?
I have account Detail Page custom button and Content Source is visual force page in the Button Setup.
VF page is used to call a controller method to execute and create Record in ERP system using REST API.
<apex:page standardcontroller="Account" extensions="CreateCustomerController" action="{!createCustomer}">
</apex:page>
When user double clicks it is creating duplicate customer records in our ERP system.

How can I prevent this happening.? 
Can I disable the button after first click? 
If you have asome other solution I can try. I have seen some post like below but I am using VF page as content source so don't want use this.
https://developer.salesforce.com/forums/?id=906F000000093GUIAY


 
  • November 04, 2015
  • Like
  • 0

Is it possible to surpress the Notes and Attachments in the Account object from picking up all notes made in other objects that relate to that Account? When viewing the account record the notes are obviously all out of context.

 

I'm guessing I need a VF page with an extension to acheive this?

 

Thanks in advance!

Salesforce has the following maximum occurance limit when creating a recurring series of events:

o Daily: 100
o Weekly: 53
o Monthly: 60
o Yearly: 10

How can I create an event that last forever? Is there a way I can overcome this limit?

How to display list of account addresses in google maps using numbered markers. I need to display the list of account addresses displaying on the page using apex:repeat which is set to 6 records per page. If I click on the address field on the list of records the marker should pop up in the map. Please suggest me how I can  achieve this.... Any suggestions or sample code please post your comments.

I am exploring the option of displaying some case numbers on a vf page.  Looking for ideas on getting summary data of the cases to the page.

 

For example:

 

Rating field with 3 options: "Did Not Meet Expectations", "Meets Expectations", and "Exceeds Expectations".

 

I would like to have a chart on a vf page that shows the number of cases in each bucket.  I know how to make a chart on a vf page and also how to get list data to a vf page, but struggling with getting summary data to the page.

 

Any assistance would be greatly appreciated!


Thanks,

Adam

Hi All

I have a custom field in standard object .We are using it in diffrent page layouts.But we want change the label name in each page layout with anohter name.It is possble using custom code.

 

Any ideas are welcome.

 

Thanks'

 

  • July 16, 2013
  • Like
  • 0

I have a custom field which I need to delete and it is also a required field which is used in apex class and visualforce page. I dnt need that feld anymore.. is there a way I  can delete a field or make that field which is not a required field. 

 

Hi all,

 

I have a page that has an extension class, and whenever I try to update a variable in the extension from a SelectList, it just doesn't happen.

 

Page snippet:

<apex:page standardController="Opportunity" extensions="SelfEnrollController" action="{!getParameters}" id="SelfEnrollPage">

<apex:form id="SelfEnrollForm">
...
<b>Primary Category:</b> 
<apex:SelectList id="Positions" value="{!strPrimryCatId}"  size="1" multiselect="false">
<apex:selectOptions value="{!CategoryItems}"/>
</apex:SelectList> <br/>

...

 

 

Controller snippet:

 

public  class SelfEnrollController {
Public String strPrimryCatId{get;set;}
public void getParameters() {
...
Public List<SelectOption> getCategoryItems() {
 List<SelectOption> options = new List<SelectOption>();

   for(jsonPrimaryCategories  c :cloneCategory) {
     System.debug('c.Id: ' + c.Id + ', c.Value: ' + c.Value);
     options.add(new SelectOption (c.Id,c.Value));
     }
   return options;
   }    
}



Do I have to do anything different becayse the selectlist is updating a value in an extension?

 

Help?

 

 

 

Hi,

I have a custom button that sends order information to another system.  The button's content Source is a visualforce Page.  The visualforce page's controller does the transfer of data by calling a webservice.  The vpage then displays the response of the webservice.

 

The problem we are running into is the users are double clicking the button.

 

I figured I would disable the button after the first click, but I cannot figure out how to do that.  I need the button disabled as soon as the user clicks the button.  I can't disable it on the visual force page because to much time has elapsed before the disable will take place. I thought I would try disabling it in the controller but I don't know how to do that.

 

Can anyone help?