• Anand Singh
  • NEWBIE
  • 195 Points
  • Member since 2006
  • TD Ameritrade

  • Chatter
    Feed
  • 3
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 24
    Replies

Hi,

 

I am finding accumulated sum in some objects.My logic is worked in some objects.In some other objects the following error is raising.

 

Review all error messages below to correct your data.
Apex trigger chiranjeevi.mbltotal caused an unexpected exception, contact your administrator: chiranjeevi.mbltotal: execution of BeforeInsert caused by: System.NullPointerException: Attempt to de-reference a null object: Trigger.chiranjeevi.mbltotal: line 10, column 15

 

my code is as follows:

 

trigger mbltotal on chiranjeevi__Sea_Foot_Note__c (before insert,before update) {
Double objBtotal = 0;
List<chiranjeevi__Master_Bill_Of_Ladding__c> objAlist=new List<chiranjeevi__Master_Bill_Of_Ladding__c>();
for(chiranjeevi__Sea_Foot_Note__c b : Trigger.new)
objAlist=[SELECT chiranjeevi__Console_charges__c,chiranjeevi__SFN_no__c FROM chiranjeevi__Master_Bill_Of_Ladding__c Where chiranjeevi__SFN_no__c =: b.Id];
for (chiranjeevi__Sea_Foot_Note__c objA : Trigger.new)
{
for (chiranjeevi__Master_Bill_Of_Ladding__c objB : objAlist)

 objBtotal += objB.chiranjeevi__Console_charges__c;
   objA.chiranjeevi__Total_service_charges__c=objBtotal;

}    
}


If any one find out the solution plz help me.

 

Thanks in advance,

Anu..

 

 Hi all,

 

I have above text filed on my Visualforce page as below:

 

<apex:panelgroup >

<apex:panelgrid columns="3" border="0">

<apex:outputText value="Note" id="cNote"/> :<apex:inputField value="{!OppSearch.Note__c}" required="false"/>

</apex:panelgrid>

</apex:panelgroup>

---

 

By default, the box is only 4-5 line high. I am just wondering if there is a way to increase the size of the box somehow please?

 

Many thanks 

  • February 11, 2010
  • Like
  • 0
Hi,
 
S-control is used to create Case record.
Requirement: need to assign case record using active Assignment rule.
 
How can I specify the assignmentRule Id in AssignmentRule header of sforce object?
 
Api Details: 11.1
 
~~~~~~~~~~~~~~~~~~~~~
Following code doesnot work:

sforce.connection.AssignmentRuleHeader.useDefaultRule = true;
sforce.connection.AssignmentRuleHeader.useDefaultRule = 'true';
sforce.connection.AssignmentRuleHeader.useDefaultRule = "true";

sforce.connection.AssignmentRuleHeader.assignmentRuleId ='09W70000000AeeU';
sforce.connection.AssignmentRuleHeader.assignmentRuleId ="09W70000000AeeU";
sforce.connection.assignmentRuleId ="09W70000000AeeU";

Need help on this.

Thanks in advance,
Anand



Message Edited by Anand Singh on 03-20-2008 06:13 PM

Message Edited by Anand Singh on 03-24-2008 11:44 AM

Hi,

I'm having this issue when I click on "New Note" Button: The button is not working.
User-added image

<apex:relatedList list="AttachedContentNotes"/>

Any clue? 

I can add notes without using my visualforce page, using the defalut layout.

Thanks,

Pablo G.

I'm following the example shown on Peter Knolle's post here: https://developer.salesforce.com/blogs/developer-relations/2015/03/lightning-component-framework-custom-events.html

When creating the contactSearch Component, I'm getting the following error:

"Failed to save undefined: No CONTROLLER named apex://mynamespace.ContactSearchController found: Source"

I'm not sure what I've missing - any thoughts?
Why the Duplicate Record Items Trigger can't be run while Duplicate Lead is Created?

Hi,

 

Can you plaese give me an example or suggestion to Read Ms word (.doc/.docx)file through Apex.

  • October 25, 2013
  • Like
  • 1

Hi,

 

In my appliction two objects are there.

SeafootNote:Any Refund(checkbox),SFN Number(text)

Refund:Refund Amount(Input Field(Number)),

           SFN Number(lookup filed)which is looking over to SFN Number in SeafootNote

 

If i enter the  value in SFN Number and Refund amount in Refund object i want to make true in the Any refund field of correspondingSFN Number record in SeaFootNote object.But my trigger is not working properly.If i enter the new record in SeaFootNote ,though i didnt select the checkbox in Any Refund input field after saving the record Any Refund field is checked.

 

Plz tell me where i am going wrong in my code.

 

My code is as follows:

trigger refund on chiranjeevi__Sea_Foot_Note__c (before insert,before update) {

 List<chiranjeevi__Refund__c> refundlist=new List<chiranjeevi__Refund__c>();
 for (chiranjeevi__Sea_Foot_Note__c a : Trigger.new)
 refundlist=[SELECT  chiranjeevi__Refund_Amount__c from chiranjeevi__Refund__c where chiranjeevi__SFN_Number__c=:a.chiranjeevi__SFN_number__c];
 if(refundlist<>null)
 {
  for (chiranjeevi__Sea_Foot_Note__c a : Trigger.new)
  a.chiranjeevi__Any_refund__c=true;
 }
 }
 Thanks in advance,

 Anu..

Hi,

 

I am finding accumulated sum in some objects.My logic is worked in some objects.In some other objects the following error is raising.

 

Review all error messages below to correct your data.
Apex trigger chiranjeevi.mbltotal caused an unexpected exception, contact your administrator: chiranjeevi.mbltotal: execution of BeforeInsert caused by: System.NullPointerException: Attempt to de-reference a null object: Trigger.chiranjeevi.mbltotal: line 10, column 15

 

my code is as follows:

 

trigger mbltotal on chiranjeevi__Sea_Foot_Note__c (before insert,before update) {
Double objBtotal = 0;
List<chiranjeevi__Master_Bill_Of_Ladding__c> objAlist=new List<chiranjeevi__Master_Bill_Of_Ladding__c>();
for(chiranjeevi__Sea_Foot_Note__c b : Trigger.new)
objAlist=[SELECT chiranjeevi__Console_charges__c,chiranjeevi__SFN_no__c FROM chiranjeevi__Master_Bill_Of_Ladding__c Where chiranjeevi__SFN_no__c =: b.Id];
for (chiranjeevi__Sea_Foot_Note__c objA : Trigger.new)
{
for (chiranjeevi__Master_Bill_Of_Ladding__c objB : objAlist)

 objBtotal += objB.chiranjeevi__Console_charges__c;
   objA.chiranjeevi__Total_service_charges__c=objBtotal;

}    
}


If any one find out the solution plz help me.

 

Thanks in advance,

Anu..

 

 Hi all,

 

I have above text filed on my Visualforce page as below:

 

<apex:panelgroup >

<apex:panelgrid columns="3" border="0">

<apex:outputText value="Note" id="cNote"/> :<apex:inputField value="{!OppSearch.Note__c}" required="false"/>

</apex:panelgrid>

</apex:panelgroup>

---

 

By default, the box is only 4-5 line high. I am just wondering if there is a way to increase the size of the box somehow please?

 

Many thanks 

  • February 11, 2010
  • Like
  • 0

Here is a small sample of my code.  In the line that is commented out for the AddError (used for debugging) I am asking for the ID of the newFulfillment record I just added.  How do I get the ID?

 

 

                                   List<productProcesses__c> processes = [SELECT Name, predecessorStep__c, processStep__c, successorStep__c, workStepName__c FROM productProcesses__c];
                                   //for each one add to fulfillment and fulfillmentDependencies
                                   for (productProcesses__c pp: processes) {
                                       List<fulfillment__c> newFulfillment = new List<fulfillment__c>();
                                       List<fulfillmentDependencies__c> newDependencies = new List<fulfillmentDependencies__c>();
                                       if (pp.predecessorStep__c == 0) {
                                           newStatus = 'current';
                                       } else {
                                           newStatus = 'waiting';
                                       }
                                       newFulfillment.add( new fulfillment__c (Opportunity__c = o.Id , Status__c = newStatus, workStepName__c = pp.workStepName__c));
                                       try {
                                            insert newfulfillment;
                                            //o.AddError('ID: ' + newfulfillment.Id);
                                       }
                                       catch (DmlException de) {
                                           for (Integer I = 0; I < de.getNumDml(); i++) {
                                                o.addError(de.getDmlMessage(i));
                                           }
                                       }

Hi,

 

I want to retrive Id from page url in javascript instead of apex class.

 

I know we can do it in apex like  

System.currentPagereference().getParameters().get('id');

 

How we can achive in ajax toolkit javascript?

 

Thanks

 

Hi,

 

I want to retrive Id from page url in javascript instead of apex class.

 

I know we can do it in apex like  

System.currentPagereference().getParameters().get('id');

 

How we can achive in ajax toolkit javascript?

 

Thanks

Hi all,

 

I'm trying to create a workflow rule to use to send an email alert whenever an task is created that is related to a Contact with a particular contact record type.

 

I've run into 2 snags in doing this.

1) I can't figure out how to reference the contact record type in the workflow rule criteria formula.

2) when creating a template email (for my notification email I want to have sent), activity fields don't seem to be available as merge field.

 

I'm hoping someone here may have figured out how to solve the first problem or can at least definitively say it can't be done (if not, any work around suggestions?). Any knowledge on the second, though it doesn't pertain to the board's topic area, is appreciated too!

 

Many thanks!

 

Marisol Thomer

Outreach Director

Progressive States Network

I receive following error on click of a custom button

 

missing;before statement

 

 

the custom button is created for creating a task automatically using the foll Javascript code:

 

{!REQUIRESCRIPT("("/soap/ajax/17.0/connection.js")} var t1= new sforce.SObject("Task"); t1.Assigned To = "r1free@fantailtech.com"; t1.Subject = "ABC283"; t1.Name = "abcd"; t1.Status = "Not Started"; t1.Priority = "Normal";result = sforce.connection.create([t1]);

I'm recreating a detail page and I'm trying to add some related lists that are currently displayed on the existing page.  I'm unable to figure out what the list names are supposed to be though.  The names that are used in the pagelayout editor are not working.  Some example list are "Notes & Attachments", "Approval History", and "Activity History".  How do you find out the names to use in visual force for related lists?
Hi,
 
S-control is used to create Case record.
Requirement: need to assign case record using active Assignment rule.
 
How can I specify the assignmentRule Id in AssignmentRule header of sforce object?
 
Api Details: 11.1
 
~~~~~~~~~~~~~~~~~~~~~
Following code doesnot work:

sforce.connection.AssignmentRuleHeader.useDefaultRule = true;
sforce.connection.AssignmentRuleHeader.useDefaultRule = 'true';
sforce.connection.AssignmentRuleHeader.useDefaultRule = "true";

sforce.connection.AssignmentRuleHeader.assignmentRuleId ='09W70000000AeeU';
sforce.connection.AssignmentRuleHeader.assignmentRuleId ="09W70000000AeeU";
sforce.connection.assignmentRuleId ="09W70000000AeeU";

Need help on this.

Thanks in advance,
Anand



Message Edited by Anand Singh on 03-20-2008 06:13 PM

Message Edited by Anand Singh on 03-24-2008 11:44 AM
Our app provides query functionality against the Lead and Contact objects, similar to the "Create a new view" mechanism in salesforce.com. We are looking for a way to include an operator for "does not contain" but it appears that the API documentation does not provide information to make this happen.

Does anyone know of a way to handle this, short of pulling all data first and then excluding everyone that falls into the "contains" collection?
  • November 16, 2005
  • Like
  • 0