• Chris42
  • NEWBIE
  • 0 Points
  • Member since 2010

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

 I'm seeing this in the logs...As an example, I've got a piece of custom code that I've been hired to look at. It  is a trigger and some classes. Every morning (early in the morning), this code generates hundreds of errors and if I look at the user, it is one that doesn't seem to exist in the system.

 

Here is an example of the username:

 

Org Id: 00dz00000008ZBhiAM

Username: 023i0000000l6Qwiak@00dz00000008ZBhiAM

 

The error is that this user doesn't have access to one of the custom objects used by the trigger/classes. My main question though is do you all know of any background processes in general that create/run under temp users.  I've seen this in a number of other customer sites but never really paid much attention to it. Now it really has me curious...

Here is what I am trying to do:

 

I want to allow the user to insert a new lead, catch the insert with a trigger, go into an apex class, block the insert based on some criteria we have internally and then take them to a related lead.

 

Thanks for any help you can provide.

  • September 02, 2010
  • Like
  • 0

All,

 

I have gone through every posting I could find on this and I am not finding something that matches what I'm trying to do. Basically I am trying to look at the leads/accounting being inserted and then launch a modal dialog box with some additional information. I don't want to do a Javascript alert box  because I want it to look/feel like it is part of the normal workflow.

 

Maybe it is my approach that is flawed? Here is how I want it to work:

 

1) User clicks the save button

2) On Insert lead trigger fires

3) Modal dialog box comes up with similar leads/accounts warning the user that they may actually be looking for one of those. At that point, I have blocked the insert from happening.

4) They close the modal dialog box by either selecting one of the other leads/accounts I am showing them or clicking a button that says close.

 

Outside of Salesforce I would just create a hidden div and use style sheets to create a nice slick looking dialog box or use Yahoo YUI. In the docs, someone hints at an s-control for this purpose but I am reading that I can't use s-controls anymore.

 

Any ideas? Thanks for your help!

  • September 02, 2010
  • Like
  • 0

 I'm seeing this in the logs...As an example, I've got a piece of custom code that I've been hired to look at. It  is a trigger and some classes. Every morning (early in the morning), this code generates hundreds of errors and if I look at the user, it is one that doesn't seem to exist in the system.

 

Here is an example of the username:

 

Org Id: 00dz00000008ZBhiAM

Username: 023i0000000l6Qwiak@00dz00000008ZBhiAM

 

The error is that this user doesn't have access to one of the custom objects used by the trigger/classes. My main question though is do you all know of any background processes in general that create/run under temp users.  I've seen this in a number of other customer sites but never really paid much attention to it. Now it really has me curious...

select id,name from account where id ='xyz'

 

The above query gives one result in eclipse, but when i run the same query in developer console query editor it results with 0 rows even thought the record exists.

 

 

the following Apex code shows how an account and a contact can be associated with one another, and then how the contact can be used to modify a field on the account: Account a = new Account(Name = 'Acme'); insert a; // Inserting the record automatically assigns a // value to its ID field Contact c = new Contact(LastName = 'Weissman'); c.AccountId = a.Id; // The new contact now points at the new account insert c; // A SOQL query accesses data for the inserted contact, // including a populated c.account field c = [SELECT Account.Name FROM Contact WHERE Id = :c.Id]; // Now fields in both records can be changed through the contact c.Account.Name = 'salesforce.com'; c.LastName = 'Roth'; // To update the database, the two types of records must be // updated separately update c; // This only changes the contact's last name update c.Account; // This updates the account name The question is how to implement this code.i am trying to implement this in trigger class but iam not able to do so.tell me where to write this code and how to execute.

I have a issue that system Api / Integration changed the account owner to another owner . when does this happen . what would be the reason.

Hi , 

 

I am trying to cover this code but I am not able to cover it even though I satisfy all the conditions. 

 

if(app1.Candidate_Type__c == 'Teacher' && app1.EnrollmentrxRx__Applicant__r.Certification_State__c=='Texas'){
if(app1.Access_Fee_Paid__c){
feeAmountStatement = 'There is no payment due.';
feeAmount = 0.00;
feeAmount=feeAmount.setScale(2, System.RoundingMode.UNNECESSARY);
}else{
if(app1.Application_Fee_Paid__c && app1.EnrollmentrxRx__Admissions_Status__c == 'Accepted'){
feeAmountStatement = 'Please pay the required $375.00 fee to process your application. The application fee is a non-refundable processing charge and is not applicable to any future bill.';
feeAmount = 375.00;
feeAmount=feeAmount.setScale(2, System.RoundingMode.UNNECESSARY);

}else if(app1.EnrollmentrxRx__Admissions_Status__c == 'Application Started'){
feeAmountStatement = 'Please pay the required $50.00 fee to process your application. The application fee is a non-refundable processing charge and is not applicable to any future bill.';
feeAmount = 50.00;
feeAmount=feeAmount.setScale(2, System.RoundingMode.UNNECESSARY);
}
}
}else if(app1.Candidate_Type__c == 'Teacher' && app1.EnrollmentrxRx__Applicant__r.Certification_State__c=='Louisiana'){
if(app1.Access_Fee_Paid__c){
feeAmountStatement = 'There is no payment due.';
feeAmount = 0.00;
feeAmount=feeAmount.setScale(2, System.RoundingMode.UNNECESSARY);
}else{
if(app1.Application_Fee_Paid__c && app1.EnrollmentrxRx__Admissions_Status__c == 'Accepted'){
feeAmountStatement = 'Please pay the required $375.00 fee to process your application. The application fee is a non-refundable processing charge and is not applicable to any future bill.';
feeAmount = 400.00;
feeAmount=feeAmount.setScale(2, System.RoundingMode.UNNECESSARY);

}else if(app.EnrollmentrxRx__Admissions_Status__c == 'Application Started'){
feeAmountStatement = 'Please pay the required $50.00 fee to process your application. The application fee is a non-refundable processing charge and is not applicable to any future bill.';
feeAmount = 50.00;
feeAmount=feeAmount.setScale(2, System.RoundingMode.UNNECESSARY);
}
}
}else if(app1.Candidate_Type__c == 'Principal'){
if(app1.Access_Fee_Paid__c){
feeAmountStatement = 'There is no payment due.';
feeAmount = 0.00;
feeAmount=feeAmount.setScale(2, System.RoundingMode.UNNECESSARY);
}else {
if(app1.Application_Fee_Paid__c && app1.EnrollmentrxRx__Admissions_Status__c == 'Accepted'){
feeAmountStatement = 'Please pay the required $425.00 fee to process your application. The application fee is a non-refundable processing charge and is not applicable to any future bill.';
feeAmount = 425.00;
feeAmount=feeAmount.setScale(2, System.RoundingMode.UNNECESSARY);

}else if(app1.EnrollmentrxRx__Admissions_Status__c == 'Application Started'){
feeAmountStatement = 'Please pay the required $75.00 fee to process your application. The application fee is a non-refundable processing charge and is not applicable to any future bill.';
feeAmount = 75.00;
feeAmount=feeAmount.setScale(2, System.RoundingMode.UNNECESSARY);
}
}
}

 

any help would be great.. thank you .. 

 

i serialized a list ino JSON String.,

 

I am using HTTP Post to send that json to other end.,

 

I need to handle special characters in my JSON string,

 

Please help me.,

  • December 10, 2012
  • Like
  • 0

Hello,

 

   I am actually a .net developer but I am going to self study SalesForce and I need to pass the 401 developer exam. Can you please tell me what and from where I should study? and provide me with any dumps and samples questions please?

 

Thanks,

   sally

The other day I was trying to upload a video to my static resources. After a long period, it finally returned saying that items over 10 MB are not allowed to static resources.

 

I spoke to my manager over this and he thought that was just for developer edition, but I couldn't find anything to say one way or the other. Is there a different size limit for static resource items in higher editions like Enterprise or Unlimited?

 

Thanks in advanced.

  • October 04, 2010
  • Like
  • 0

Here is what I am trying to do:

 

I want to allow the user to insert a new lead, catch the insert with a trigger, go into an apex class, block the insert based on some criteria we have internally and then take them to a related lead.

 

Thanks for any help you can provide.

  • September 02, 2010
  • Like
  • 0