• Kaja
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 11
    Questions
  • 25
    Replies
Hi,
 
I really need to check off the "Send Notification Email" value for the user to get the email automatically,
but it has been not checked by default.
I badly need to check this field value for the particular profiles
 
do you know how to set this value by default?
 
thanks
 
  • October 06, 2008
  • Like
  • 0
Dear all,
 
I have very critical issue with production trigger, as it not allowing me to inactivate it.
I've changed the corresponding meta xml under each trigger and tried to Deploy to Server thru eclipse, but it doesn't update in production!!! :-( This is very very critical,as i need to disable the trigger very soon now. Please help me what could be the solution to edit/inactivate the trigger?

<?xml version="1.0" encoding="UTF-8"?>

<ApexTrigger xmlns="http://soap.sforce.com/2006/04/metadata">

<active>false</active>

<apiVersion>10.0</apiVersion>

</ApexTrigger>

 

Thanks in advance

 

  • October 01, 2008
  • Like
  • 0
Hello,
I am trying to fetch the particular element's value using XMLObject(com.bea.xml.XMLObject).
Code:
                String currQuery = "Select ISOCode, ConversionRate, IsActive from CurrencyType where IsActive = True and ISOCODE = '"+oppCurrencyISOCode+"'";
                
                QueryResult qrCurr = sfdcCtrl.query(currQuery);
                XmlObject xmlObj =  XmlObject.Factory.parse(qrCurr.getRecordsArray(0).xmlText());

 
Generated XMl file from xmlObj look like below:
Code:
<xml-fragment xsi:type="sf:CurrencyType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <sf:ConversionRate xmlns:sf="urn:sobject.enterprise.soap.sforce.com">42.4351</sf:ConversionRate> 
  <sf:IsActive xmlns:sf="urn:sobject.enterprise.soap.sforce.com">true</sf:IsActive> 
  <sf:IsoCode xmlns:sf="urn:sobject.enterprise.soap.sforce.com">INR</sf:IsoCode> 
  </xml-fragment>

 
Code:
String currQuery = "Select ISOCode, ConversionRate, IsActive from CurrencyType where IsActive = True and ISOCODE = '"+oppCurrencyISOCode+"'";
                
                QueryResult qrCurr = Ctrl.query(currQuery);
               XmlObject xmlObj =  XmlObject.Factory.parse(qrCurr.getRecordsArray(0).xmlText());
              XmlCursor cur = xmlObj.newCursor();
                while ( cur.hasNextToken ()) { 
                String tokenInfo = collectTokenTypeInfo ( cur ) + "\n\n" ; 
                responseBuffer.append ( tokenInfo ) ; 
                cur.toNextToken () ; 
               } 
              cur.dispose () ; 
 
 
private String collectTokenTypeInfo ( XmlCursor cursor ){ 
         String response = null ; 
         XmlOptions options = new XmlOptions () ; 
 
         switch ( cursor.currentTokenType () .intValue ()){ 
             
             case TokenType.INT_STARTDOC: 
                 /*response = cursor.currentTokenType () + 
                     "; cursor is at the very beginning of the document, before any markup." ; */
                 break ; 
 
             case TokenType.INT_START: 
                 /*response = cursor.currentTokenType () + 
                     "; cursor is just before this element's start: \n" + cursor.xmlText ( options ) ; */
                 break ; 
 
             case TokenType.INT_ATTR: 
                 response = cursor.currentTokenType () + 
                     "; cursor is just before this attribute: \n"+ cursor.getTextValue () ; 
                 //response = cursor.getChars ();
                 break ; 
 
             case TokenType.INT_TEXT: 
                 response = cursor.currentTokenType () + 
                     "; cursor is just before this text (may be whitespace): \n" + cursor.getChars () ; 
                // response = cursor.getChars ();
                 break ; 
 
             case TokenType.INT_NAMESPACE: 
                 /*response = cursor.currentTokenType () + 
                     "; cursor is just before this namespace: \n" + cursor.xmlText () ; */
                 break ; 
 
             case TokenType.INT_COMMENT: 
                 /*response = cursor.currentTokenType () + 
                     "; cursor is just before this comment: " + cursor.xmlText () ; */
                 break ; 
 
             case TokenType.INT_PROCINST: 
                 /*response = cursor.currentTokenType () + 
                     "; cursor is just before this processing instruction: " + cursor.xmlText () ; */
                 break ; 
 
             case TokenType.INT_END: 
                 /*response = cursor.currentTokenType () + 
                     "; cursor is just before the token representing an element's end." ; */
                 break ; 
 
             case TokenType.INT_ENDDOC: 
                 /*response = cursor.currentTokenType () + 
                     "; cursor is at the end of the XML." ; */
                 break ; 
 
             case TokenType.INT_NONE: 
                 /*response = cursor.currentTokenType () + 
                     "; cursor is not at any recognizable token; it's just before: \n " + 
                         cursor.xmlText ( options ) ; */
                 break ; 
             default : 
                 //response = "Yo! Something funky happened!" ; 
         } 
 
         /* Return the response string. */ 
         return response; 
     }


 
wanted to fetch ONLY 42.4351 which is the value of sf:ConversionRate and store it in double variable.. Thats all my requirement.
Anyone knows how to do this using com.bea.xml.XmlObject api methods?
  • September 29, 2008
  • Like
  • 0
Hello Sir/Madam,
 
I am trying to fetch the conversion rate from sfdc query and use it to calculate currency rate in my java application.
Looks like CurrencyType is not xml object unlike Opportunity , Account !
 
In java,
 
 String currQuery = "Select CurrencyISOCode, ConversionRate from CurrencyType where CurrencyISOCode='USD'";
QueryResult qrCurr = sfdcCtrl.query(currQuery );
 
how  do i retrieve the value of ConversionRate from the above query?
 
Please help me,as this is very urgent
 
Awaiting for the response
 
  • September 26, 2008
  • Like
  • 0
Hi,
 
Is it possible to pull the Country(picklist from Account record)  and display this on the Opportunity header?
 
This field would be readonly on the Opportunity. This Field also be available as a picklist field when creating Views
Please guide me how to meet this requirment.
i've tried created text formula field (cross-object) on opportunity.
but this is not copied over into Opportunity 's newly created formula field(text) automatically.

Any suggestion ?

I need to pull the data(country) from Account to Opportunity Country formula  field.

thanks in advance.
Kaja
  • September 23, 2008
  • Like
  • 0
Hello,
 
I wanted to ensure one particular field value also copied over while cloning the Opportunity.
It has to display one more field(the field value which i wanted to copied over) with checkbox while clicking Clone button on
Opportunity page.
 
This field is just a picklist and need to ensure this value has copied over from the exisiting opportunity to the cloned opportunity.
 
how to add this field with check box under the Clone Opportunity window?
   
  • September 22, 2008
  • Like
  • 0
Hi ,
 
There is a requirement to see monthly revenue amount in addition to annual amount.
 
Does anyone knows how to add this field header as a part of Opportunities tab which is under Account Record.
 
  thanks

Message Edited by Kaja on 09-22-2008 05:16 AM
  • September 22, 2008
  • Like
  • 0
Hi Sir/Madam,
 
Is it possible in SFDC to change the standard field(Opportunity page) name?
 
There is a Standard field called "Amount" under Opportunity. I need to rename this to "Annual Amount".
can this be achieved by config/s-control or something in SFDC?
 
plz suggest me
 
regards
kaja
  • September 22, 2008
  • Like
  • 0
Hi,
 
Is it possible to pull the Country(picklist from Account record)  and display this on the Opportunity header?
 
This field would be readonly on the Opportunity. This Field also be available as a picklist field when creating Views
Please guide me how to meet this requirment.
 
thanks in advance.
Kaja
 


Message Edited by Kaja on 09-22-2008 05:17 AM
  • September 22, 2008
  • Like
  • 0

hI,

i am getting the below error after connecting to SFDC and try to query the sfdc data from JPD file.

 

Submitted at Mon Sep 15 21:57:59 IST 2008

External Service Failure: [Security:090549]The certificate chain received from cs2-api.salesforce.com - 204.14.234.103 contained a V3 CA certificate which did not indicate it really is a CA.

my weblogic contains the version 8.1.4 with the latest batch file.

I never faced this problem before. plz guide me

  • September 15, 2008
  • Like
  • 0
Hi,
 
I am new to Apex trigger and need to get rid of the following error while doing bulk updates on Opportunity.
Update Row Failed:
tocOpportunityAfterUpdate: execution of AfterUpdate
caused by: System.Exception: Too many SOQL queries: 21
Trigger.tocOpportunityAfterUpdate: line 8, column 42
The following is the trigger which needs modification to avoid the above bulk update error.
Code:
trigger tocOportunityAfterUpdate on Opportunity (after update) {
    integer i=0;
    
    try {
        for (Opportunity o : Trigger.new) {
            String id = Trigger.new[i].Id;
            if (Trigger.new[i].Billing_Report_Date__c != null && (Trigger.old[i].Billing_Report_Date__c == null || Trigger.old[i].Billing_Report_Date__c != Trigger.new[i].Billing_Report_Date__c)) {
                Opportunity[] oppList = [Select o.tocClonedFrom__c, o.RecordType.Name, o.Id, o.Billing_Report_Date__c, (Select Id, Billing_Report_Date__c From Opportunities__r) From Opportunity o where (o.tocClonedFrom__c=:id) or o.Id = :id];
    
                for (Opportunity op : oppList) {
                    if(op.RecordType.Name == 'Payment' && op.Id != id ) 
                    {
                        Opportunity updOpp = new Opportunity(Id=op.Id);
                        updOpp.Billing_Report_Date__c  = Trigger.new[i].Billing_Report_Date__c;   
                        update updOpp;
                    }
                    if((op.tocClonedFrom__c == id && op.RecordType.Name == 'Payment') || op.Id == id )
                    {
                        tfCommissionOpportunity__c[] commOppsList = op.Opportunities__r;
                            for(tfCommissionOpportunity__c commOpp : commOppsList){
                            tfCommissionOpportunity__c updCommOpp = new tfCommissionOpportunity__c(Id=commOpp.Id);
                            updCommOpp.Billing_Report_Date__c = Trigger.new[i].Billing_Report_Date__c;
                            update updCommOpp;
                        }
                    }
                } 
            }
            i += 1;

        }
    } catch (Exception e){
        
    }
}

I've looked in the apex documentation for bulk triggers. It's bad to put soql statements in a for loop. the batch size for each trigger can be from 1 to 200. if the batch size is high, having a soql statement in the for loop will give you the soql error.
 
It would be very useful for me, if you people modified the above code to get rid of that error.
 
thanks
venkat
  • September 10, 2008
  • Like
  • 0
Hi,
 
I really need to check off the "Send Notification Email" value for the user to get the email automatically,
but it has been not checked by default.
I badly need to check this field value for the particular profiles
 
do you know how to set this value by default?
 
thanks
 
  • October 06, 2008
  • Like
  • 0
Dear all,
 
I have very critical issue with production trigger, as it not allowing me to inactivate it.
I've changed the corresponding meta xml under each trigger and tried to Deploy to Server thru eclipse, but it doesn't update in production!!! :-( This is very very critical,as i need to disable the trigger very soon now. Please help me what could be the solution to edit/inactivate the trigger?

<?xml version="1.0" encoding="UTF-8"?>

<ApexTrigger xmlns="http://soap.sforce.com/2006/04/metadata">

<active>false</active>

<apiVersion>10.0</apiVersion>

</ApexTrigger>

 

Thanks in advance

 

  • October 01, 2008
  • Like
  • 0
Hi,
 
Is it possible to pull the Country(picklist from Account record)  and display this on the Opportunity header?
 
This field would be readonly on the Opportunity. This Field also be available as a picklist field when creating Views
Please guide me how to meet this requirment.
i've tried created text formula field (cross-object) on opportunity.
but this is not copied over into Opportunity 's newly created formula field(text) automatically.

Any suggestion ?

I need to pull the data(country) from Account to Opportunity Country formula  field.

thanks in advance.
Kaja
  • September 23, 2008
  • Like
  • 0
Hi Sir/Madam,
 
Is it possible in SFDC to change the standard field(Opportunity page) name?
 
There is a Standard field called "Amount" under Opportunity. I need to rename this to "Annual Amount".
can this be achieved by config/s-control or something in SFDC?
 
plz suggest me
 
regards
kaja
  • September 22, 2008
  • Like
  • 0
Hi,
 
Is it possible to pull the Country(picklist from Account record)  and display this on the Opportunity header?
 
This field would be readonly on the Opportunity. This Field also be available as a picklist field when creating Views
Please guide me how to meet this requirment.
 
thanks in advance.
Kaja
 


Message Edited by Kaja on 09-22-2008 05:17 AM
  • September 22, 2008
  • Like
  • 0

hI,

i am getting the below error after connecting to SFDC and try to query the sfdc data from JPD file.

 

Submitted at Mon Sep 15 21:57:59 IST 2008

External Service Failure: [Security:090549]The certificate chain received from cs2-api.salesforce.com - 204.14.234.103 contained a V3 CA certificate which did not indicate it really is a CA.

my weblogic contains the version 8.1.4 with the latest batch file.

I never faced this problem before. plz guide me

  • September 15, 2008
  • Like
  • 0
Hi,
 
I am new to Apex trigger and need to get rid of the following error while doing bulk updates on Opportunity.
Update Row Failed:
tocOpportunityAfterUpdate: execution of AfterUpdate
caused by: System.Exception: Too many SOQL queries: 21
Trigger.tocOpportunityAfterUpdate: line 8, column 42
The following is the trigger which needs modification to avoid the above bulk update error.
Code:
trigger tocOportunityAfterUpdate on Opportunity (after update) {
    integer i=0;
    
    try {
        for (Opportunity o : Trigger.new) {
            String id = Trigger.new[i].Id;
            if (Trigger.new[i].Billing_Report_Date__c != null && (Trigger.old[i].Billing_Report_Date__c == null || Trigger.old[i].Billing_Report_Date__c != Trigger.new[i].Billing_Report_Date__c)) {
                Opportunity[] oppList = [Select o.tocClonedFrom__c, o.RecordType.Name, o.Id, o.Billing_Report_Date__c, (Select Id, Billing_Report_Date__c From Opportunities__r) From Opportunity o where (o.tocClonedFrom__c=:id) or o.Id = :id];
    
                for (Opportunity op : oppList) {
                    if(op.RecordType.Name == 'Payment' && op.Id != id ) 
                    {
                        Opportunity updOpp = new Opportunity(Id=op.Id);
                        updOpp.Billing_Report_Date__c  = Trigger.new[i].Billing_Report_Date__c;   
                        update updOpp;
                    }
                    if((op.tocClonedFrom__c == id && op.RecordType.Name == 'Payment') || op.Id == id )
                    {
                        tfCommissionOpportunity__c[] commOppsList = op.Opportunities__r;
                            for(tfCommissionOpportunity__c commOpp : commOppsList){
                            tfCommissionOpportunity__c updCommOpp = new tfCommissionOpportunity__c(Id=commOpp.Id);
                            updCommOpp.Billing_Report_Date__c = Trigger.new[i].Billing_Report_Date__c;
                            update updCommOpp;
                        }
                    }
                } 
            }
            i += 1;

        }
    } catch (Exception e){
        
    }
}

I've looked in the apex documentation for bulk triggers. It's bad to put soql statements in a for loop. the batch size for each trigger can be from 1 to 200. if the batch size is high, having a soql statement in the for loop will give you the soql error.
 
It would be very useful for me, if you people modified the above code to get rid of that error.
 
thanks
venkat
  • September 10, 2008
  • Like
  • 0
I am new to APEX classes and have a few questions.  I posted once in the PHP forums to try and find a solution, but the answers were not clear

1)  If I create an APEX class can I access this from an external server/system or set of scripts that I write?  The script can be written in any language: PHP, Perl, etc....
2) Once I create the class and generate the WSDL from the class, do I download it and then use this like I do the Partner WSDL file


Any help or guidance would be appreciated.

I hope this is not too generic to answer my questions

Thanks,
Mike
In need of deactivating a trigger in Production? Haven't found a way to do it?
I don't know if people are aware of this, but I've seen numerous posts about it, I've suffered from it myself and even had support tell me it's not possible.

So I was a bit surprised when today, playing around in Eclipse, I successfully managed to deactivate and activate a trigger in Production!
What you need to do is to open the metadata file accompanying the trigger. So, if your trigger is Foo.trigger, you would have a Foo.trigger-meta.xml.
Open that one, change the value of the element <active> to "false" and save the file.
Once saved, doublecheck through the GUI and the checkbox for Active is no longer there!
Sweet!

Of course, to re-activate the trigger, just change the <active> element to "true" again.

Hope this helps someone.

//Johan