• Arunkumar R
  • PRO
  • 3059 Points
  • Member since 2014


  • Chatter
    Feed
  • 100
    Best Answers
  • 21
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 429
    Replies
I have Contact and Opportunity. How we can display related opportunities based on contact id. Any query any code. Please suggest me. 
Thank you!
Good Morning All!

In my organization, we have created an Approval Process on a custom object (Job) which gets automatically submited to a specific role (GM) 50 days after "Contract Date."  The business has now requested that after 3 days, if the GM has not approved or declined the request, that it is automatically marked as approved.

Is there anyway to create an Apex Class or trigger with these requirements?  I was thinking to add a step to my Process Builder with that criteria to fire an Apex Class if the GM Approved and GM Declined date are both blank after 3 days of the approval process start date but not sure how to approve via that Apex Class.  I've found a lot of posts about submitting and then approving a request but having trouble locating anything about approving a pending request.

Thanks for any help!
Hi, 
I need help in passing opportunity id in the below soql query for Trigger. Am using this trigger to copy attachments from opportunity to Quote whenever the quote is created from opportunity. I have hard coded the record id and i need to how to get the record id in the query.

trigger CloneAtt on Quote (after insert) {    
    
    Attachment[] attList = [SELECT id, name, body, parentid
                              FROM Attachment 
                              WHERE ParentId = '0060K00000Ra3Ei'];

    
    Attachment[] insertAttList = new Attachment[]{};
    
    for(Attachment a: attList){
        Attachment att = new Attachment(name = a.name, body = a.body, parentid = Trigger.new[0].id);
        insertAttList.add(att);
    }
    
    if(insertAttList.size() > 0){
        insert insertAttList;
    }
}
Hi All,

In my apex code I need to check if an input string from CSV file is a valid number. It can be a integer or decimal value.
isNumeric only returns true if the input is integer but does not work for decimal.
Is there an easy way to determine if an input string from CSV file is a valid decimal or integer ?
 
String numeric = '1234567890';
system.debug(numeric.isNumeric());


String decimalPoint = '1.2';
system.debug(decimalPoint.isNumeric());

Logs Displays:

true
flase


 
Hi there, 

is it posssible to change the column width ?  


<apex:page controller="LeadPageControllerKontaktiert" tabStyle="Lead">
    <apex:pageBlock title="Meine Leads">
        <apex:pageBlockSection title="20 - kontaktiert">
           
            <apex:pageBlockTable value="{!leads}" var="l">
                <apex:column >
                    
                    <apex:facet name="header">Name</apex:facet>
                   
                    <apex:outputLink value="/{!l.Id}" target="_blank">
                        <apex:outputField value="{!l.company}"/>
                    </apex:outputLink>
                </apex:column>
                <apex:column value="{!l.name}" />
                <apex:column value="{!l.company}" />
                <apex:column value="{!l.Status}" />
                <apex:column value="{!l.Owner.name}" />                
                <apex:column value="{!l.Lead_Score__c}" />                  
                
                
            </apex:pageBlockTable>
        </apex:pageBlockSection>
    </apex:pageBlock>
</apex:page>
Hi All,
I have read about one of the Best Practices of Triggers is that : Writting the logic in Apex Class and Calling the class from trigger.
My Trigger :
trigger UpdateRiskStatus1 on Vendor_Risk__c (after insert)
{
    UpdateRiskStatusUtils.UpdateVendorRiskStatus(Trigger.New);
}

My Apex Class :
public class UpdateRiskStatusUtils
{
    public static void UpdateVendorRiskStatus(List<Vendor_Risk__c> fvr)
    {
      for (Vendor_Risk__c objvr :[select Id , Risk_Status__c from Vendor_Risk__c where id NOT IN : Trigger.new and Risk_Status__c = 'Current'])
     {
       objvr.Risk_Status__c = 'Previous';
       fvr.add(objvr); 
     } 
     update fvr;     
    }
    
}

But I am getting the below Error :
Error: Invalid Data. 
Review all error messages below to correct your data.
Apex trigger UpdateRiskStatus1 caused an unexpected exception, contact your administrator: UpdateRiskStatus1: execution of AfterInsert caused by: System.SObjectException: DML statement cannot operate on trigger.new or trigger.old: Class.UpdateRiskStatusUtils.UpdateVendorRiskStatus: line 10, column 1
Error is in this part :
     update fvr;

Please Help....

 
Hi All,

im trying to find the Offencive words in the sentence ,How can i write the Query for that.please helap me.


Thanks In Advance
G.kumar
Hi
I am trying to understand basics of external ID field with data loader.
In account, I have an external ID field as MyExt__C
In contact, I have an external ID field as SQL_Server_D__c.
I need to perform Upsert in data loader to insert 4 contact records with related acount name
Here is my structure of contact.csv.
FirstName	 LastName	  MyExtID__c
p1	                 p5	                  MyExt_3
p2	                 p6	                  MyExt_4
p3	                 p7	                  MyExt_5
p4	                 p8	                  MyExt_6

contacts are getting inserted but account name is not being populated.

Pls help me

Thanks
pooja
Hi ,
1) Iam New to development,now trying to create a detail record as a result based on after record inserted on its master object,but i am failing to do so
Client__c is master object and project__c is Child Object,

Trigger code:

trigger AutoProjects on Client__c (After insert) {
    List <Project__c> NewProjs= new List <Project__c> ();
        for(client__c Clnt:trigger.new){
            Project__c p=new project__c();
            p.Name=Clnt.Name+'Project';
            p.Start_date__c=date.today();
            p.Client_Type__c='Silver';
            p.Project.Id=Clnt.Id;
            NewProjs.add(p);
        }
        Insert NewProjs;
    }

2) I read that trigger.new does not work for after insert/update triggers but i have seen in many examples where trigger.new is used in after triggers,so wondering if trigger.new works or not for after events in any situation.

below example trigger for the reference that used trigger.new for After Insert event .

trigger AutoOpp on Account(after insert) {
  List<Opportunity> newOpps = new List<Opportunity>();
  for (Account acc : Trigger.new) {
    Opportunity opp = new Opportunity();
    opp.Name        = acc.Name + ' Opportunity';
    opp.StageName   = 'Prospecting';
    opp.CloseDate   = Date.today() + 90;
    opp.AccountId   = acc.Id; // Use the trigger record's ID
    newOpps.add(opp);
  }
  insert newOpps;
}

 
  • October 29, 2015
  • Like
  • 0
Can anybody help me... my test class does not showing 75% coverage. I write the class for trigger.
it does not cover line number 13, 14, 15 and 19. Can anybody please tell me where I am lacking.
MY trigger is----------

trigger TriggerOnLead on Lead (before insert, before update) 
{
    public List<lead_scoring_rule__c> obj=[Select active__c,rule_type__c,points__c, field_name__c,operator__c,value__c from lead_scoring_rule__c];
    public Map<String, Schema.SObjectType> leadMap = Schema.getGlobalDescribe();
    Schema.SObjectType leadSchema = leadMap.get('Lead');
    Map<String, Schema.SObjectField> leadfield = leadSchema.getDescribe().fields.getMap();
    for(lead l: trigger.new)
     {
          Double points=0;
          System.Debug('ttttttt');
       for(lead_scoring_rule__c ld:obj){
            System.Debug('lddddddddddd='    +    ld.field_name__c);
            System.Debug('fffffffffff='+l.get(ld.Field_Name__c));
            if(ld.active__c==true){
                if( l.get(ld.Field_Name__c)==ld.value__c){
                    points=points +ld.points__c;
                    System.Debug('Points Scored====='+ points);
                }
            }
            l.lead_score__c=points;
       }
     }
}
------------------------------------------------------------------------------------------------------------------------------------
And the test class is----




@isTest
private class TestTriggerOnLead {
    static testMethod void myUnitTest(){
        Lead_Scoring_Rule__c s=new lead_Scoring_Rule__c(Active__c=true, points__c=10,field_name__c='city',operator__c='==',value__c='Gurgaon');
        //List<lead> obj=new list<lead>();
            lead l=new lead(firstname='Test1',lastname='xyz',Company='Mansa', status='Not-Contacted',city='Gurgaon');
            insert l;
            insert s;
            lead ld=[select lead_score__c,city from lead where firstname='Test1' ];
            lead_scoring_rule__c nc=[select active__c, points__c,value__c from lead_scoring_rule__c where points__c=10]; 
            //System.Debug(ld.lead_score__c);
            if(nc.active__c==true){
                if(ld.city==nc.value__c){
                    ld.lead_score__c=nc.points__c;
                }
            }
            //System.assertEquals(l1.lead_Score__c,5);
            //System.assertEquals(l2.lead_Score__c,10);
    }
}

 
Hello,

When i click on "Here", I am not redirected to the google page.

<a href="https://www.google.fr/">Here</a>

However, when i copy the link address and paste and go in other window, it works.

Thanks for suggestions.
Hello,

How to send construct a XML request and display the response on a VF Page.
HTTP h = new HTTP();
HTTPRequest req = new HTTPRequest();
req.setEndpoint('https://servicesgateway.com/1/rest/searchByName');
Blob header = Blob.valueOf(UserId+ ':' + Password);
String authHeader = 'BASIC ' + EncodingUtil.base64Encode(header);
req.setHeader('Authorization', authHeader);
req.setMethod('GET');
HTTPResponse resp = req.send(req);
System.debug(res.getBody());

 
In VF Page, On click of a button, I need to show a pageblock section with id="wanttohidethispageblock", which has table content in it. 

By default, the pageblocksection appears due to obvious reason its not hidden. 

How can I hide this pageblock section with id="wanttohidethispageblock" on VF page onload. 

Thanks.

 
Hi, 

  Please help me to write a test class trigger for below code 
 
trigger roleCheck on User (before insert, before update){
    Set<String> roleNameSet=new Set<String>{'Finance Approver' , 'GHC Approver ' , 'Program Administrator'};
	Set<Id> userRoleIdSet=new Set<Id>();
	for(userRole useRol :[SELECT id  FROM UserRole  WHERE Name IN: roleNameSet]){
		userRoleIdSet.add(useRol.Id);
	}
	if(trigger.isInert){
		for(User usr : Trigger.new){
			if(userRoleIdSet.contains(usr.UserRoleId)){
				usr.adderror('Role Aleready Assigned, select new Role');
			}
		}
	}if(Trigger.isUpdate){
		for(User usr : Trigger.new){
			if(userRoleIdSet.contains(usr.UserRoleId) && usr.UserRoleId != Trigger.oldMap.get(usr.Id).UserRoleId ){
				usr.adderror('Role aleready assigned, select new Role');
			}
		}
	}
}


Thanks

Sudhir

I'm trying to write a trigger that will populate fields such as region, country, etc from the user who creates the record, i.e, the owner.
This is what I've gotten so far
trigger UpdateValonServiceAgmt on Apttus__APTS_Agreement__c (before insert, before update) {

Map<String, User> UserMap = new Map<String, User> ();
 for(User temp : [Select Id, Name from User])
 UserMap.put(temp.Name,temp);

List<User> userList = new List<User> ();  

for(Apttus__APTS_Agreement__c agmt: Trigger.new)
    {
     if(trigger.isBefore && trigger.isInsert)
     agmt.Business_Contact__c = UserMap.get(agmt.Owner).Id ;

    }
}

But I keep getting an error that says "Error: Compile Error: Incompatible key type Name for Map<Id,User> at line 12 column 33". Right now I'm trying to populate a field called Business Contact from the user record. Likewise, I have to fill out the region and country from the user record as well.

Please help out.

Thanks in Advance.
Hi,

I have a requirement where i need to write a batch class for which i need help n it

I have a custom object called "PS_TF_Status_Track__c"

I have 3 number fields in it called Hours__c, Minutes__c and days__c

i want to write a batch class which should calculate the milli seconds for all the 3 fields mentioned above and sum it up to a single custom field

Hours -> milli seconds
Minutes -> milli seconds
days -> milli seconds

the single custom field should sum up all the 3 milli seconds together

let me know hw to write it

Pls help me

Thanks in Advance
  • September 21, 2015
  • Like
  • 0
Hello
Pls let me know what is Trigger.IsExecuting and in what business scenarios can we use it.

Thanks
meenakshi​​​
Hello,
I want to use a global variable ($Site.Prefix) in an APEX controller class, inside a condition to determine which subdomain i'm using.
For example : 
urlPath = {!$Site.Prefix};
However, I'm getting : 
Error: Compile Error: unexpected token: '{' at line ...

Since I cannot use APEX tags in my APEX class, do you know any workaround ?

Thanks.

Hi,
I'm using Salesforce professional eddition and i'm hopeing to create a onclick button on my oppertunities layout which will direct me to a visual force page/url based on a field on the current oppertunities.

I had a quick look and there was a option under behaviour to select the visual force page, however this does not allow a if or case statement to navigate to the right visual force page based on a field/value.

After searching online i found some javascript code which had worked for someone else, however it does not appear to work for me and im wondering i'm making a school boy error.

The code is (field name's and visual force page name subsituted to example and examplefield)

var event = '{!EXAMPLEFIELD}';
if(event.length == 0){
     alert("No VisualForce page Exists, please contact your administrator");
}
else{

     window.location.href='/apex/EXAMPLE'
}
I was getting a error returned of "invalid token >"

I guess my question is where am i going wrong? Do i need to enable or call javascript librarys before my code? is this a limitation of my version of salesforce, or more likely a limitation of my knowlege?

Help would be very much appreciated.

Thanks
Phill
Hello,

1) I rename "Label" of Record type
2) I create change set and send it to Production

Will it change the record name for Old data ?

Like if i query, then will it rename the old records


Thanks
Hi Guys,
  1. Until the Spring 15 release, Maps and Sets are Unordered Collections. So the returned order will be random.
  2. But beginning from Summer 15 release onwards, Maps and Set order is predictable. The order will be same that what you put from the beginning to end.
Example:
Map<String, String> orderedMap = new Map<String, String>();
orderedMap.put('Good', 'This is so good');
orderedMap.put('Bad', 'This is so bad');
System.debug(orderedMap);

If you run the above code snippet in Developer console you will get the returned order as below,

Until Spring 15 Release:

{Bad=This is so bad, Good=This is so good}

From Summer 15 Release:

{Good=This is so good, Bad=This is so bad}

This changes is not the API level, this is Schema level change. If anyone relying on the Map or Set order in your codes, change it as soon. 

Thanks.
Hi Guys,

    Hope so many peoples integrated google map in visualforce page using the javascript. From Salesforce Spring'15 onwards, Map components are released. Some of the people may not aware about this.

Please find the below link it will helpful who don't know about this component..!

http://salesforcekings.blogspot.in/2015/03/of-us-already-known-about-thegoogle-map.html
Hi Guys,
  1. Until the Spring 15 release, Maps and Sets are Unordered Collections. So the returned order will be random.
  2. But beginning from Summer 15 release onwards, Maps and Set order is predictable. The order will be same that what you put from the beginning to end.
Example:
Map<String, String> orderedMap = new Map<String, String>();
orderedMap.put('Good', 'This is so good');
orderedMap.put('Bad', 'This is so bad');
System.debug(orderedMap);

If you run the above code snippet in Developer console you will get the returned order as below,

Until Spring 15 Release:

{Bad=This is so bad, Good=This is so good}

From Summer 15 Release:

{Good=This is so good, Bad=This is so bad}

This changes is not the API level, this is Schema level change. If anyone relying on the Map or Set order in your codes, change it as soon. 

Thanks.
Hi Guys,

    Hope so many peoples integrated google map in visualforce page using the javascript. From Salesforce Spring'15 onwards, Map components are released. Some of the people may not aware about this.

Please find the below link it will helpful who don't know about this component..!

http://salesforcekings.blogspot.in/2015/03/of-us-already-known-about-thegoogle-map.html
Hi All ,
it is showing Error missing ';' semicolon on every value.

String query = 'SELECT Id,FROM InContactData__C WHERE skill_name__c IN('DMU SDChat1';'DeSales_PhoneIn_AfterHours','DeSales_PhoneIn_BusinessHours','OurtageAlert','BigDeals','CH-Priority Line_PhoneIn','CH-Priority Line_PhoneIn'    ,'LMS_PhoneIn','LMSxfer_PhoneIn','AI ChatBOT Transfer','CIOApp_PhoneIn','BBH Sales_PhoneIn','EMER_PhoneIn','USPW_PhoneIn', 'LIM CollegeLMS(Fac)-PhoneIn','LipscombFA-PhoneIn','LipscombBO-PhoneIn','BridgewaterTTC_PhoneIn','CaliforniaCC-Chat','MoraineParkTC(ClsrEmr)-PhoneIn',    'Curry Emergency_PhoneIn','BridgewaterResNet_PhoneIn','LIM CollegeLMS(Stu)-PhoneIn','DMU LMS','MiddlesexCC-ClassroomEmergency', 'LipscombIT Emergency_PhoneIn','SouthDakota(Fac)-PhoneOut','Laboure_PhoneIn','LeMoyne-Owen College')';
Dear All,
I have the following Case Trigger wherein bulk I create an internal list of cases (from the Trigger.new) and an internal list of accounts for each case with their SalesDivision.  
However, I'm confused by the 'for' loop as I get the error messages:

Variable does not exist: Sales_Division__c
DML requires SObject or SObject list type: Map<Id,Account>

Any help? 
Thank you
GC
 
Set<String> setAcountId = new Set<String> ();
for(Case obj: Trigger.New){
	if(obj.AccountId != null){
		setAcountId.add(obj.AccountId);
	}
}
 
//For each Account, find the Sales Division
Map<Id,Account> accWithCaseSalesDiv = new Map<Id,Account>(
	[SELECT Id, Sales_Division__c, (SELECT Id FROM Cases) FROM Account WHERE Id IN : setAcountId 
   ]
);

    for (Map<Id,Account> obj:accWithCaseSalesDiv )  {
        if (String.isEmpty(obj.Sales_Division__c)) {
            obj.Sales_Division__c = 'Americas';
            update obj;
        }
    }   

Map<Id,BusinessHours> accBHID = new Map<Id,BusinessHours>(
	[SELECT Id, name, (SELECT Id FROM Cases) FROM BusinessHours WHERE Id IN : setAcountId 
   ]
);    
Hi,
I would like to write a trigger  to create two tasks when ever lead is created....

Regards,
Sucharitha.
I have Contact and Opportunity. How we can display related opportunities based on contact id. Any query any code. Please suggest me. 
Thank you!
Hi All,

I have a batch class. When I run the checkmarx report I am getting the Query:sharing issue. I states that:

All entry points to an app (Global or Controller classes) must use the 'with sharing' keyword. Classes without this keyword run without sharing if they are entry points to your code, or with the sharing policy of the caller. Do not omit the sharing declaration as this hides critical security information in side-effects that can change when code is refactored. Only declare classes as 'without sharing' if they are not entry points to your app and if they only modify objects whose security is managed by your code (such as wizard state, or fields in a site). It is a common misconception to believe that batch apex or async apex must run with the global keyword. This is not true, the only classes that must be global are those that expose webservices or are intended to be used by extension packages. All async apex should run as public in order to avoid creating privileged entry points to your app.

I need to remove this issue from the report. Also I have controllers declared as without sharing. How do I resolve this issue for batch classes and controllers defined with without sharing

Thanks,
Anuj
Good Morning All!

In my organization, we have created an Approval Process on a custom object (Job) which gets automatically submited to a specific role (GM) 50 days after "Contract Date."  The business has now requested that after 3 days, if the GM has not approved or declined the request, that it is automatically marked as approved.

Is there anyway to create an Apex Class or trigger with these requirements?  I was thinking to add a step to my Process Builder with that criteria to fire an Apex Class if the GM Approved and GM Declined date are both blank after 3 days of the approval process start date but not sure how to approve via that Apex Class.  I've found a lot of posts about submitting and then approving a request but having trouble locating anything about approving a pending request.

Thanks for any help!
Hi, 
I need help in passing opportunity id in the below soql query for Trigger. Am using this trigger to copy attachments from opportunity to Quote whenever the quote is created from opportunity. I have hard coded the record id and i need to how to get the record id in the query.

trigger CloneAtt on Quote (after insert) {    
    
    Attachment[] attList = [SELECT id, name, body, parentid
                              FROM Attachment 
                              WHERE ParentId = '0060K00000Ra3Ei'];

    
    Attachment[] insertAttList = new Attachment[]{};
    
    for(Attachment a: attList){
        Attachment att = new Attachment(name = a.name, body = a.body, parentid = Trigger.new[0].id);
        insertAttList.add(att);
    }
    
    if(insertAttList.size() > 0){
        insert insertAttList;
    }
}
Hi Experts,

I have an object ( say Account) and defined a self relationship Account object which is 1 parent Account can have multiple child Accounts.

Now I have to get the count of child objects  from  the related list and update the count in parent... how to do achieve this?

Appreciate your inputs...

 
  • March 14, 2018
  • Like
  • 0
Hi All,

I am iserting contact record in my class. I need to check if all the fields are updateble and then i will upsert the record. I have written the following code but it is not working. Kindly provide me solution.
 
if (Schema.sObjectType.Contact.isUpdateable()){
            	   	   contact.FirstName = firstname;
            	   	   contact.LastName = lastname;
            	   	   contact.Email = emailaddress;
            	   	   contact.Email_Alt_1__c = altemail1;
            	       contact.Email_Alt_2__c = altemail2;
            	       contact.MailingStreet = street;
            	       contact.MailingCity = city;
            	       contact.MailingPostalCode = postalCode;
            	       if (country == 'United States') {
            	           contact.MailingState = stateprovince;
            	       } else {
            	       	   contact.MailingState = '';
            	       }
            	       contact.MailingCountry = country;
            	       contact.Country__c = regioncountry;
            	       //contact.Audience__c = audience;
            	       contact.Cisco_com_Login__c = ciscocomlogin;
            	       contact.Testing_ID__c = testingid;
            	       contact.Cisco_ID_CSCO__c = ciscoid;
            	       contact.Area_Code__c = Integer.valueOf(areaCode.trim());
            	       contact.Country_Code__c = countryCode;
            	       contact.Phone = phonenumber;
            	       contact.Fax = faxPhone;
                       
            	       contact.HomePhone = homePhone;
            	       upsert contact;
                       }

 
Hello Everyone,

Is it Ok to have Schema statements inside for loop? Will it affect governor limits?

For ex, i want to have some statement like this
for(Employee emp : empList){
   String str = Schema.SObjectType.Employee__c.getRecordTypeInfosById().get(Employee__c.RecordTypeId).getName();
}

Thanks & Regards,
B Archana
Hi @all,
I hope someone can help me. I want to create a case ans assign a Id to a relationship.
In error I get -> StringException: Invalid id: 0013E00000iMZjNQAW
I convert a String to a Id with this code:
c.AccountId = Id.valueOf(newCatererId);
At this point I got the error.
newCatererId is a String with the Id.
I havre tried to convert it before I assign it to AccountId. It does not working too.

I hope someone can help me
Lisa
 
Hi guys,

I'm having troubles with this error when i try to do the following query inside a trigger. 

 public static Map<String, AggregateResult> getTotalDesembolsos(Set<Integer> setAnios, Set<Id> setEjecutivoIds) {
        System.debug('\n\n-=#=-\n>>>>>>>>>>   ' + 'CRM_DesembolsoTriggerHandler_cls - getTotalDesembolsos' + '   <<<<<<<<<<\n' +
                     'setAnios' + ': ' + setAnios + '\n' +
                     'setEjecutivoIds' + ': ' + setEjecutivoIds + '\n-=#=-\n');

        Map<String, AggregateResult> mapCantidadDesembolsos = new Map<String, AggregateResult>();

        for(AggregateResult objAggregateResultsDesembolsos : [SELECT CALENDAR_YEAR(CRM_FechaInicio__c)      Anio
                                                                    ,CRM_EjecutivoComercial__c              Ejecutivo
                                                                    ,COUNT(Id)                              Desembolsos
                                                                    ,COUNT_DISTINCT(CRM_Cliente__c)         Clientes
                                                                    ,SUM(CRM_DesembolsoTotalReexpresado__c) TotalDesembolsos
                                                                FROM CRM_Desembolso__c
                                                               WHERE CALENDAR_YEAR(CRM_FechaInicio__c)  IN: setAnios
                                                                 AND CRM_EjecutivoComercial__c          IN: setEjecutivoIds
                                                                 AND CRM_Cliente__c                     !=  NULL
                                                            GROUP BY CALENDAR_YEAR(CRM_FechaInicio__c)
                                                                    ,CRM_EjecutivoComercial__c
                                                            ORDER BY CALENDAR_YEAR(CRM_FechaInicio__c)
                                                                    ,CRM_EjecutivoComercial__c]) {
            System.debug('\n\n-=#=-\n' + 'objAggregateResultsDesembolsos' + ': ' + objAggregateResultsDesembolsos + '\n-=#=-\n');

            mapCantidadDesembolsos.put((Integer)objAggregateResultsDesembolsos.get('Anio') + '-' + (String)objAggregateResultsDesembolsos.get('Ejecutivo'), objAggregateResultsDesembolsos);
        }

I read someting about Custom Index but I don't know how request this custom index. If someone know something i will appreciate.

Thanks
I have created a POST REST API with class name as given below. 
global with sharing class RestReceiveBid {
  global static ReturnClass doPost(id invoiceId, id userId, double amount, boolean acceptPartialBid, id contactId) {
}
}
And I have created test class with following name.
private class Test_RestReceiveBid {
 static testMethod void testDoPost() {
   RestReceiveBid.doPost(invoiceID, funderID, amount, acceptPartialBid, contactID); >> line 48
}
}
I didn't get any error while running this test class and I have deployed the same to production as well. But after some time we have decided to delete the old classes and i am trying to delete class from eclipse IDE. But when I am trying to deploy the class I amgetting the following error for the test clas. 

Test_RestReceiveBid. line 48, column 5: Variable does not exist: RestReceiveBid.

Can anyone please point out what I am missing here? Also help on how we can delete the old Apex classes from production will be appreciated. 
 
Hi All,

In my apex code I need to check if an input string from CSV file is a valid number. It can be a integer or decimal value.
isNumeric only returns true if the input is integer but does not work for decimal.
Is there an easy way to determine if an input string from CSV file is a valid decimal or integer ?
 
String numeric = '1234567890';
system.debug(numeric.isNumeric());


String decimalPoint = '1.2';
system.debug(decimalPoint.isNumeric());

Logs Displays:

true
flase


 
I am fairly new to Salesforce developing and I just entered into the developers console to create a new apex trigger for cases to have an auto number only show up in a specific record type and I get this error message "Can not create Apex Trigger on an active organization." What does this mean and how can I proceed?
Hi there, 

is it posssible to change the column width ?  


<apex:page controller="LeadPageControllerKontaktiert" tabStyle="Lead">
    <apex:pageBlock title="Meine Leads">
        <apex:pageBlockSection title="20 - kontaktiert">
           
            <apex:pageBlockTable value="{!leads}" var="l">
                <apex:column >
                    
                    <apex:facet name="header">Name</apex:facet>
                   
                    <apex:outputLink value="/{!l.Id}" target="_blank">
                        <apex:outputField value="{!l.company}"/>
                    </apex:outputLink>
                </apex:column>
                <apex:column value="{!l.name}" />
                <apex:column value="{!l.company}" />
                <apex:column value="{!l.Status}" />
                <apex:column value="{!l.Owner.name}" />                
                <apex:column value="{!l.Lead_Score__c}" />                  
                
                
            </apex:pageBlockTable>
        </apex:pageBlockSection>
    </apex:pageBlock>
</apex:page>
 public void fun()
   {  
       list<Payment__c> pay=new list<Payment__c>();
       for(Payment__c nop:[select id,,npe01__Scheduled_Date__c, from Payment__c where Paid__c=true])
       {
           integer year=nop.npe01__Scheduled_Date__c.year();
           integer month=nop.npe01__Scheduled_Date__c.month();
         
     }

when i run this code in developer console in production it gives error:
System.NullPointerException: Attempt to de-reference a null object 
   on the highlighted part.
This is working fine in sandbox. Deployed without any problems.
Checked the query in query editor. It is returning records as expected.
What could be the problem here???
Any help is appreciated.
Thank you
I am wondering if it is possible to either change the standard save button or have an additional button that takes you back to the parent record.

We have a related list in cases that when we create a record we have to press the case number to go back to the case we are working on. It would be handy to press save and it saves the record and takes you back to the ticket.