• Pankaj K
  • NEWBIE
  • 25 Points
  • Member since 2011

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 9
    Questions
  • 13
    Replies

I have a webservice that read a xml and then Insert the record in the saleforce while inserting reocrd it is throuhing this error "#myvalue is not valid for the type xsd:double". Any one can help why this error is keep coming.

 

Note: #my value is 23,84,172.87 in the xml.

Thanks in advance.

 

I am getting delivery failure for OutBound message 

System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.ArgumentNullException: Path cannot be Null

 

I have made an change in webservice and I deployed it on server after deploying delivery for OutBound Message is failing but when I replaced it with old code then it runs smoothly. But after sometime it also running with old code. I made a new virtual directory but then also it's not running.

 

Anyone Please it's Urgent me to solve this.

 

Path for my webservice is http://64.38.24.58/PROD_MDODelist/MDOEmailStatusNotificationService.asmx

if(trigger.isUpdate)
        {
            for(Lead_Contact_MDO_Mapping__c lcMap:trigger.new)
            {
                if(lcMap.Lead_Name__c != null)
                {
                    listMdoLead.add(lcMap);
                    mapLead.put(lcMap.Id, [select Id, PRG_Deduction_Amount__c, MDO_Price__c from Lead where Id =: lcMap.Lead_Name__c limit 1 ]);
                }
                if(lcMap.Contact_Name__c != null)
                {
                    listMdoContact.add(lcMap);
                    mapContact.put(lcMap.Id, [select Id, Total_MDO_Amount__c from Contact where Id =: lcMap.Contact_Name__c limit 1]);
                }
                mapMDO.put(lcMap.Id, [select Id, Quantity_In_Hand__c, MDO_Price__c, Unit_Assigned__c from MDO_Detail__c where Id =: lcMap.MDO_Name__c limit 1]);
            }

 

When I am trying to upload the trigger it is showing error that System.QueryException: List has no rows for assignment to SObject cause by this line

 

mapMDO.put(lcMap.Id, [select Id, Quantity_In_Hand__c, MDO_Price__c, Unit_Assigned__c from MDO_Detail__c where Id =: lcMap.MDO_Name__c limit 1]);

 

Can somebody tell me why am i getting this error? and how to resolve it?

Thanks in advance.:)

Thanks in advance..

 

Error: Invalid Data. 
Review all error messages below to correct your data.
Apex trigger Chk_Unique_Email caused an unexpected exception, contact your administrator: Chk_Unique_Email: execution of BeforeInsert caused by: System.NullPointerException: Attempt to de-reference a null object: Trigger.Chk_Unique_Email: line 62, column 9

 

I am getting this error when I'm trying to enter a new lead in Lead Object. Though it should give error that this email id already exist that what i have done in trigger but it's showing this error and strange thing is it's showing this error for a single user only, when trying to enter data for another user whos email id already exist it shows normal error. Can any one please explain me why.??

 

Do also tell me if i need any change in trigger..

trigger Chk_Unique_Email on Lead (before insert,before update) 
{
  Map<String, Lead> PrgEid = new Map<String, Lead>();
    for(Lead led:System.Trigger.new)
    {
        if((led.PRG_Employee_ID__c!=null) && (led.PRG_Employee_ID__c!=''))
        {
          if(Trigger.isInsert) 
            {
              String AccountID = led.PRG_Company__c;
              Account[] SalesForceAccunt = [Select Name from Account where ID=:AccountID];
              for(Account Acc:SalesForceAccunt)
              {
                String AccName = Acc.Name;
                AccName += ' ' + led.PRG_Employee_ID__c;
                PrgEid.put(AccName,led);
              }
             }
            if(Trigger.isUpdate)
            {
              if(led.PRG_Employee_ID__c != System.Trigger.oldMap.get(led.Id).PRG_Employee_ID__c)
                {
                  String AccountID = led.PRG_Company__c;
                Account[] SalesForceAccunt = [Select Name from Account where ID=:AccountID];
                for(Account Acc:SalesForceAccunt)
                {
                  String AccName = Acc.Name;
                  AccName += ' ' + led.PRG_Employee_ID__c;
                  PrgEid.put(AccName,led);
                }
              }
      }
        }
    }
    if(PrgEid.size()>0)
    {
      Lead[] ExistLead = [select ID, PRG_Company__c, PRG_Employee_ID__c, PRG_Unique_Identifier__c, Name from Lead where PRG_Unique_Identifier__c in : PrgEid.keySet() and IsConverted=false and IsDeleted=false limit 1000];
      if(ExistLead.size()>0)
      {
        for(Lead CheckLead:ExistLead)
        {
          Lead MapLead = PrgEid.get(CheckLead.PRG_Unique_Identifier__c);
          if(CheckLead.Id != MapLead.Id)
          {
            MapLead.PRG_Employee_ID__c.addError('Employee ID is exist for lead: <b><a href="/'+CheckLead.Id+'"/>'+CheckLead.Name+'</a></b>');
            break;
          }
        }
      }
      else
      {
        //For Sandbox
        //Contact[] ExistContact = [select ID, PRGUnique_Emp_ID__c, Name from Contact where PRGUnique_Emp_ID__c in : PrgEid.keySet() and IsDeleted=false and Rec_Typ__c='01270000000DVFp' limit 1000];
        //Contact[] ExistContact = [select ID, PRGUnique_Emp_ID__c, Name from Contact where PRGUnique_Emp_ID__c in : PrgEid.keySet() and IsDeleted=false and RecordTypeId='01270000000DVFpAAO' limit 1000];
        //For Production
        Contact[] ExistContact = [select ID, PRGUnique_Emp_ID__c, Name from Contact where PRGUnique_Emp_ID__c in : PrgEid.keySet() and IsDeleted=false and RecordTypeId='01270000000DVFpAAO' limit 1000];
        if(ExistContact.size()>0)
        {
          for(Contact CheckContact:ExistContact)
          {
            Lead MapLeadContact = PrgEid.get(CheckContact.PRGUnique_Emp_ID__c);
            MapLeadContact.PRG_Employee_ID__c.addError('Employee ID is exist for Contact: <b><a href="/'+CheckContact.Id+'"/>'+CheckContact.Name+'</a></b>');
            break; 
          }
        }
      } 
    }
}

 


HI..

 

Thanks in advance..

 

In a outbound message I am passing an Active__c value that contains true or false. I am putting if condition on this field for checking it contains true or false.

For if(!Active__c) code runs properly but if it's value become true the line of code written in the if(Active__c) is not running.

 

Is there anything that i am doing wrong...??

 

Please reply i need to solve this problem urgently..

Hi,

 

Thanks in advance..

I getting error when i am checking syntax in Formula "Error: Function PRIORVALUE may not be used in this type of formula"

 

My Formula is 

 

AND
(
	AND
	( OR
		( AND
			( 	 ISPICKVAL(Email_Verification_Status__c, "Verification Failed"),
				(ISPICKVAL( PRIORVALUE(Email_Verification_Status__c) , "Primary Email Verification"))
			), 
		  AND	
			(
				ISPICKVAL(Email_Verification_Status__c, "Verification Failed"),
				(ISPICKVAL( PRIORVALUE(Email_Verification_Status__c) , "Secondary Email Verification"))
			)
		),
		Active__c  = "True"
	),
	RecordType = "PRG Employee"
)

 HIstory Tracking is enabled for the Email_Verification_Status__c.

 

Anyone please can tell how to resolve it or correct the formula.

 

I am getting "(503)Service Unavailable" when I am checking outbound Message Delivery Status.

My end point URL is for a local machine web service and it is running on my local machine. So I am not able to understand what should I do. I have also restarted the Web Service in IIS.

 

Can anybody please tell what should I do to shortout this..?? 

 

 

Hi 

 

Can we write url of an aspx page in EndPoint Url when we are creating Out Bound Message. 

I want to get sfdc url in outbound message so that I can use it to retrieve data from the object by firing soql. 

Is there any way to get it.?? Pls reply I need it urgently..

I have a webservice that read a xml and then Insert the record in the saleforce while inserting reocrd it is throuhing this error "#myvalue is not valid for the type xsd:double". Any one can help why this error is keep coming.

 

Note: #my value is 23,84,172.87 in the xml.

Thanks in advance.

 

I am getting delivery failure for OutBound message 

System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.ArgumentNullException: Path cannot be Null

 

I have made an change in webservice and I deployed it on server after deploying delivery for OutBound Message is failing but when I replaced it with old code then it runs smoothly. But after sometime it also running with old code. I made a new virtual directory but then also it's not running.

 

Anyone Please it's Urgent me to solve this.

 

Path for my webservice is http://64.38.24.58/PROD_MDODelist/MDOEmailStatusNotificationService.asmx

Thanks in advance..

 

Error: Invalid Data. 
Review all error messages below to correct your data.
Apex trigger Chk_Unique_Email caused an unexpected exception, contact your administrator: Chk_Unique_Email: execution of BeforeInsert caused by: System.NullPointerException: Attempt to de-reference a null object: Trigger.Chk_Unique_Email: line 62, column 9

 

I am getting this error when I'm trying to enter a new lead in Lead Object. Though it should give error that this email id already exist that what i have done in trigger but it's showing this error and strange thing is it's showing this error for a single user only, when trying to enter data for another user whos email id already exist it shows normal error. Can any one please explain me why.??

 

Do also tell me if i need any change in trigger..

trigger Chk_Unique_Email on Lead (before insert,before update) 
{
  Map<String, Lead> PrgEid = new Map<String, Lead>();
    for(Lead led:System.Trigger.new)
    {
        if((led.PRG_Employee_ID__c!=null) && (led.PRG_Employee_ID__c!=''))
        {
          if(Trigger.isInsert) 
            {
              String AccountID = led.PRG_Company__c;
              Account[] SalesForceAccunt = [Select Name from Account where ID=:AccountID];
              for(Account Acc:SalesForceAccunt)
              {
                String AccName = Acc.Name;
                AccName += ' ' + led.PRG_Employee_ID__c;
                PrgEid.put(AccName,led);
              }
             }
            if(Trigger.isUpdate)
            {
              if(led.PRG_Employee_ID__c != System.Trigger.oldMap.get(led.Id).PRG_Employee_ID__c)
                {
                  String AccountID = led.PRG_Company__c;
                Account[] SalesForceAccunt = [Select Name from Account where ID=:AccountID];
                for(Account Acc:SalesForceAccunt)
                {
                  String AccName = Acc.Name;
                  AccName += ' ' + led.PRG_Employee_ID__c;
                  PrgEid.put(AccName,led);
                }
              }
      }
        }
    }
    if(PrgEid.size()>0)
    {
      Lead[] ExistLead = [select ID, PRG_Company__c, PRG_Employee_ID__c, PRG_Unique_Identifier__c, Name from Lead where PRG_Unique_Identifier__c in : PrgEid.keySet() and IsConverted=false and IsDeleted=false limit 1000];
      if(ExistLead.size()>0)
      {
        for(Lead CheckLead:ExistLead)
        {
          Lead MapLead = PrgEid.get(CheckLead.PRG_Unique_Identifier__c);
          if(CheckLead.Id != MapLead.Id)
          {
            MapLead.PRG_Employee_ID__c.addError('Employee ID is exist for lead: <b><a href="/'+CheckLead.Id+'"/>'+CheckLead.Name+'</a></b>');
            break;
          }
        }
      }
      else
      {
        //For Sandbox
        //Contact[] ExistContact = [select ID, PRGUnique_Emp_ID__c, Name from Contact where PRGUnique_Emp_ID__c in : PrgEid.keySet() and IsDeleted=false and Rec_Typ__c='01270000000DVFp' limit 1000];
        //Contact[] ExistContact = [select ID, PRGUnique_Emp_ID__c, Name from Contact where PRGUnique_Emp_ID__c in : PrgEid.keySet() and IsDeleted=false and RecordTypeId='01270000000DVFpAAO' limit 1000];
        //For Production
        Contact[] ExistContact = [select ID, PRGUnique_Emp_ID__c, Name from Contact where PRGUnique_Emp_ID__c in : PrgEid.keySet() and IsDeleted=false and RecordTypeId='01270000000DVFpAAO' limit 1000];
        if(ExistContact.size()>0)
        {
          for(Contact CheckContact:ExistContact)
          {
            Lead MapLeadContact = PrgEid.get(CheckContact.PRGUnique_Emp_ID__c);
            MapLeadContact.PRG_Employee_ID__c.addError('Employee ID is exist for Contact: <b><a href="/'+CheckContact.Id+'"/>'+CheckContact.Name+'</a></b>');
            break; 
          }
        }
      } 
    }
}

 


HI..

 

Thanks in advance..

 

In a outbound message I am passing an Active__c value that contains true or false. I am putting if condition on this field for checking it contains true or false.

For if(!Active__c) code runs properly but if it's value become true the line of code written in the if(Active__c) is not running.

 

Is there anything that i am doing wrong...??

 

Please reply i need to solve this problem urgently..

Hi,

 

Thanks in advance..

I getting error when i am checking syntax in Formula "Error: Function PRIORVALUE may not be used in this type of formula"

 

My Formula is 

 

AND
(
	AND
	( OR
		( AND
			( 	 ISPICKVAL(Email_Verification_Status__c, "Verification Failed"),
				(ISPICKVAL( PRIORVALUE(Email_Verification_Status__c) , "Primary Email Verification"))
			), 
		  AND	
			(
				ISPICKVAL(Email_Verification_Status__c, "Verification Failed"),
				(ISPICKVAL( PRIORVALUE(Email_Verification_Status__c) , "Secondary Email Verification"))
			)
		),
		Active__c  = "True"
	),
	RecordType = "PRG Employee"
)

 HIstory Tracking is enabled for the Email_Verification_Status__c.

 

Anyone please can tell how to resolve it or correct the formula.

 

I am getting "(503)Service Unavailable" when I am checking outbound Message Delivery Status.

My end point URL is for a local machine web service and it is running on my local machine. So I am not able to understand what should I do. I have also restarted the Web Service in IIS.

 

Can anybody please tell what should I do to shortout this..?? 

 

 

I want to get sfdc url in outbound message so that I can use it to retrieve data from the object by firing soql. 

Is there any way to get it.?? Pls reply I need it urgently..

Hello All,

I have a trigger that is a bulk update. Sometimes the same object will make it into my update list more than once, which causes the error

 

UpdateParticipationTrigger: execution of AfterInsert caused by: System.ListException: Duplicate id in list: SomeSalesforceIDHere

 

 My list is built using

 

 

Set<Id> ConIds = new Set<Id> {}; for (Payments__c p : payments) { ConIds.add( p.Contact__c ); }

 

 How can I prevent duplicates from making it into that list, and hence causing errors? I am sure it is very simple to do (basically look in the list to see if the ID we are about to add is already in there, if so, don't add it). Let me know. Thanks!