• Francisco Riccomagno 1
  • NEWBIE
  • 30 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 11
    Questions
  • 17
    Replies
I'm actually having Continuos Integration in place which has been done all manually and custom. We are using ANT to deploy to more than 90 developer sandboxes through it. I'm trying now to move from ANT deployments to the "new" Salesforce CLI. But reading the documentation I can only see 2 ways to log in to the sandboxes through it, which is through a web login or through a connected app. Does anyone know if there is a way to connect through the Salesforce CLI using username and password? Or am I forced tyo create more than 90 secret keys and connected apps to achieve the same I'm getting now with ANT? 
Thank you.
Hello, I have an org where we have more than 14000 test methods and we ran the whole suite of tests daily. As you can imagine the ApexTestResult grows very fast. I have been going and manually deleting those records through the UI in a weekly basis, but would like to know if there is a way to create a schedule job that does this. I tried to delete this through the exceute anonymous by doing
List<ApexTestResult> apexTestResultList = [SELECT Id FROM ApexTestResult];
system.debug('apexTestResultList found: ' + apexTestResultList.size());
delete apexTestResultList;
But I get an error that says "Delete not allowed on List<ApexTestResult>"
Is there a way to achieve this programatically?
Thank you.

 
Hello, I'm implementing a robust class that implements the interface SandboxPostCopy. In there I have several private methods that are then individualy tested from the test class.
Now I have the need of creating another private method that should receive as a parameter the SandboxContext instance that the runApexClass receives, but I'm not able to create a test method for that particular private method as I'm not able to create an instance of SandboxContext that I need to send as a parameter.
I can see in different post how to instantiate my implementation of the SandboxPostCopy and send parameters that then are translated to the SandboxContext, but this will excecute all of the more than 20 private methods that I have. I don't want that, I need to unit test the private method that I have created.
Any idea on how this can be implemented? 
Thanks in advance.
Hello, I want to enable a custom profile to add apex classes to a change set, but keep them disabled from "Author Apex", is that possible?
Hello, I've created a VisualForce page and made it public. The page is to enter the Custom Object fields. One of them is a Lookup to another Custom Object. The problem is that for some reason when I click in the Lookup icon is not showing any information, and only showing:
•There are no records of this type
•You don't have permission to see any of the records
•Records do not fit the filter criteria set by your administrator
•One or more controlling fields are blank or invalid (Controlling fields: myCustomObject)

The thing is that when I'm logged in as an admin, the Lookup works perfectly.
I set up the Object Permissions under both custom objects, but still having the same result.
Any thoughts?
Hi all. Im creating a wizard with VisualForce were, to put an example, I'm populating information from a Customer and the product it bought. So, in the first step we load the information related to the Customer (Customer__c), in the second page we load the information for each of the product he/she bought (Product__c), and in the third page I want to show the summary of all this steps.
So, my problem comes at this step, were I want to show, for each of the products, the Product Type (Product_Type__c) they belong to (information that was loaded though a lookup in the step 2).
so, the Visualforce code that I'm trying to use is:

<apex:repeat value="{!products}" var="item">
   <apex:outputText value="Article Number"/>
   <apex:outputText value="{!item.Article_Number__c}"/>
   <apex:outputText value="Product Type"/>
   <apex:outputText value="{!item.Product_Type__c.Name}"/>
</apex:repeat>

When trying to save this I get: Error: Unknown property 'String.Name'
When I remove the .Name, what I'm showing is the Id of the Product_Type__c chosen.
So, how can I iterate through the list of product and for each of it show the Product_Type__c.Name ?
Thank you in advance!
Hello, I created a VisualForce page in order to send an email to an email field within my custom object with a PDF attached. To do this I used the recomendations posted here: http://blog.jeffdouglas.com/2010/07/16/create-and-email-a-pdf-with-salesforce-com/
This is working fine, but now I want that to be done when my custom object meets a specific criteria. In my case, when a checkbox is set to TRUE. I tried to do this by creating a workflow, but the options that i see there are to send an email with some infromation shown in the same worflow wizzard. Is there a way to make the worflow to call the Visual Force page I created?
I'm trying to generate a PDF dinamically from the information we have. I managed to work this by using a VisualForce page with renderAs="pdf". The problem that we are having now is that we want an image to be center in the header, and for some reason I'm unable to make it work with standard css. Here is the part of the code i'm unsing in the page:
<apex:pageBlock >
        <apex:pageBlockSection collapsible="false">                     
            <apex:repeat value="{!pictures}" var="picture">
               <div style="width:100%;">    
                    <img src="{!URLFOR($Action.Attachment.Download, picture)}" style="display:block; margin:0 auto"/>        
               </div>                 
            </apex:repeat>              
        </apex:pageBlockSection>
  </apex:pageBlock>
If I use this desing in a plain HTML page, it works perfectly, but it seems that the apex code is messing up with my stilling. 
Is there a way to make my image to be centered?
Thank you.
This is the error message I'm getting: Save error: In field: logo - no Document named SharedDocuments/Company_Logo.gif. After the first time I received this error, I uploaded an image into SharedDocument with the Company_Logo.gif name on it.
Am I missing something else?
Thank you.
Hello, I'm totaly new to the salesforce development world, so maybe this is not the correct question to make. 
I'm doing a quick app to try to understand how to develop on salesforce and I came to a moment where I don't know what to do. I need 2 different user to be able to choose a value from a picklist. The thing is that one user should be able to choose more than one value, an the other only one.
I tried to solve this by creating 2 different profiles, and try to create a record type, but the problem is that with the record type I can limit the values shown in the picklist, but can't change from a "Only one" selection to a Muptiple selection.
Maybe my way of thinking the solution is wrong, but is there a way of doing this? If not, how should be my way of thinking the solution to this?
Thank you in advance.
I'm actually having Continuos Integration in place which has been done all manually and custom. We are using ANT to deploy to more than 90 developer sandboxes through it. I'm trying now to move from ANT deployments to the "new" Salesforce CLI. But reading the documentation I can only see 2 ways to log in to the sandboxes through it, which is through a web login or through a connected app. Does anyone know if there is a way to connect through the Salesforce CLI using username and password? Or am I forced tyo create more than 90 secret keys and connected apps to achieve the same I'm getting now with ANT? 
Thank you.
Hello, I have an org where we have more than 14000 test methods and we ran the whole suite of tests daily. As you can imagine the ApexTestResult grows very fast. I have been going and manually deleting those records through the UI in a weekly basis, but would like to know if there is a way to create a schedule job that does this. I tried to delete this through the exceute anonymous by doing
List<ApexTestResult> apexTestResultList = [SELECT Id FROM ApexTestResult];
system.debug('apexTestResultList found: ' + apexTestResultList.size());
delete apexTestResultList;
But I get an error that says "Delete not allowed on List<ApexTestResult>"
Is there a way to achieve this programatically?
Thank you.

 
I am trying to setup a method that will be auto run when the sandbox is refreshed the problem is that it is an aync class and I am getting
'Unsupported parameter type SandboxContext' since @future methods must be static. Does anyone know of a way to setup async SandboxPostCopy  methods?

global class FixSandboxUsers implements SandboxPostCopy {
    @future
    global static void runApexClass(SandboxContext context){
Can any one please suggest me how to achieve the Salesforce CI to retrieve the metadata from one org and deploy into another org.
Hi,  I receive the following error in a test class but have not been able to repeat them in non test running scenarios.

"System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_EXECUTE_FLOW_TRIGGER, The record couldn’t be saved because it failed to trigger a flow. 
A flow trigger failed to execute the flow with version ID 301O00000008hM6. 
Contact your administrator for help.: []"

Does anyone know if there could be an issue running flows in test class contexts but not otherwise?

Thanks.
Hello, I've created a VisualForce page and made it public. The page is to enter the Custom Object fields. One of them is a Lookup to another Custom Object. The problem is that for some reason when I click in the Lookup icon is not showing any information, and only showing:
•There are no records of this type
•You don't have permission to see any of the records
•Records do not fit the filter criteria set by your administrator
•One or more controlling fields are blank or invalid (Controlling fields: myCustomObject)

The thing is that when I'm logged in as an admin, the Lookup works perfectly.
I set up the Object Permissions under both custom objects, but still having the same result.
Any thoughts?
Hi all. Im creating a wizard with VisualForce were, to put an example, I'm populating information from a Customer and the product it bought. So, in the first step we load the information related to the Customer (Customer__c), in the second page we load the information for each of the product he/she bought (Product__c), and in the third page I want to show the summary of all this steps.
So, my problem comes at this step, were I want to show, for each of the products, the Product Type (Product_Type__c) they belong to (information that was loaded though a lookup in the step 2).
so, the Visualforce code that I'm trying to use is:

<apex:repeat value="{!products}" var="item">
   <apex:outputText value="Article Number"/>
   <apex:outputText value="{!item.Article_Number__c}"/>
   <apex:outputText value="Product Type"/>
   <apex:outputText value="{!item.Product_Type__c.Name}"/>
</apex:repeat>

When trying to save this I get: Error: Unknown property 'String.Name'
When I remove the .Name, what I'm showing is the Id of the Product_Type__c chosen.
So, how can I iterate through the list of product and for each of it show the Product_Type__c.Name ?
Thank you in advance!
Hello, I created a VisualForce page in order to send an email to an email field within my custom object with a PDF attached. To do this I used the recomendations posted here: http://blog.jeffdouglas.com/2010/07/16/create-and-email-a-pdf-with-salesforce-com/
This is working fine, but now I want that to be done when my custom object meets a specific criteria. In my case, when a checkbox is set to TRUE. I tried to do this by creating a workflow, but the options that i see there are to send an email with some infromation shown in the same worflow wizzard. Is there a way to make the worflow to call the Visual Force page I created?
I'm trying to generate a PDF dinamically from the information we have. I managed to work this by using a VisualForce page with renderAs="pdf". The problem that we are having now is that we want an image to be center in the header, and for some reason I'm unable to make it work with standard css. Here is the part of the code i'm unsing in the page:
<apex:pageBlock >
        <apex:pageBlockSection collapsible="false">                     
            <apex:repeat value="{!pictures}" var="picture">
               <div style="width:100%;">    
                    <img src="{!URLFOR($Action.Attachment.Download, picture)}" style="display:block; margin:0 auto"/>        
               </div>                 
            </apex:repeat>              
        </apex:pageBlockSection>
  </apex:pageBlock>
If I use this desing in a plain HTML page, it works perfectly, but it seems that the apex code is messing up with my stilling. 
Is there a way to make my image to be centered?
Thank you.
This is the error message I'm getting: Save error: In field: logo - no Document named SharedDocuments/Company_Logo.gif. After the first time I received this error, I uploaded an image into SharedDocument with the Company_Logo.gif name on it.
Am I missing something else?
Thank you.
Hello, I'm totaly new to the salesforce development world, so maybe this is not the correct question to make. 
I'm doing a quick app to try to understand how to develop on salesforce and I came to a moment where I don't know what to do. I need 2 different user to be able to choose a value from a picklist. The thing is that one user should be able to choose more than one value, an the other only one.
I tried to solve this by creating 2 different profiles, and try to create a record type, but the problem is that with the record type I can limit the values shown in the picklist, but can't change from a "Only one" selection to a Muptiple selection.
Maybe my way of thinking the solution is wrong, but is there a way of doing this? If not, how should be my way of thinking the solution to this?
Thank you in advance.

I have a site that has solutions on it.  If you log into the system and pull up the visualforce page you can see all of the fields for the solutions on the page.  But if you pull up the site that is linked to that visualforce page all Custom Fields on Solutions do not show up.  I have gone through all the permissions and everything is correct as far as I can tell.  Anyone have any idea why this might be happening?