• Arlene
  • NEWBIE
  • 115 Points
  • Member since 2011

  • Chatter
    Feed
  • 1
    Best Answers
  • 4
    Likes Received
  • 0
    Likes Given
  • 9
    Questions
  • 25
    Replies
I have created a Visual Flow to update look up fields based on the User ID field. E.g.
User ID field = 1234. The Visual Flow looks up all the User records from the User object and assigns the name of User ID 1234 to the User Name field on the record.
Due to the number of User ID fields that have to be looked up, the Flow is hitting governer limits. I'd like to create a batchable Apex to achieve this and I was wondering if this would be possible? I'd appreciate any help/guidance on this!

User-added image

 
Has anybody seen any information about which tool Salesforce uses to create content for the Salesforce Developers Blog?  We're not asking about how they surface the content in the Community, but about the tools they use to create and store it -- Knowledge Articles, CMS, or something else?  We would like to create something similar in format.

Sometimes Salesforce employees use their own sites as examples in presentations or blogs, and that's what we're hoping for.
  • April 03, 2020
  • Like
  • 0
Has anyone successfully used Lighting Out in a Visualforce Page inside a Visualforce + Tabs Community?  We're converting a Customer Portal site to a Visualforce + Tabs Community.  Every Visualforce page that includes Lighting Out throws Internal Error messages.  If someone has successfully accomplished this, we will continue to troubleshoot.  Otherwise, we will re-code out Lightning Out apps in straight Visualforce for the migration.
  • August 12, 2018
  • Like
  • 0
Am running into an error in the Trailhead module for Packaging2.  I've downloaded the DreamHouse app and created the package without error.  But when I try to create a new version of the package, I get "An unexpected error occurred.  Please contact Salesforce Support and provide the following error code...."  It runs for about 2 minutes before it runs into this error.  I've started over from scratch.  I've remembered to put the pakcage id into the sfdx-project.json file.  I've double-checked that I'm connected to my DevHub.  I've double-checked that the force-app folder has the appropriate contents.  Any ideas where else to look?
Has anyone been successful with updating data in a sandbox (not developer org) using a community for an OAuth login host in a hybrid local app on iOS? Our Community users have Customer Portal licenses.  We can authorize and query data, but cannot seem to do updates or inserts to any objects whatever. We receive back a rather generic error 400, and can't seem to drill down into any more information. It doesn't appear to be security as the same user can update exactly the same records and fields in the Community through the UI. Identical updates through Workbench (to test the REST API) work as well, although that login is not authenticating through the community. We are using the newest version of the SDK (5.1), and version 1.0 of the ForceJS Rest Toolkit. (Version 2.0 of ForceJS has browser compatibility issues that we're not ready to address, and it didn't solve this update problem.) Currently, we're still testing on iPhone simulators on MacOS, until we can get the updates to work.
I have a hybrid local app running with Mobile SDK 5.1.  Authentication works fine.  Selecting data works fine.  But when I try to update a record with force.update (using the new syntax with the Id in the object, not as a parameter), I'm getting a very generic 400 error.  All the obvious things look fine -- security, JSON format, etc.  I'm not so much looking for suggestions about the root cause, but could use some advice about how to get more information on the error.  JSON.stringify(error) only returns the URL constructed from the path and fields, and "error 400".  Any ideas about how to dig deeper?

We would like to have information logged from exceptions caught in Apex.  We have a custom object to store it in (Error_Detected__c).  Query exceptions are successfully stored.  I have been unable to find a way to capture DML exceptions that occur as the result (for example) of a user clicking the Submit button on a VF page with a custom controller.  Following http://wiki.developerforce.com/page/An_Introduction_to_Exception_Handling, this is what I have attempted.

 

1.  Insert an entry into Error_Detected__c  in the catch clause of a try/catch which surrounds the failed insert statement.  It doesn't work, as the entry into Error_Detected__c is rolled back along with the failed insert.

 

2.  Call a future menthod to insert an entry into Error_Detected__c  in the catch clause of a try/catch which surrounds the failed insert statement.  It doesn't work, as the entry into Error_Detected__c is rolled back along with the failed insert.

 

3.  Call out to a web service in the catch clause of a try/catch which surrounds the failed insert statement.   The web service would do the insert into Error_Detected__c.  This fails with a message about needing to commit or rollback before making a callout, even if the very first statement in the Submit method is a SavePoint and the very last statement before the callout is a rollback to that savepoint.

 

I must be missing something completely obvious.  Has anyone implemented a successful error logging mechanim for DML that is triggered by a user action in VF pages?

  • December 06, 2013
  • Like
  • 0

This is a new problem (about 3 weeks old) on pages in a Customer Portal site which have run for at least 18 months without an issue.  Has anyone seen anything similar?

 

In our header document for our Customer Portal, the html file contains the following lines (partial code only).  The normal purpose for these lines is to add branding and menus to a standard List View page for Products by reading a Visualforce page used as a template.

 

<div id="headerContainer"></div>
    <script type="text/javascript">
    var isNativePage = window.location.href.indexOf('salesforce.com') > -1;
    var startIdx = document.cookie.indexOf('; sid=') + 6;
    sforce.connection.sessionId = document.cookie.substring(startIdx, document.cookie.indexOf(';', startIdx));
    if ( isNativePage && window.location.pathname.indexOf("/a0c") != -1 ) {
        var headerHtml = sforce.apex.execute("VisualforceProxy", "getTestContents", {});
        document.getElementById("headerContainer").innerHTML = headerHtml;
    }

 

However, to simplify issue for testing, I am returning a string rather than reading a VF page.  This is the class read using sforce.apex.execute above.

 

global class VisualforceProxy {

    webservice static String getTestContents() {
        return '<p>See Me!</p>';
    }

}

 

When this code executes as part of a page loaded with the address  

 

https://cs15.salesforce.com/a0c?fcf=00B300000083eUg

 

it should display the list view of the products, which can contain images of the products.  This works fine in IE (versions 7-10), and in Firefox.  It even works well in Chrome if there are very few images on the page or if most of the images are already cached.  when it works, "See Me!" displays at the top of the page in place of the normal branding and menus, and the list view displays as expected. However, if there are several images on the page (variable, based on network speed, I believe), the sforce.apex.execute hangs and never returns.  Is anyone else seeing this as a new behavior with Chrome?

  • April 25, 2013
  • Like
  • 0

It appears that the title= attribute on the <apex:page> tag is ignored when renderAs="pdf" is specified.  I have also tried setting the page title using the HTML <title> tag in the header, and also on the window.open() method in Javascript.  I am using Javascript to initiate the window, as the URL is dynamically created.

 

Is there a way to set the title of a new window with renderAs="pdf" specified?  If I remove the renderAs attribute, the page title is set correctly.

  • March 11, 2013
  • Like
  • 0

Is is possible to use the Dataloader to move content from one library to another by updating the ContentWorkspaceDoc object?

  • November 08, 2011
  • Like
  • 0
Am running into an error in the Trailhead module for Packaging2.  I've downloaded the DreamHouse app and created the package without error.  But when I try to create a new version of the package, I get "An unexpected error occurred.  Please contact Salesforce Support and provide the following error code...."  It runs for about 2 minutes before it runs into this error.  I've started over from scratch.  I've remembered to put the pakcage id into the sfdx-project.json file.  I've double-checked that I'm connected to my DevHub.  I've double-checked that the force-app folder has the appropriate contents.  Any ideas where else to look?
public class ShowroomDetail_Ctl {
    public Showroom_Request__c recShowroom {get;set;}
    public List<Sales_Order__c> lstSalesOrders {get;set;}
    public Map<Id,List<Transaction__c>> mapTransactions {get;set;}
    public Map<Id,List<Transaction_Line__c>> mapTransactionLines {get;set;}

    public ShowroomDetail_Ctl(ApexPages.StandardController controller){
        recShowroom = new Showroom_Request__c();
        lstSalesOrders = new List<Sales_Order__c>();
        mapTransactions = new Map<Id,List<Transaction__c>>();
        mapTransactionLines = new Map<Id,List<Transaction_Line__c>>();
       
        String showroomId = ApexPages.currentpage().getparameters().get('id');
        System.debug('showroomId : '+showroomId);
        Set<String> setOfOrder = new Set<String>();
        if(showroomId != null && showroomId.length() >= 15){
            recShowroom = [SELECT Id,Name,Order_Number_1_BH__c,Order_Number_2_BH__c ,Order_Number_3_BH__c ,Order_Number_4_BH__c,
                              Order_Number_5_BH__c,Order_Number_6_BH__c,Order_Number_7_BH__c,Order_Number_8_BH__c ,Order_Number_9_BH__c,
                              Order_Number_10_BH__c,Order_Number_1_BSD__c,Order_Number_2_BSD__c,Order_Number_3_BSD__c,Order_Number_4_BSD__c 
                              FROM Showroom_Request__c WHERE Id =: showroomId];
            if(recShowroom.Id != null){
                System.debug('Id : '+showroomId);
                setOfOrder.add(recShowroom.Order_Number_1_BH__c);
                setOfOrder.add(recShowroom.Order_Number_2_BH__c);
                setOfOrder.add(recShowroom.Order_Number_3_BH__c);
                setOfOrder.add(recShowroom.Order_Number_4_BH__c);
                setOfOrder.add(recShowroom.Order_Number_5_BH__c);
                setOfOrder.add(recShowroom.Order_Number_6_BH__c);
                setOfOrder.add(recShowroom.Order_Number_7_BH__c);
                setOfOrder.add(recShowroom.Order_Number_8_BH__c);
                setOfOrder.add(recShowroom.Order_Number_9_BH__c);
                setOfOrder.add(recShowroom.Order_Number_10_BH__c);
                
                setOfOrder.add(recShowroom.Order_Number_1_BSD__c);
                setOfOrder.add(recShowroom.Order_Number_2_BSD__c);
                setOfOrder.add(recShowroom.Order_Number_3_BSD__c);
                setOfOrder.add(recShowroom.Order_Number_4_BSD__c);
            }
            
            Set<Id> setOfSOIds = new Set<Id>();
            for(Sales_Order__c eachSO : [SELECT Id,Name,(SELECT Id,Name,Sales_Order__c FROM SalesOrder__r) FROM Sales_Order__c WHERE Name IN: setOfOrder AND Name != null]){
                lstSalesOrders.add(eachSO);
                if(eachSO.SalesOrder__r != null && eachSO.SalesOrder__r.size() > 0)
                mapTransactions.put(eachSO.Id,eachSO.SalesOrder__r);
                
                setOfSOIds.add(eachSO.Id);
            }
            System.debug('mapTransactions : '+mapTransactions);
            for(Transaction__c eachTran : [SELECT Id,Name,Sales_Order__c,(SELECT Id,Name FROM Invoice_Lines__r) FROM Transaction__c WHERE Sales_Order__c IN: setOfSOIds AND Sales_Order__c != null]){
                if(eachTran.Invoice_Lines__r != null && eachTran.Invoice_Lines__r.size() > 0)
                mapTransactionLines.put(eachTran.Sales_Order__c,eachTran.Invoice_Lines__r);
            }
           
        }
    }
}
Hi all,
I have an apex class which returns a map<string,string>. It stores two lookup fields from parent and child object. When I display the map values in lwc component, it displays ID instead of the value as URL. How can I display the values?
Hola a todos.

Estoy realizando un PDF con Visualforce pero me marca el siguiente error: 
Propiedad 'Presupuesto_Lead__cStandardController.Resource' desconocida. ya hice varias modificaciones, incluso revise los que cree con anterioridad y no se que es lo que esta pasando.
Comparto el controlador como el VF.

Controller:
public without sharing class Presupuesto_lead {
    

    public DATE     Fecha_de_expiracion {get; set;}
    
    
        public Presupuesto_lead(ApexPages.StandardController controller) {
            
                Presupuesto_Lead__c[] plead = [Select Name, Cantidad1__c, Cantidad2__c, Cantidad3__c, Cantidad4__c,
                                                   Porcentaje_de_Descuento1__c, Porcentaje_de_Descuento2__c, Porcentaje_de_Descuento3__c, Porcentaje_de_Descuento4__c
                                               
                                                      From Presupuesto_Lead__c
                                                      Where Id=:controller.getId()];
        
                Product2[] p = [Select Name
                                     From Product2
                                     Where Id=:controller.getId()]; 
        
                Familia_de_productos__c[] fp = [Select Name
                                                      From Familia_de_productos__c
                                                        Where Id=: controller.getId()];
        
                Lead [] lead = [Select Name, lead.Company
                                        From Lead
                                        Where Id=: controller.getId()];
        

}
    }

Página VF:
<apex:page standardController="Presupuesto_Lead__c" extensions="Presupuesto_lead"  renderAs="pdf">
    
    <head>
        <style>
                h2 { color: #2e2e65 ; font-size : 15px ; font-family : Arial; }
                h3 { color: #2e2e65 ; font-size : 15px ; font-family : Arial; }
                h4 { color: #2e2e65 ; font-size : 15px ; font-family : Arial; }
                h5 { color: #2e2e65 ; font-size : 15px ; font-family : Arial; }
                h6 { color: #2e2e65 ; font-size : 15px ; font-family : Arial; }
                h7 { color: #2e2e65 ; font-size : 15px ; font-family : Arial; } 
                h8 { color: #2e2e65 ; font-size : 15px ; font-family : Arial; }
                h9 { color: #2e2e65 ; font-size : 15px ; font-family : Arial; }
                h10 { color: #2e2e65 ; font-size : 15px ; font-family : Arial; }
                td { color: #2e2e65 ; font-size : 15xp ; font-family : Arial; }
                * {
                box-sizing: border-box;
                }
                
                .heading {
                font-weight: bold;
                }
                
                .heading--main {
                font-size: 36px;
                }
                
                .heading--sub {
                font-size: 21px;
                }
                             
                .box--full {
                float: center;
                width: 100%;
                }  
                
                 table {
                border: 1; 
                margin-top: 25px;
                width: 100%;
                }        
                
                th {
                background-color: #19d3c5;
                font-align: left;
                font-size: 14px;
                font-weight: bold;
                padding: 5px;
                }
            </style>
          <img src="{!Resource.Logonuevo}" width="200" height="150"> </img> <br/><br/>
          <br/>
          <br/>
       </head>        
        <body>
        <center>
          <h1>Presupuesto para Lead</h1>
        </center>
            <table border="1" bordercolor="red"> <br/>
              <div align="right">
                <h6> Fecha de Vencimiento: {!Day(Presupuesto_Lead__c.Fecha_de_Expiraci_n__c)}-{!Month(Presupuesto_Lead__c.Fecha_de_Expiraci_n__c)}-{!Year(Presupuesto_Lead__c.Fecha_de_Expiraci_n__c)}
                </h6>
              </div> 
              <div align="left">
                <h2> Nombre de Presupuesto: {!Presupuesto_Lead__c.Name}
                </h2>
              </div>
              <div align="left">
                <h4> Prospecto: {!Presupuesto_Lead__c.Prospecto__r.Name}
                </h4>
              </div>
              <div align="left">
                <h5> Compañia: {!Presupuesto_Lead__c.Compa_a__r.Name}
                </h5>
              </div>
            </table>
         <center>
          <h1> Detalles </h1><br/>
         </center> 
          <center>               
           <table border="2">
             <tr>
              <th> Producto </th>
              <th> Cantidad (TON) </th>
              <th> Subtotal de producto (USD) </th>
              <th> Total del producto (USD) </th>
             </tr>
            <apex:repeat value="{!Presupuestaci_n__c}" var="Presupuestaciones">
             <tr>
               <td>{!Presupuesto_Lead__c.Producto1__r.Name}</td>
               <td>{!Presupuesto_Lead__c.Cantidad1__c}</td>
                <td> <div class="input-icon">
                <input type="text">
                 <i>$ {!Presupuesto_Lead__c.SubTotal1__c}</i>
                </input>
                </div></td>
                 <td> <div class="input-icon">
                 <input type="text">
                  <i>$ {!Presupuesto_Lead__c.Precio_Total1__c}</i>
                 </input>
                 </div></td>
            </tr>
            <tr>
               <td>{!Presupuesto_Lead__c.Producto2__r.Name}</td>
               <td>{!Presupuesto_Lead__c.Cantidad2__c}</td>
                <td> <div class="input-icon">
                <input type="text">
                 <i>$ {!Presupuesto_Lead__c.SubTotal2__c}</i>
                </input>
                </div></td>
                 <td> <div class="input-icon">
                 <input type="text">
                  <i>$ {!Presupuesto_Lead__c.Precio_Total2__c}</i>
                 </input>
                 </div></td>
            </tr>
            <tr>
               <td>{!Presupuesto_Lead__c.Producto3__r.Name}</td>
               <td>{!Presupuesto_Lead__c.Cantidad3__c}</td>
                <td> <div class="input-icon">
                <input type="text">
                 <i>$ {!Presupuesto_Lead__c.SubTotal3__c}</i>
                </input>
                </div></td>
                 <td> <div class="input-icon">
                 <input type="text">
                  <i>$ {!Presupuesto_Lead__c.Precio_Total3__c}</i>
                 </input>
                 </div></td>
            </tr>
            <tr>
               <td>{!Presupuesto_Lead__c.Producto4__r.Name}</td>
               <td>{!Presupuesto_Lead__c.Cantidad4__c}</td>
                <td> <div class="input-icon">
                <input type="text">
                 <i>$ {!Presupuesto_Lead__c.SubTotal4__c}</i>
                </input>
                </div></td>
                 <td> <div class="input-icon">
                 <input type="text">
                  <i>$ {!Presupuesto_Lead__c.Precio_Total4__c}</i>
                 </input>
                 </div></td>
            </tr>
          <table border="4" bordercolor="blue"><br/>        
              <div align="right">
               <h7> Creado por: {!PPresupuesto_Lead__c.CreatedBy.Name} </h7>
              </div>
              <div align="right">
               <h8> Email de vendedor: {!Presupuesto_Lead__c.CreatedBy.Email} </h8>
              </div>
              <div align = "right">
                <h9> Teléfono de propietario: {!Presupuesto_Lead__c.CreatedBy.Mobile} </h9>
              </div>
              <div align = "right">
                <h10> Cargo: {!Presupuesto_Lead__c.CreatedBy.Title} </h10>  
              </div>
          </table>
            </apex:repeat>
           </table>
          </center>
        </body>
</apex:page>

Agradeceria mucho su apoyo
Hi folks,

I am displaying the records from the custom object test__c using html table in LWC. 
I am using this below tag to iterate over the list of records.

<tbody>
<template for:each={testList} for:item="test">
<tr key={test.Id}>
<td>
{data}
</td>

I want to access the current item (for:item="test") in js file.

Like, in js, I am giving

@track record = {};
@track field;

I want (for:item="test") record data to populate in the @track record property.

Can anyone help me with this ?


 

I have requirement to display only specific related list(License in this case) in VF. I tried using following code but no success. I am using apex:details to hide all related list and then apex:related list to show specific related list. I need to know 2 things:-
  • Why this code is not working ?
  • Is there a better way to approach this problem ?
<apex:page renderAs="pdf" showHeader="false" applyHtmlTag="false" applyBodyTag="false" controller="FulfillmentRequestListViewPdfExtension" action="{!updateDistributionStatus}">
<html>
    <head>
        <style>
            @media print {
                html, body {
                    height: 99%;
                }
            }
        </style>
    </head>
    <body>
        <apex:repeat value="{!frs}" var="fr" id="theRepeat">
            <apex:detail subject="{!fr}" id="theValue" relatedList="False" />
            
             <apex:relatedList list="Licenses__r">
              <apex:facet name="header">License Details</apex:facet> 
             </apex:relatedList>
            
               <div style="page-break-after: always;" />
        </apex:repeat>
    </body>
</html>
</apex:page>

License Object (Related List)
Hi there, I am not a SF developer but I am a savvy admin and I understand html and such. What I am wanting to do is create a very simple visual force page and inside it imbed a very simple HTML text list that I can reuse in different areas around our org (lightning components on page layouts and a utility bar visualforce component), but only have one place to make edits. 

What should the opening and closing text of a VF page that simply will store a some unordered html text and lists. I know how to build the list in HTML but don't know how to "wrap" that list in a VF page if that makes sense.

Right now I simply us a rich text lightning component on a home page layout and multiple company department apps. But every time I want to add a link or make edits, I have to do it in 9 places. I would like to have one master VF page that I manage and it updates it everywhere. Below is a screenshot (sensitive parts blurred) showing what I am trying to create. Simply a list of internal company quick links for employees.User-added image

 
i wrote below code can anyone help me in this plzz., it is  ot working


global class Live_Date_Batch_Class implements Database.Batchable<sObject>{
            
            public List<Contact> conList {get;set;}
    
    global Live_Date_Batch_Class()
        {
           
        }
        global Database.QueryLocator start(Database.BatchableContext BC)
        {
            string query = 'select id,LastName from Contact WHERE Live_Date__c = TODAY';
            System.debug('aaaaaaaaaaaaaaaaaaaaaaaa'+query) ; 
            return Database.getQueryLocator(query);
        }
       global void execute(Database.BatchableContext BC, List<Contact>scope)
       {
            Set<Id> convertedIdSet = new Set<Id>();
            List<messaging.SingleEmailMessage>  emails = new List<messaging.SingleEmailMessage>();
            for(Contact contact : scope) 
       {
            convertedIdSet.add(contact.Id);
       }    
       
                   for(Contact contact : scope) 
       {
            conList = ([SELECT FirstName, LastName, Email, Phone, Account.Id
                        FROM Contact 
                        WHERE Id IN :convertedIdSet] );
  
       }    

           String userName = UserInfo.getUserName();

            User activeUser = [Select Email From User where Username = : userName limit 1];

            String userEmail = activeUser.Email;
           
           
       System.debug('bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'+convertedIdSet) ; 
       Messaging.SingleEmailMessage email = new Messaging.SingleEmailMessage();
       email.setToAddresses(new String[] {userEmail});
       email.setSubject('+convertedIdSet+'); 
       email.setPlainTextBody('details');
       emails.add(email);
       String body = 'Contact Details : ' +conList+ ' ';
       Messaging.sendEmail(emails);    
       }
            
       global void finish(Database.BatchableContext BC){
       }
    }
Hi All,
I am trying to learn apex.I was writing a scenario which verifies and prevents creation of account with the same name. i wrote the below code:

public static void preventduplicateAccountsMethod(List<Account> accList){
        System.debug('accList' +accList);
        Set<String> accNewSet = new Set<String>();
        for(Account acc : accList){
            accNewList.add(acc.Name) ;
            accNewSet.add(acc.Name) ;
            System.debug('accNewList' + accNewList);
            
        }
        List<Account> accDupeList = new List<Account>([SELECT Id,Name from Account where Name IN : accNewSet]) ;
        System.debug('accDupeList' + accDupeList);
        if(accDupeList.size() >0){
            for(Account acc : accList){
                acc.addError('cannot create account with same name') ;
            }
        }
     }//end of method


This works fine.But when i try uploading few accounts from the csv into the system i get error for all the records which is wrong.I assume that it should throw error only for the record which is a duplicate and not for all.
Could  you please help me in this.
I am working on this challenge. I am having issues following the directions. Salesforce cannot find the specified roles (Channel Sales Team, Eastern Sales Team, and Western Sales Team), as shown in the pictures. Can anyone provide the solution to this obstacle?

User-added image
User-added image


 
Create object : Hire_Form__c
Fields :
1.       First Name
2.       Last name
3.       Email
4.       Phone
5.       Status (In Progress , Completed , Rejected)
6.       Candidate (Contact Lookup)
7.       Description
 
Create Trigger on Hire_form__c
1.       When hire_form__c  record is insert set status = ‘In Progress’. Create new contact record with firstname , lastname , email, phone. Set contact id in Candidate field on  Hire_form object. Create new case record for new created contact record. Set status in case = ‘New’.
2.       When Hire_form is updated with status = ‘Completed’ , then update the status of related case ‘Closed’.
Create Trigger on Case
1.       When case is updated with Status = ‘Closed’ , then check  if parent contact’s related hire form status is not ‘Completed’ , then show error message ‘You can not close the case until hire form  is completed’.
 
 
I have created a Visual Flow to update look up fields based on the User ID field. E.g.
User ID field = 1234. The Visual Flow looks up all the User records from the User object and assigns the name of User ID 1234 to the User Name field on the record.
Due to the number of User ID fields that have to be looked up, the Flow is hitting governer limits. I'd like to create a batchable Apex to achieve this and I was wondering if this would be possible? I'd appreciate any help/guidance on this!

User-added image

 
This no longer works as described in the Trailhead.  Selecting "User with Limited Access to Treasures" on the CRUD & FLS Visualforce Demo tab yields an "insufficient access" error with no data returned.
Infoblox is seeking two Salesforce Developers with 2-4 years experience max.  Our office is in Tacoma, WA which is just south of Seattle.  Please let me know if you are interested or know someone who might be!
Does anyone know why this error occured? 
For me it does make any sense?
Unsupported attribute label in &lt;apex:inputText&gt;
User-added image
I can't complete the hybrid development challenge,but I think I fullfilled the minimum requirements to do that...

Below are some screenshots:

TrailHead App requesting permission
TrailHead App requesting permission

After allowing, the landing VF is shown...
VF landing

The app settings:
Connected App setting

Finally, the challenge error:
Challenge error

Is something missing or incorrect on connected app settings?

Thanks in advance,
Rafael

We would like to have information logged from exceptions caught in Apex.  We have a custom object to store it in (Error_Detected__c).  Query exceptions are successfully stored.  I have been unable to find a way to capture DML exceptions that occur as the result (for example) of a user clicking the Submit button on a VF page with a custom controller.  Following http://wiki.developerforce.com/page/An_Introduction_to_Exception_Handling, this is what I have attempted.

 

1.  Insert an entry into Error_Detected__c  in the catch clause of a try/catch which surrounds the failed insert statement.  It doesn't work, as the entry into Error_Detected__c is rolled back along with the failed insert.

 

2.  Call a future menthod to insert an entry into Error_Detected__c  in the catch clause of a try/catch which surrounds the failed insert statement.  It doesn't work, as the entry into Error_Detected__c is rolled back along with the failed insert.

 

3.  Call out to a web service in the catch clause of a try/catch which surrounds the failed insert statement.   The web service would do the insert into Error_Detected__c.  This fails with a message about needing to commit or rollback before making a callout, even if the very first statement in the Submit method is a SavePoint and the very last statement before the callout is a rollback to that savepoint.

 

I must be missing something completely obvious.  Has anyone implemented a successful error logging mechanim for DML that is triggered by a user action in VF pages?

  • December 06, 2013
  • Like
  • 0

I have a visualforce page which calls methods tagged with @RemoteAction. The methods are in an extension class which is public, like methods. The class is the extension used in the page. In sandbox everything works as expected.

 

I try to deploy class, test and page to production but an error turns during the validation for the page: "No remoted actions found to resolve '$RemoteAction.ClassName.methodName'"

 

I tried to validate another outbound changeset with only the class and the test, which validates successfully. If I add the page, the validation fails.

 

Have you encountered anything similar?

Thank you very much T.

I know we are not allowed to have a subquery on the same object as our main query, so I am not sure how to write the following SOQL:

 

Select  payout__Households__c
from Account
where payout__Households__c  in

   (

  Select  payout__Households__c
   from Account
   where id = '001A000000Iw0nxIAB'

   )

 

Thanks in advance!

-Jim

trigger CloneRecord on Opportunity (after update)
{
for(Opportunity o : Trigger.new)
{
if(Trigger.isUpdate)
{
if(o.IL_Auto_Renew__c == true && o.ForecastCategoryName == 'Closed' && o.StageName == 'won' )
{

}
}
}
}

If above condition satisfies, Have to clone the record through apex class.

Stage = Agreement
Start date = exactly one year tats 12 months from the closed date of the previous record that is from which this one is getting cloned
End date = Start date of this record plus duration of the previous record. Duration of previous record can be calculated by inserting formula in the trigger as closed date minus created date.
 
Can any give ideas how to clone through apex code ASAP.
  • March 29, 2013
  • Like
  • 0