• Royal
  • NEWBIE
  • 80 Points
  • Member since 2014

  • Chatter
    Feed
  • 1
    Best Answers
  • 4
    Likes Received
  • 0
    Likes Given
  • 55
    Questions
  • 29
    Replies
Greetings, Ive just started a few days ago with Apex by work as a junior developer at the moment, heres my issue:

This trigger needs to transfer Integer values from a custom Object called Encuesta__c(Survey__c) with its a custom object, to three custom fields (Num_Prom_Cobr__c,Num_Prom_Perp__c,Num_Prom_Sin__c) from Account after being fired.

Heres the trigger code called traspasoValoresListas (transferListValues):

trigger traspasoValoresListas on Encuesta__c (before insert , before update) {

Encuesta__c[] encu = Trigger.new;

Integer sin; /*These three Integers are to contain the upcoming values of APEX class called
Integer cob; ConvertirStringValores with functions that converts the values of a Seleccion list into Integers*/
Integer per;

for (Integer i=0;i<encu.size();i++)
{
     sin=ConvertirStringValores.convertirListasSiniestros(encu[i]);//Turns the value Selectionlist called Siniestros(Fires)(String) to Integer
     per=ConvertirStringValores.convertirListasPercepcion(encu[i]);//Turns the value Selectionlist called Percepcion(Perception)(String) to Integer
     cob=ConvertirStringValores.convertirListasCobranza(encu[i]);//Turns the value Selectionlist called Cobranza(Collections)(String) to Integer
    //All of these values coming from the Custom Object Encuesta__c assigned as encu;
}
//The code sadly goes downhill from here
Account a = [SELECT Num_Prom_Cobr__c,Num_Prom_Perp__c,Num_Prom_Sin__c
                   FROM Account];

a.Num_Prom_Cobr__c=cob;
a.Num_Prom_Perp__c=per;
a.Num_Prom_Sin__c=sin;

update a;
}

Any help is highly appreciated!
Felipe.
As per SF satanfard Delegate Approver can not reassign but as per  my requirement Delegate Approver also should have the reassign button,  how can do the customize for this.

could you please suggest me. Thanks
  • April 08, 2020
  • Like
  • 0
Hi,
i want one validation rule like, there two fields is there 
1. Start Date  2. End date,  when useer enter start today and end date should be with in next 90 days only , if end date user select more then 90 days of the start date will get error message.
can you please hel me.

Thanks
 
  • January 20, 2020
  • Like
  • 0
Hi,
 i have created recently Developer edition org, while creating workflow i can not see task creation in work flow action ?

previouly it is there,  any idea ?

thank
Royal
  • March 11, 2017
  • Like
  • 0
Hi,

I want to create a record by using flows, have two A,B objects B to A have lookup relation, so when i create a record in A same records should be create in B.

how can i do this whare are the elements have to use in flow ....can any one please help me here.


thanks in Advance.
  • September 27, 2016
  • Like
  • 0
Hi All,

List<Account> ids=[select id from Account];
Set<ID> setids= Set<ID>();
Set<ID> SetAAA= Set<ID>();
Set<ID> SetBBB= Set<ID>();
for(Account acc: ids){
setids.add(acc.id);
I have all account id's in set object, so now i hvae to filter those id's based on recordtype.
like records type AAA then add to setAAA or Recordtype BBB then Add to SetBBB.

how to do code ?.

 
  • August 08, 2016
  • Like
  • 0
HI,
I have requirments need to create new custom VF page with only controller no standaradController.

problem is i have to display data picker for start date and end date fields.

so i have used <apex:input type="date"   it is not working in IE, Mozilla browers
if use <apex:inputText value="{!caseStartDate}" size="10" id="caseStartDate" label="Start Date" onchange="caseDateValidates()" onclick="DatePicker.pickDate(false, this , false);" />    
 here onchange not working...


any other way to get date picker on VF page and pass the date values to controller based on onchange event ....

Thanks

 
  • July 14, 2016
  • Like
  • 0
<apex:input type="date" value="{!x_date}"/>  not working for IE, Mozilla browsers, any other way to get data picker on VF page ?
  • July 14, 2016
  • Like
  • 0
Hi All,

In custom VF page have to display date fields with date picker, how can i write code for this ?

there is no standard controller, on custom controller is there for page.

Thanks

 
  • July 11, 2016
  • Like
  • 0
how to convert string value into percentage in apex ?

 
  • July 09, 2016
  • Like
  • 0
HI,
i have CSV file in documents, that have to read from BATCH class then create Account..

1. how to read CSV from Documents ?
2. how to return query from start method ?

can any one give me sameple code for this.

Thanks in advance.

 
  • July 08, 2016
  • Like
  • 0
<apex:pageBlock id="PageBlock">      
                  
                  <apex:form >
<b>Type </b><apex:selectList id="selectlist" size="1">
                          <apex:selectOption itemValue="System Note" />
                          <apex:selectOption itemValue="Opportunty Note"/ >
                          <apex:selectOption itemValue="Case Note" />                          
                          <apex:selectOption itemValue="Case comment Note" />
                          <apex:actionSupport event="onchange" reRender="tableId" />                          
                          </apex:selectList>
 <apex:pageBlockTable value="{!DispalyValue}" var="var" id="tableId" >
                        <apex:column value="{!var.location}" headerValue="location" />
                        <apex:column value="{!var.name}" headerValue="name"/>
              </apex:form >
</apex:pageBlock>

if i select the picklist value pageblock table should be refresh, but not refereshing, what i did wrong here... any idea...

thanks in advance.
 
  • May 17, 2016
  • Like
  • 0
i have created one custom report, i am anable to run that report ..
whewe can go and run the custom report ?

thanks
 
  • March 08, 2016
  • Like
  • 0
whats is the use of {}, [] these to use in soql query, is there any specific use to use ?

can you pls explaine me with query exampls.


thanks in advance. 
  • March 08, 2016
  • Like
  • 0
how to create data in test class for custom setting, with out using SeeAllData=true.
custom setting name is: AllCodeValues__c,  and field name is : firstcode__c
when you click the manage button on customm settings values are like below...
Atmakur    0012
Kavali       0013
kaluvai     0014
like this values is there so how can create data for this in test class.


thanks in advance.
  • January 25, 2016
  • Like
  • 0
Hi,
I know test class how it will work in salesforce but i dont know why simple single with out any condition also lines are not covered ?
you can see first line is a simple line there is no any condition but it is showing red color why ?
n second if if conditon not sucess else should be execute right, but in red color why ?
how we can do execute this
 
 User-added image
  • January 12, 2016
  • Like
  • 0
can i schedule normal apex from schedule class ?

Thanks
 
  • January 11, 2016
  • Like
  • 0
HI,

sendEmail(); can alow single object and list of object so that means it can process single mail or more then one mail, then what is the specification os the MassEmailMeaage class and what is the limitation of the SingleEmailMassge class ?

can any one pls give the clarification.....

thanks in advance....
 
  • January 10, 2016
  • Like
  • 0
Hi All,

Am working on salesforce to salesforce, i stuck in sending  Notes/ Events can be transferred to destination org it showes forward succesfully in source but in destination organigation its lead appears empty ....all subscribed fields visibled expect notes/Events and activity history also 
some one please help to stuck point 
Thank you
  • June 13, 2014
  • Like
  • 1
what is use of  bellow links under the Job.

1.Scheduled Jobs
2.Apex Jobs
3.Background Jobs
4.Bulk Data Load Jobs

can any one explaine me exact use of these ?


Thanks
Siva


  • May 25, 2014
  • Like
  • 1
is salesforce opensource, if yes where can see the code ?

Thanks
Siva
  • May 25, 2014
  • Like
  • 1
when i created Apex class and Triggers along with meta data also creted, why it is created, how it can be usefull ?

Thnaks
Siva
  • May 19, 2014
  • Like
  • 1
Hi All,

In custom VF page have to display date fields with date picker, how can i write code for this ?

there is no standard controller, on custom controller is there for page.

Thanks

 
  • July 11, 2016
  • Like
  • 0
HI,
i have CSV file in documents, that have to read from BATCH class then create Account..

1. how to read CSV from Documents ?
2. how to return query from start method ?

can any one give me sameple code for this.

Thanks in advance.

 
  • July 08, 2016
  • Like
  • 0
Greetings, Ive just started a few days ago with Apex by work as a junior developer at the moment, heres my issue:

This trigger needs to transfer Integer values from a custom Object called Encuesta__c(Survey__c) with its a custom object, to three custom fields (Num_Prom_Cobr__c,Num_Prom_Perp__c,Num_Prom_Sin__c) from Account after being fired.

Heres the trigger code called traspasoValoresListas (transferListValues):

trigger traspasoValoresListas on Encuesta__c (before insert , before update) {

Encuesta__c[] encu = Trigger.new;

Integer sin; /*These three Integers are to contain the upcoming values of APEX class called
Integer cob; ConvertirStringValores with functions that converts the values of a Seleccion list into Integers*/
Integer per;

for (Integer i=0;i<encu.size();i++)
{
     sin=ConvertirStringValores.convertirListasSiniestros(encu[i]);//Turns the value Selectionlist called Siniestros(Fires)(String) to Integer
     per=ConvertirStringValores.convertirListasPercepcion(encu[i]);//Turns the value Selectionlist called Percepcion(Perception)(String) to Integer
     cob=ConvertirStringValores.convertirListasCobranza(encu[i]);//Turns the value Selectionlist called Cobranza(Collections)(String) to Integer
    //All of these values coming from the Custom Object Encuesta__c assigned as encu;
}
//The code sadly goes downhill from here
Account a = [SELECT Num_Prom_Cobr__c,Num_Prom_Perp__c,Num_Prom_Sin__c
                   FROM Account];

a.Num_Prom_Cobr__c=cob;
a.Num_Prom_Perp__c=per;
a.Num_Prom_Sin__c=sin;

update a;
}

Any help is highly appreciated!
Felipe.
<apex:pageBlock id="PageBlock">      
                  
                  <apex:form >
<b>Type </b><apex:selectList id="selectlist" size="1">
                          <apex:selectOption itemValue="System Note" />
                          <apex:selectOption itemValue="Opportunty Note"/ >
                          <apex:selectOption itemValue="Case Note" />                          
                          <apex:selectOption itemValue="Case comment Note" />
                          <apex:actionSupport event="onchange" reRender="tableId" />                          
                          </apex:selectList>
 <apex:pageBlockTable value="{!DispalyValue}" var="var" id="tableId" >
                        <apex:column value="{!var.location}" headerValue="location" />
                        <apex:column value="{!var.name}" headerValue="name"/>
              </apex:form >
</apex:pageBlock>

if i select the picklist value pageblock table should be refresh, but not refereshing, what i did wrong here... any idea...

thanks in advance.
 
  • May 17, 2016
  • Like
  • 0
whats is the use of {}, [] these to use in soql query, is there any specific use to use ?

can you pls explaine me with query exampls.


thanks in advance. 
  • March 08, 2016
  • Like
  • 0
can i schedule normal apex from schedule class ?

Thanks
 
  • January 11, 2016
  • Like
  • 0
by using CSS, need to display the field labels colour on detail page, is it possible, if yes how?

if know any one pls help me...

Thanks 
  • May 18, 2015
  • Like
  • 0
these two means same like isdelete= true  and ALL Rows , both are used for to get the records from recycle bin,

so my question is what is exact specific reason where eatc used ?

Thanks
  • May 15, 2015
  • Like
  • 0
In Trigger context variable only available after undelete, but not there before undelete,  want to know what is the reasion behind that ?

can you have knowledge on this pls help me ...

Thanks
 
  • May 15, 2015
  • Like
  • 0
How to write a query on Recycle bin ?
like want to know how many records is there in recycle bin ..


Thanks


 
  • May 15, 2015
  • Like
  • 0
what is exact scenario to demon work with @future annatation ?

Thanks
  • May 13, 2015
  • Like
  • 0