• cbernal
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 15
    Questions
  • 11
    Replies

Hi,

I want to post in twitter or linkedIn from salesforce. It would be good if the publications in chatter automatically be publicated in twitter or linkedIn. Please share with me some sample code for do that.
thanks in advance.

  • September 19, 2012
  • Like
  • 0

Hi,

I want to post in twitter or linkedIn from salesforce. It would be good if the publications in chatter automatically be publicated in twitter or linkedIn. Please share with me some sample code for do that.
thanks in advance.

  • September 19, 2012
  • Like
  • 0

Hi,

I want to post in twitter or linkedIn from salesforce. It would be good if the publications in chatter automatically be publicated in twitter or linkedIn. Please share with me some sample code for do that.
thanks in advance.

  • September 19, 2012
  • Like
  • 0

Hi,

I'm working in a recruitment application in which I have a Vacancy object.

I would like to broadcast the vacancy from the app to the user's LinkedIn network.

I want to know how to connect salesforce with linkedIn, and if possible also with twitter and facebook. I need some sample code or any help.

Thanks.

  • September 11, 2012
  • Like
  • 0

Hi,

 

I have a vf page with this problem about security risk: Cross-site Scripting.

I have no idea how to solve it.

 

The red line is the part of my vf page where i have the problem:

 

<apex:pageblocktable value="{!accsandtmember}"  var="accdet">

<apex:column headervalue="ID" style="{!accdet.Otra_informaci_n__c}">

 

I take the Otra_informaci_n__c value from a method in an apex class.

 It's got to be something simple. Any help will be appreciated.

 

 

  • September 04, 2012
  • Like
  • 0

I am working on a recruiting application and I want to know if is it possible to post vacancies on occ, and if it is possible I would like some sample code about how to do it.

 

Thanks for any help!!

 

  • September 03, 2012
  • Like
  • 0

Hi,

 

Anyone knows how to check the extension file for an attachment.

 

I have this Trigger:

 

trigger checkAttachment on Attachment (before insert) {
    For(Attachment att:Trigger.new)
    {
        if(att.ContentType=='.exe')    
        {
            att.addError('Cannot upload file with extension .exe');                    
        }
    }    
}

 

But it don't work, it still accepts files with .exe extension.

 

Hi,

 

I have three custom objects: Asignados__c, Aspirante__c and Vacante__c. The Asignados__c object has a master detail relationship whith Aspirante__c and also with Vacante__c of this way:

 

Vacante__c <--- Asignados__c ---> Aspirante__c

 

I want to query the Asignados__c object to show the result in a table of a vf page of this way:

 

Vacante__c value 1       Aspirante__c value 1  

                                          Aspirante__c value 2

                                          Aspirante__c value 3 

                                          Aspirante__c value 4

Vacante__c value 2       Aspirante__c value 1  

                                          Aspirante__c value 2

                                          Aspirante__c value 3 

                                          Aspirante__c value 4

Vacante__c value 3       Aspirante__c value 1  

                                          Aspirante__c value 2

                                          Aspirante__c value 3 

                                          Aspirante__c value 4

 

I have this query:

 

List<Asignados__c> arbolvacs = [Select Vacante__r.Name,(Select Name From Aspirante__r) From Asignados__c Order By Vacante__r.Name];

 

But I receive this error:

Error: Compile Error: Didn't understand relationship 'Aspirante__r' in FROM part of query call. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names. at line 16 column 37

 

I tried also with the Child Relationship Name: Vacantes_Aspirantes1 and Vacantes_Aspirantes1__r but I receive the same error. 

 

Thanks for any help..

 

Hi,

 

I have three custom objects: Aspirante__c, Vacante__c and Asignados__c. The Asignados__c object has a master-detail relationship with Aspirante__c and also has a master-detail relatonship with Vacante__c. I want quering from the Asignados__c object the name of Aspirante__c and the name of Vacante__c. I have the next query:

 

List<txmrecruitment__Aspirante__c> arbolvacs = [Select
   (Select Name From txmrecruitment__Vacante__c.Vacantes_Aspirantes1__r)
   From txmrecruitment__Asignados__c];

 

I am receiving the error:

Error: Compile Error: Didn't understand relationship 'txmrecruitment__Vacante__c' in field path. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names. at line 23 column 51

 

Thanks for any help!

Hi

I am new in salesforce and developed my first app, I have three custom profiles cloned from standard user but when I install the app and I want to assign a custom profile to a user these profiles do not appear neither in drop down list nor in profiles list.

I included them in the package and i don´t know what I'm doing wrong.

Any help will be app appreciated.

Hi

I am new in salesforce and developed my first app, I have three custom profiles cloned from standard user but when I install the app and I want to assign a custom profile to a user these profiles do not appear neither in drop down list nor in profiles list.

 

I included them in the package and i don´t know what I'm doing wrong.

 

Any help will be app appreciated.

Hi,

 

I'm new in salesforce and I installed a package and i have access for all my custom tabs under system administrator, but i can't acces to the tabs in standard user profile, I have my app visible for this profile and the custom tabs are in default on. I don't know what I'm doing wrong. It's got to be something simple.

 

Any help would be appreciated.

Hi developers,

 

I have a visualforce page with text and images and I want to translate it to spanish.

I am using custom labels to translate the text but I don´t know how to show the images according to the language(english or spanish) because I Have text in the images. I have my images like Static Resources.

 

I would also like to know if it is possible to translate views because I did not find them at the workbench.

 

Thanks.

Hi

 

I am new in salesforce and I have a problem.  when my application receive an email it reply with an email template, i have a lot of different email templates and my application reply depending of the subject of the email that was received.

 

The problem is that i don't know if the user of the application will be able to update and delete the email templates because if the user of the application update or delete the email templates my application will not work.

 

I send the email templates with an apex class, here is my code where i send one of the templates:

 

Contact recipient2 = [SELECT id FROM Contact WHERE Email=:email.FromAddress LIMIT 1];                
mail.setTargetObjectId(recipient2.id);
EmailTemplate alert = [SELECT id FROM EmailTemplate WHERE developerName = 'registration'];
mail.setTemplateId(alert.id);                
Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });

 

If the user of the application change the developerName of the email template my class will not find it with the query.

I want to know how validate that the user of the application don't update the developerName or delete any email template that I use in the apex class but if the user create other email template then that template can be modified or deleted.

 

All help is greatly appreciated.

hello

I am new in salesforce and I want to write a test class for a visual force page. I have created a test class but i have only 33% coverage.

 

I have a select option and i don't know how cover that part of code.

 

any help will be appreciated.

 

This is my page

 

<apex:page standardController="Aspirante__c" extensions="MultiSelectController">
     <apex:sectionHeader title="Estatus" />
     <apex:form >
     <apex:pageBlock title="Aspirante" mode="edit"> 
         <apex:outputText value="{!Aspirante__c.Estatus__c}" rendered="false"/>       
 
          <apex:pageBlockButtons location="both">
               <apex:commandButton value="Guardar" action="{!save}" />
               <apex:commandButton value="Cancelar" action="{!cancel}" />
          </apex:pageBlockButtons>
          <apex:pageMessages />       
           <apex:pageBlockSection title="Modificación de Estatus" columns="1">
                 <apex:pageBlockSectionItem >
                    <apex:outputLabel value="Estatus" for="cbxlevel1"/>
                    <apex:outputPanel styleClass="requiredInput" layout="block">
                    <apex:outputPanel styleClass="requiredBlock" layout="block"/>
                    <apex:selectList value="{!selectedLevel1}" id="cbxlevel1" size="1" required="false">
                        <apex:selectOptions value="{!level1items}"/>
                        <apex:actionSupport event="onchange" rerender="cbxlevel2"/>
                    </apex:selectList>
                    </apex:outputPanel>
                </apex:pageBlockSectionItem>
                 
          </apex:pageBlockSection>
 
     </apex:pageBlock>
     </apex:form>   
 
</apex:page>

 

 

VF Page

 

public with sharing class MultiSelectController {
 
    // reference for the standard controller
    private ApexPages.StandardController controller {get; set;}
 
    // the record that is being edited
    private Aspirante__c opp;
 
    // the values of the selected items
    public string selectedLevel1 {get; set;} 
 
    public List<selectOption> level1Items {
        
        get {List<selectOption> options = new List<selectOption>();
              
               if (opp.Estatus__c == Null)
               {               
                options.add(new SelectOption('New','New'));
                options.add(new SelectOption('Waiting','Waiting'));
                options.add(new SelectOption('Interview','Interview'));
                
               } 
               
               if (opp.Estatus__c=='New')
               {                
                options.add(new SelectOption('Waiting','Waiting'));
                options.add(new SelectOption('Interview','Interview'));
                 options.add(new SelectOption('rejected','rejected'));
               } 
              
               
               if (opp.Estatus__c=='Waiting')
               {                
                options.add(new SelectOption('Interview','Interview'));
                //options.add(new SelectOption('Waiting','Waiting'));
                options.add(new SelectOption('rejected','rejected'));
               } 
              
                            
              
        return options; 
        }
        set;
    }
 
 
    public MultiSelectController(ApexPages.StandardController controller) {
 
        //initialize the stanrdard controller
        this.controller = controller;
        // load the record
        this.opp = (Aspirante__c)controller.getRecord();
 
        // preselect the current values for the record
        selectedLevel1 = opp.Estatus__c;
     
 
    }          
 
    public PageReference save() {
 
        // set the selected values to the record before saving
        String respaldOpp;
        respaldOpp = opp.Estatus__c;
        opp.Estatus__c =selectedLevel1;
       
        try {
            update(opp);
        } catch(System.DMLException e) {
                       
            ApexPages.addMessages(e);
            return null;
        }
      
         PageReference opp= new ApexPages.StandardController(opp).view();
      opp.setRedirect(true);
      return opp;
         
    }        
 
}

 

Test Class

 

@isTest
public class MultiSelectControllerTest{
public static testMethod void MultiSelectControllerTest() {
       
    PageReference pageRef = Page.selectEstatus;
    Test.setCurrentPage(pageRef);     
                  
    Aspirante__c aspirante = new Aspirante__c(Name='Tests', CorreoElectronico__c='tst@mail.com', Estatus__c='New');
    insert aspirante;
        
    ApexPages.standardController controller = new ApexPages.standardController(aspirante);
             
    MultiSelectController pag = new MultiSelectController(controller); 
              
    pag.save();
    
}
}

 

Hi,

I want to post in twitter or linkedIn from salesforce. It would be good if the publications in chatter automatically be publicated in twitter or linkedIn. Please share with me some sample code for do that.
thanks in advance.

  • September 19, 2012
  • Like
  • 0

Hi... 

Please let me know..how to update a custom field in case object {say enter_text_c} on save click such that if we there is an text 'today' in the field it should be converted to today's date..

Hi,

 

Anyone knows how to check the extension file for an attachment.

 

I have this Trigger:

 

trigger checkAttachment on Attachment (before insert) {
    For(Attachment att:Trigger.new)
    {
        if(att.ContentType=='.exe')    
        {
            att.addError('Cannot upload file with extension .exe');                    
        }
    }    
}

 

But it don't work, it still accepts files with .exe extension.

 

Hello,

 

I am trying to create a simple query involving the account object, and a custom object. But the query causes an error of 

 

"INVALID_TYPE - Didn't understand relationship"

 

The affiliation object is a child relative to Account and both values are strings so I am not sure what the issue is. The query is below.

 

SELECT Name, (SELECT ContactLastName FROM npe5__Affiliation__c) FROM Account

 

 

  • August 28, 2012
  • Like
  • 0

Hi,

 

I have three custom objects: Asignados__c, Aspirante__c and Vacante__c. The Asignados__c object has a master detail relationship whith Aspirante__c and also with Vacante__c of this way:

 

Vacante__c <--- Asignados__c ---> Aspirante__c

 

I want to query the Asignados__c object to show the result in a table of a vf page of this way:

 

Vacante__c value 1       Aspirante__c value 1  

                                          Aspirante__c value 2

                                          Aspirante__c value 3 

                                          Aspirante__c value 4

Vacante__c value 2       Aspirante__c value 1  

                                          Aspirante__c value 2

                                          Aspirante__c value 3 

                                          Aspirante__c value 4

Vacante__c value 3       Aspirante__c value 1  

                                          Aspirante__c value 2

                                          Aspirante__c value 3 

                                          Aspirante__c value 4

 

I have this query:

 

List<Asignados__c> arbolvacs = [Select Vacante__r.Name,(Select Name From Aspirante__r) From Asignados__c Order By Vacante__r.Name];

 

But I receive this error:

Error: Compile Error: Didn't understand relationship 'Aspirante__r' in FROM part of query call. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names. at line 16 column 37

 

I tried also with the Child Relationship Name: Vacantes_Aspirantes1 and Vacantes_Aspirantes1__r but I receive the same error. 

 

Thanks for any help..

 

Hi,

 

I have three custom objects: Aspirante__c, Vacante__c and Asignados__c. The Asignados__c object has a master-detail relationship with Aspirante__c and also has a master-detail relatonship with Vacante__c. I want quering from the Asignados__c object the name of Aspirante__c and the name of Vacante__c. I have the next query:

 

List<txmrecruitment__Aspirante__c> arbolvacs = [Select
   (Select Name From txmrecruitment__Vacante__c.Vacantes_Aspirantes1__r)
   From txmrecruitment__Asignados__c];

 

I am receiving the error:

Error: Compile Error: Didn't understand relationship 'txmrecruitment__Vacante__c' in field path. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names. at line 23 column 51

 

Thanks for any help!

Hi,

 

I'm new in salesforce and I installed a package and i have access for all my custom tabs under system administrator, but i can't acces to the tabs in standard user profile, I have my app visible for this profile and the custom tabs are in default on. I don't know what I'm doing wrong. It's got to be something simple.

 

Any help would be appreciated.

Hi,

 

   I have a requirement to upload images from Salesforce to Facebook using graph API. The user add the image and test message in Salesforce,  then using Facebook Graph API I have to  update them to Facebook. I am success full in posting text messages.

 

        I have tried different options to update images from Salesforce, but no hope.  Can anyone help me to

 post the images.

 

Thanks,

Riyas

 

hello

I am new in salesforce and I want to write a test class for a visual force page. I have created a test class but i have only 33% coverage.

 

I have a select option and i don't know how cover that part of code.

 

any help will be appreciated.

 

This is my page

 

<apex:page standardController="Aspirante__c" extensions="MultiSelectController">
     <apex:sectionHeader title="Estatus" />
     <apex:form >
     <apex:pageBlock title="Aspirante" mode="edit"> 
         <apex:outputText value="{!Aspirante__c.Estatus__c}" rendered="false"/>       
 
          <apex:pageBlockButtons location="both">
               <apex:commandButton value="Guardar" action="{!save}" />
               <apex:commandButton value="Cancelar" action="{!cancel}" />
          </apex:pageBlockButtons>
          <apex:pageMessages />       
           <apex:pageBlockSection title="Modificación de Estatus" columns="1">
                 <apex:pageBlockSectionItem >
                    <apex:outputLabel value="Estatus" for="cbxlevel1"/>
                    <apex:outputPanel styleClass="requiredInput" layout="block">
                    <apex:outputPanel styleClass="requiredBlock" layout="block"/>
                    <apex:selectList value="{!selectedLevel1}" id="cbxlevel1" size="1" required="false">
                        <apex:selectOptions value="{!level1items}"/>
                        <apex:actionSupport event="onchange" rerender="cbxlevel2"/>
                    </apex:selectList>
                    </apex:outputPanel>
                </apex:pageBlockSectionItem>
                 
          </apex:pageBlockSection>
 
     </apex:pageBlock>
     </apex:form>   
 
</apex:page>

 

 

VF Page

 

public with sharing class MultiSelectController {
 
    // reference for the standard controller
    private ApexPages.StandardController controller {get; set;}
 
    // the record that is being edited
    private Aspirante__c opp;
 
    // the values of the selected items
    public string selectedLevel1 {get; set;} 
 
    public List<selectOption> level1Items {
        
        get {List<selectOption> options = new List<selectOption>();
              
               if (opp.Estatus__c == Null)
               {               
                options.add(new SelectOption('New','New'));
                options.add(new SelectOption('Waiting','Waiting'));
                options.add(new SelectOption('Interview','Interview'));
                
               } 
               
               if (opp.Estatus__c=='New')
               {                
                options.add(new SelectOption('Waiting','Waiting'));
                options.add(new SelectOption('Interview','Interview'));
                 options.add(new SelectOption('rejected','rejected'));
               } 
              
               
               if (opp.Estatus__c=='Waiting')
               {                
                options.add(new SelectOption('Interview','Interview'));
                //options.add(new SelectOption('Waiting','Waiting'));
                options.add(new SelectOption('rejected','rejected'));
               } 
              
                            
              
        return options; 
        }
        set;
    }
 
 
    public MultiSelectController(ApexPages.StandardController controller) {
 
        //initialize the stanrdard controller
        this.controller = controller;
        // load the record
        this.opp = (Aspirante__c)controller.getRecord();
 
        // preselect the current values for the record
        selectedLevel1 = opp.Estatus__c;
     
 
    }          
 
    public PageReference save() {
 
        // set the selected values to the record before saving
        String respaldOpp;
        respaldOpp = opp.Estatus__c;
        opp.Estatus__c =selectedLevel1;
       
        try {
            update(opp);
        } catch(System.DMLException e) {
                       
            ApexPages.addMessages(e);
            return null;
        }
      
         PageReference opp= new ApexPages.StandardController(opp).view();
      opp.setRedirect(true);
      return opp;
         
    }        
 
}

 

Test Class

 

@isTest
public class MultiSelectControllerTest{
public static testMethod void MultiSelectControllerTest() {
       
    PageReference pageRef = Page.selectEstatus;
    Test.setCurrentPage(pageRef);     
                  
    Aspirante__c aspirante = new Aspirante__c(Name='Tests', CorreoElectronico__c='tst@mail.com', Estatus__c='New');
    insert aspirante;
        
    ApexPages.standardController controller = new ApexPages.standardController(aspirante);
             
    MultiSelectController pag = new MultiSelectController(controller); 
              
    pag.save();
    
}
}