• sanju21
  • NEWBIE
  • 0 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 15
    Questions
  • 23
    Replies

I am hitting a weird problem. I have the following process flow:

 

Timebased triggers on contact -> do field updates on contact -> initiates a trigger that creates some tickets

 

Problem is the process flow stops at field updates for some records randomly. Its not initiating the trigger that relies on field update.

This is weird because if I just hit Edit and then Save for those records, it creates the tickets. How can field update happen but it wont create

tickets for some records but creates for others? But when I click edit, that initates the trigger. Weird BUG!!!!!!!!! Any help is greately appreciated guys.

Is there a way to mass delete inactive workflows? Thanks..

How can assign all the records associated with one user to another user before/after deactivating him? I tried to deactivate a user and it said it will direct to me some page wher I can chose the user to replace this user but it did not, it just deactivated. Now I am getting exception from reports where the deactivated user was the running user..please help.

...besides the crude javascript methods posted in other threads? Thanks.

I am not understanding why I am getting this exception when I run tests on the apex test class that is related to a trigger. The exception is being thrown at the following line(where I am querying for total child cases) in trigger when I 'Run tests' on the respective test class. Any help is very much appreciated.

 

List<Case> parToTotalChildsCases = [Select Id, Status, parentID from Case where ParentId IN :offParList and IsDeleted = false];
    
    // get total child cases for each parent
    for (case c: parToTotalChildsCases){
    	system.debug('child ID in total==='+c.Id);
    	parToTotalChilds.put(c.parentId, totalCount++);
    	
    }

 

This code is working fine in IE but not working in firefox...onselect is NOT working but onclick IS working...please help!!!!

I am commenting out everything but still its not working...

 

<apex:pageBlockSectionItem id="theItemLookup" rendered="{!AND(Lead.Employee_Status__c=='Consultant',NOT(ISNULL(Lead.Employee_Status__c)),CONTAINS(Lead.Approved_Consulting_Company__c, 'IS&T - '))}" >   
                        <apex:outputLabel value="Work order #" for="reqWorkOrderLookup" />
                        <apex:outputPanel styleClass="requiredInput" layout="block">
                            <apex:inputField value="{!Lead.IS_T_Work_Order__c}" id="reqWorkOrderLookup" onselect="alert('hi');populateAED()" onclick="alert();"/>
                            <!-- <apex:actionFunction name="populateAED" action="{!getAED}" rerender="aed" status="reqstatus"  oncomplete="alert('done');disableAED();"/>
                            </apex:inputField> -->
                            <script> workorderLookup = document.getElementById("{!$Component.reqWorkOrderLookup}"); </script>
                        </apex:outputPanel>
                    </apex:pageBlockSectionItem>  

 

It was working fine before but the date fields stopped showing the nice popup calendar on sites now..!!!!!!!!!!!!!!!!!! please help???!!!

Why am I unable to use <img src="{!$Resource.ilogo}" alt="i_logo" /> in a custom html email template, what am I doing wrong, its not letting me save!! please help?

We have a requirement from client where we need to poll an outside server every hour and update leads in SF based on some status change. We are doing Http request and getting a http response and because it is a scheduled class, I am using Future annotation.

 

The plan is to do apex call outs based on some Application ID custom  field in Leads. It should have all worked perfectly but I stumbled upon Apex call out limitations and Apex future annotation limitations.

 

Apex call out limitations say:

 

The following limits apply when an Apex script makes a callout to an HTTP request or a Web services call. The Web services call can be a Web services API call or any external Web services call.

  • A single Apex transaction can make a maximum of 10 callouts to an HTTP request or an API call.

Which means I can poll for only 10 leads(1 call out per lead because I am polling based on lead Id) at a time? This approach would not work if I want to poll for 100 leads at a time. So I am stuck. The client can over come Future annotation limitation by probably buying more licenses. But how can I overcome this general limitation of apex call outs?? Any ideas, suggestions??

 

Pleaaaaaaaaaaaase help!!!!!!

I want to have commas in quotes total price that I am displaying on my custom quote VF page(which renders as PDF), how can I have commas in the total price? Pleeeasse help!!!!!

I have a text area in custom object. The text area had html <br/> tags for line breaks and etc. When I output the text area in VF page,

which is rendered as PDF, the formatting goes away. If I dont render it as PDF, the formatting stays. How can I preserve line breaks

in PDF rendering in VF page? Please help!!

Web to lead is not working continuously....for 3 continous records it comes along but then it chokes and after some time, it sends the leads along...anybody has any clue why this could be happening...please?

  • September 22, 2010
  • Like
  • 0

Can I get Email to Case service to upate a field (like a picklist field to yes or no) based on the subject in the email without writing code?

Thanks!

I have written a Trigger that works on opportunity Object. Its working fine with all the new opportunities created after I deployed the trigger. But all the old opportunities were giving the following error. The client is getting this error when he first tries to login as Admin and then logins as another user. Here is the scenario in detail.

 

1. User logins as admin. Then he goes to Set up-> Users and logins as a particular user.

2. User opens an existing opportunity
3. Modifies the Opportunity and hits Save

4.He  receives the following message and opportunity is not saved


“Your Changes Cannot Be Saved
The record you were editing was modified by Sfdc Admin during your edit session.

Please re-display the record before editing again.

 

5. If user then closes the opportunity and repeats step 2 to 3 – the opportunity is saved with no issue.

6. Or if the user clicks on  the 'Please re-display the record before editing again.' link from the

error, the opportunity re-displays. When he repeats the steps, the opportunity gets saved again without any error

 

This is only happening with the old opportunites(opp created before the trigger was deployed) and when the user is logging in as another user

after loggin in as admin first.  I am really confused. I looked into my code and the initial lines of my code look like this:

 

  if (Trigger.isUpdate && Helper.getcallfromPV() == false) {

            list<Opportunity> oppt = [select Id from Opportunity where Id IN :Trigger.newMap.keySet() limit 1];

 

I am wondering if since I am looking into Trigger.newMap, I am getting this error for old opportunities? Okay, but

why does the triggers work once you refresh the opportunity? If the trigger is only looking into new opportunities,

it should not work on old opportunities no matter what, right? But how come it works normally once your refresh the

opportunity. Any help please?

I have developed a VF page and I am using standard styles for the apex form. I customized the page using my css styles

but no matter what I do, I am unable to get rid of the pageblock border (thin black border) that is appearing on the right side

and at the bottom of the page..any help is greately appreciated!!

...besides the crude javascript methods posted in other threads? Thanks.

I am not understanding why I am getting this exception when I run tests on the apex test class that is related to a trigger. The exception is being thrown at the following line(where I am querying for total child cases) in trigger when I 'Run tests' on the respective test class. Any help is very much appreciated.

 

List<Case> parToTotalChildsCases = [Select Id, Status, parentID from Case where ParentId IN :offParList and IsDeleted = false];
    
    // get total child cases for each parent
    for (case c: parToTotalChildsCases){
    	system.debug('child ID in total==='+c.Id);
    	parToTotalChilds.put(c.parentId, totalCount++);
    	
    }

 

This code is working fine in IE but not working in firefox...onselect is NOT working but onclick IS working...please help!!!!

I am commenting out everything but still its not working...

 

<apex:pageBlockSectionItem id="theItemLookup" rendered="{!AND(Lead.Employee_Status__c=='Consultant',NOT(ISNULL(Lead.Employee_Status__c)),CONTAINS(Lead.Approved_Consulting_Company__c, 'IS&T - '))}" >   
                        <apex:outputLabel value="Work order #" for="reqWorkOrderLookup" />
                        <apex:outputPanel styleClass="requiredInput" layout="block">
                            <apex:inputField value="{!Lead.IS_T_Work_Order__c}" id="reqWorkOrderLookup" onselect="alert('hi');populateAED()" onclick="alert();"/>
                            <!-- <apex:actionFunction name="populateAED" action="{!getAED}" rerender="aed" status="reqstatus"  oncomplete="alert('done');disableAED();"/>
                            </apex:inputField> -->
                            <script> workorderLookup = document.getElementById("{!$Component.reqWorkOrderLookup}"); </script>
                        </apex:outputPanel>
                    </apex:pageBlockSectionItem>  

 

It was working fine before but the date fields stopped showing the nice popup calendar on sites now..!!!!!!!!!!!!!!!!!! please help???!!!

Why am I unable to use <img src="{!$Resource.ilogo}" alt="i_logo" /> in a custom html email template, what am I doing wrong, its not letting me save!! please help?

We have a requirement from client where we need to poll an outside server every hour and update leads in SF based on some status change. We are doing Http request and getting a http response and because it is a scheduled class, I am using Future annotation.

 

The plan is to do apex call outs based on some Application ID custom  field in Leads. It should have all worked perfectly but I stumbled upon Apex call out limitations and Apex future annotation limitations.

 

Apex call out limitations say:

 

The following limits apply when an Apex script makes a callout to an HTTP request or a Web services call. The Web services call can be a Web services API call or any external Web services call.

  • A single Apex transaction can make a maximum of 10 callouts to an HTTP request or an API call.

Which means I can poll for only 10 leads(1 call out per lead because I am polling based on lead Id) at a time? This approach would not work if I want to poll for 100 leads at a time. So I am stuck. The client can over come Future annotation limitation by probably buying more licenses. But how can I overcome this general limitation of apex call outs?? Any ideas, suggestions??

 

Pleaaaaaaaaaaaase help!!!!!!

I want to have commas in quotes total price that I am displaying on my custom quote VF page(which renders as PDF), how can I have commas in the total price? Pleeeasse help!!!!!

Hi

I have a Visualforcepage which is renderd as PDF and it fires of on a button click on the opportunity. When this page is generated, I create an Attachment Object and attach it to the Opportunity . The problem is every Time for a single button click, Multiple attachment objects are created and attached to the Opportunity. I am using the "action"  attribute of the page element. which I thought, is only called once when the page is first requested from the server, Then Why is it called multiple time?

 

here is my code for the Visualforce Page

 

 

<apex:page standardController="Opportunity" extensions="OpportunityExtension" action="{!Attach}" renderAs="PDF" >

 

ANd Here is my Controller code for thr Attach() function

 

 

public

{

//String id = apexpages.currentpage().getparameters().get('id');

PageReference pdf = new PageReference('/apex/Formatted_Quote?id='+apexpages.currentPage().getParameters().get('id'));

try

{

attachment = new Attachment();

count = count++;

//pdf = Page.Formatted_Quote;

blob body = pdf.getContent();

attachment.Body = body;

//attachment.IsPrivate = false;

attachment.ParentId = apexpages.currentPage().getParameters().get('id');

attachment.name = 'Quote';

attachment.Body = body;

Database.insert(attachment);

 

 

}

catch(VisualforceException e){

string msg = 'Error';

 

 

}

 

 

 

return null;

}

 

  PageReference Attach() 

Can I get Email to Case service to upate a field (like a picklist field to yes or no) based on the subject in the email without writing code?

Thanks!

is there a way to have the Tab Keystroke move Down instead of to the Right in VisualForce?
Is there any way to control the tab order of apex:inputField controls within a pageBlockSection? Right now, tabbing thru a 2-column pageBlockSection moves focus across each row, from left to right, then down to the next row. I would like the tab movement to be down the left column, then down the right column (like standard Salesforce input forms). The apex:inputField control does not support the tabindex attribute. This results in a tab order that is not consistent with a standard Salesforce data input forms.
 
  • November 05, 2008
  • Like
  • 0
Hi,
 I created a custom object in sales force  and tried to insert records from a custom apex class. I am getting the following message
 

DML currently not allowed

 

Thanks In advance