• Selva
  • NEWBIE
  • 0 Points
  • Member since 2008

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

Hi,

Is it possible to determine what fields were modified by a user when saving an object in Salesforce.  For example, a user accesses the Account object and updates the Description and Customer Group values.  When they click Save, can that action be captured and those 2 fields identified as modified for further processing in an easy fashion?

regards
 
  • November 28, 2008
  • Like
  • 0
Hi,
 
I am trying to set the email value which contains single quote into Contact object's email field, but couldn't. Weblogic server thrown the following error. Is there any way to escape the single quote.
 
Code:
<xml-fragment xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sf="urn:fault.enterprise.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><faultcode>sf:MALFORMED_QUERY</faultcode><faultstring>MALFORMED_QUERY: 
'dean.rose@gmail.com','brenden.o'connor@gmail.com','karen.davenport@gmail.com'
                                          ^ ERROR at Row:1:Column:963 expecting a right parentheses, found 'connor'</faultstring><detail><sf:fault xsi:type="sf:MalformedQueryFault" xmlns:sf="urn:fault.enterprise.soap.sforce.com"><sf:exceptionCode xmlns:sf="urn:fault.enterprise.soap.sforce.com">MALFORMED_QUERY</sf:exceptionCode><sf:exceptionMessage xmlns:sf="urn:fault.enterprise.soap.sforce.com">
'dean.rose@gmail.com','brenden.o'connor@gmail.com','karen.davenport@gmail.com'
                                          ^ ERROR at Row:1:Column:963 expecting a right parentheses, found 'connor'</sf:exceptionMessage><sf:row xmlns:sf="urn:fault.enterprise.soap.sforce.com">1</sf:row><sf:column xmlns:sf="urn:fault.enterprise.soap.sforce.com">963</sf:column></sf:fault></detail></xml-fragment>

 
I am using the following logic in JPD file to set the email value.
Code:
    private String getUserId(QueryResult qr, String emailId) throws Exception
    {
        String userId = "";
        
        for(int i=0; i < qr.getRecordsArray().length; i++)   
        {
            User usr = User.Factory.parse(qr.getRecordsArray(i).xmlText());
            
            if(usr.getEmail().equals(emailId))
            {
                userId = usr.getId();
                break;   
            }
        }
        return userId;
    } 
..................     
String usrId = getUserId(qrTeam,accountData[i].TEAM_EMAIL);
            
            if(!usrId.equalsIgnoreCase(""))
            {
                account.setOwnerId(usrId);
            }
.....................

 
Thanks.

 
  • November 22, 2008
  • Like
  • 0
Hi,
 
I've written a jpd file which reads a record from Oracle DB and update it in SFDC Contact object.
The record contains the universal characters! when i tried to call sfdc control's update method and it tried to parse the characters(other than English), it fired and thrown the following exception something like this:
 
External Service Response
Submitted at Fri Nov 14 21:54:11 IST 2008
External Service Failure: failed to convert DOM to SOAPEnvelope:java.io.IOException: error:weblogic.xml.stream.XMLStreamException: '<' expected [/?! -- [CDATA[ ] - with nested exception:
[Error at line:5 col:1021 '<' expected [/?! -- [CDATA[ ]]
 
Do i have to set the universal character code in SFDC or jpd code? Any thoughts?
 
Regards
 
  • November 14, 2008
  • Like
  • 1

Hi,

I am trying to implement the logic to update the agreement object from child window(modal dialog window).

 

I've create two S-controls one is parent window and another is child window which displays some check box fields. when clicked on save button from child window, it should update the fields in corresponding agreement object and come back to parent window.

I've marked a couple of fields. When clicked on the Save, received the following error:

 {faultcode:'sf:invalid_session_id; faultstring:"Invalid_sesssion_id:Invalid session ID found in sessionheader: Illegal session'. This only happened  one time

 

Parent s-control :

 

returnval = window.showModalDialog("{!URLFOR($SControl.tocChild, tocApprovalRequest__c.tocObjectId__c)}" ,'Approval Screen','dialogWidth:900px;dialogHeight:640px;resizable:no;toolbar:no;status:no;center:yes;help:no;');

 

Child S-control

var result2=sforce.connection.update([agreementObj]);

 

Please provide me hint, what could be the reason for this error.

 

Awaiting for the reply soon.

  • August 05, 2008
  • Like
  • 0

Hi,

I’ve created some assignment rules from Leads object. There is no problem at all in rule criteria as it contains only picklist values so there wouldn't contain any errors.

I've created one rule name Test which is  Active that can be set by checking off the Set this as the active lead assignment rule checkbox while creating/editing the Rule name.

When I created the Lead form, it through the error as Error: “There is no active assignment rule”, when i check off the optional checkbox(which appears in the bottom of Lead form) Assign using active assignment rule 

But, I don’t know why the rule is not active, though the Active box was checked off!

 Please give some suggestions what could be the issue? 

regards

 

  • July 10, 2008
  • Like
  • 0
Hi,
 
I've created two picklist fields EmpId and EmpName.When i choose a EmpNo and EmpName, it seems to break the interface for some of the longer employee names. Is it possible to extend the interface as this is out the box functionality?

Awaiting for your repsonse!

regards

 

  • July 03, 2008
  • Like
  • 0
Hi,
 
I am developing one S-control snippet (javascript) and using sforce.connect.query( )
am forming the nested query.
 
select t.tocOpportunityProductId__c from AgreementId__c
where t.tocOpportunityProductId__c in (select distinct tocOpportunityProductId__c from tfAgreementProduct__c)
 
the above query failed and saying error as the keyword "in" not found.
is there any other alternative method instead of "in" keyword"
 
Plz reply me
 
 
  • June 13, 2008
  • Like
  • 0
Hi,
 
Is it possible to check the user who is performing update on any account pages is System Administrator or something else?
I used the below code but failed to show the particular user role who is performing the  update on each Account page. It keeps getting changed,when i do update as the same role(system admin)
Code:
trigger tocAccountTrigger on Account (before update) {
for (Profile p : [select name from Profile])
if(p.name=='System Administrator')
{
//do something
}
}

 
  • May 28, 2008
  • Like
  • 0
Hi,
 
I am new to Apex trigger and Apex class.
I would like to know how to replace the old values with new values of Account object,if some criteria is met(for example, if the user who is updating the account is System administrator, update the old values(account name,account owner) with new values). I have to do it in the before update trigger. Do i need to create Apex class for updating the values?
 
my sample trigger code:
trigger tocAccountTrigger on Account (before update) {
    if (Trigger.isBefore) {
        if (Trigger.isUpdate) {
            for (Account a : Trigger.new) {
              // update the old values with the new values if the criteria met
            }
        }
    }
}

 
  • May 27, 2008
  • Like
  • 0
Hi,
 
I've written a jpd file which reads a record from Oracle DB and update it in SFDC Contact object.
The record contains the universal characters! when i tried to call sfdc control's update method and it tried to parse the characters(other than English), it fired and thrown the following exception something like this:
 
External Service Response
Submitted at Fri Nov 14 21:54:11 IST 2008
External Service Failure: failed to convert DOM to SOAPEnvelope:java.io.IOException: error:weblogic.xml.stream.XMLStreamException: '<' expected [/?! -- [CDATA[ ] - with nested exception:
[Error at line:5 col:1021 '<' expected [/?! -- [CDATA[ ]]
 
Do i have to set the universal character code in SFDC or jpd code? Any thoughts?
 
Regards
 
  • November 14, 2008
  • Like
  • 1

Hi,

Is it possible to determine what fields were modified by a user when saving an object in Salesforce.  For example, a user accesses the Account object and updates the Description and Customer Group values.  When they click Save, can that action be captured and those 2 fields identified as modified for further processing in an easy fashion?

regards
 
  • November 28, 2008
  • Like
  • 0
Hi,
 
I am trying to set the email value which contains single quote into Contact object's email field, but couldn't. Weblogic server thrown the following error. Is there any way to escape the single quote.
 
Code:
<xml-fragment xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sf="urn:fault.enterprise.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><faultcode>sf:MALFORMED_QUERY</faultcode><faultstring>MALFORMED_QUERY: 
'dean.rose@gmail.com','brenden.o'connor@gmail.com','karen.davenport@gmail.com'
                                          ^ ERROR at Row:1:Column:963 expecting a right parentheses, found 'connor'</faultstring><detail><sf:fault xsi:type="sf:MalformedQueryFault" xmlns:sf="urn:fault.enterprise.soap.sforce.com"><sf:exceptionCode xmlns:sf="urn:fault.enterprise.soap.sforce.com">MALFORMED_QUERY</sf:exceptionCode><sf:exceptionMessage xmlns:sf="urn:fault.enterprise.soap.sforce.com">
'dean.rose@gmail.com','brenden.o'connor@gmail.com','karen.davenport@gmail.com'
                                          ^ ERROR at Row:1:Column:963 expecting a right parentheses, found 'connor'</sf:exceptionMessage><sf:row xmlns:sf="urn:fault.enterprise.soap.sforce.com">1</sf:row><sf:column xmlns:sf="urn:fault.enterprise.soap.sforce.com">963</sf:column></sf:fault></detail></xml-fragment>

 
I am using the following logic in JPD file to set the email value.
Code:
    private String getUserId(QueryResult qr, String emailId) throws Exception
    {
        String userId = "";
        
        for(int i=0; i < qr.getRecordsArray().length; i++)   
        {
            User usr = User.Factory.parse(qr.getRecordsArray(i).xmlText());
            
            if(usr.getEmail().equals(emailId))
            {
                userId = usr.getId();
                break;   
            }
        }
        return userId;
    } 
..................     
String usrId = getUserId(qrTeam,accountData[i].TEAM_EMAIL);
            
            if(!usrId.equalsIgnoreCase(""))
            {
                account.setOwnerId(usrId);
            }
.....................

 
Thanks.

 
  • November 22, 2008
  • Like
  • 0
Hi,
 
I've written a jpd file which reads a record from Oracle DB and update it in SFDC Contact object.
The record contains the universal characters! when i tried to call sfdc control's update method and it tried to parse the characters(other than English), it fired and thrown the following exception something like this:
 
External Service Response
Submitted at Fri Nov 14 21:54:11 IST 2008
External Service Failure: failed to convert DOM to SOAPEnvelope:java.io.IOException: error:weblogic.xml.stream.XMLStreamException: '<' expected [/?! -- [CDATA[ ] - with nested exception:
[Error at line:5 col:1021 '<' expected [/?! -- [CDATA[ ]]
 
Do i have to set the universal character code in SFDC or jpd code? Any thoughts?
 
Regards
 
  • November 14, 2008
  • Like
  • 1

Hi,

I am trying to implement the logic to update the agreement object from child window(modal dialog window).

 

I've create two S-controls one is parent window and another is child window which displays some check box fields. when clicked on save button from child window, it should update the fields in corresponding agreement object and come back to parent window.

I've marked a couple of fields. When clicked on the Save, received the following error:

 {faultcode:'sf:invalid_session_id; faultstring:"Invalid_sesssion_id:Invalid session ID found in sessionheader: Illegal session'. This only happened  one time

 

Parent s-control :

 

returnval = window.showModalDialog("{!URLFOR($SControl.tocChild, tocApprovalRequest__c.tocObjectId__c)}" ,'Approval Screen','dialogWidth:900px;dialogHeight:640px;resizable:no;toolbar:no;status:no;center:yes;help:no;');

 

Child S-control

var result2=sforce.connection.update([agreementObj]);

 

Please provide me hint, what could be the reason for this error.

 

Awaiting for the reply soon.

  • August 05, 2008
  • Like
  • 0
working fine before. But when i migrated to the latest AJAX API version it is killing me. I marked the code red here is the error
This is the error i am getting in the debug log window.
 
Using bookmarklet version of shell: commands will run in opener's context.
sf:INVALID_SESSION_ID
INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session
 
Plz see the code below
I am using this ApI
 
<script src="/soap/ajax/13.0/connection.js" type="text/javascript"></script>
 
window.setTimeout(";", 1000);
var date = new Date();
var task= new sforce.SObject("Task");
task.set("Subject", reason);
task.set("Type", "Other");
task.set("LegacyID__c", "SB");
task.set("WhoId", "{!Contact.Id}");
task.set("WhatId", "{!Account.Id}");
task.set("Status", "Completed");
task.set("IsClosed", "true");
task.set("ActivityDate", date);
task.set("Description", notes);

var saveResultTask = sforce.connection.create([task]);
for (var i=0; i<saveResultTask .length; i++)
{
if (saveResultTask [i].success == true)
{
}
else
{
alert("An error has occurred: " + saveResultTask [i].errors[0].message);
}
}
changeOwner();
parent.frames.location.replace("/servlet/servlet.FileDownload?file=0153000000042gA");
}
catch(error)

sforce.debug.log(error.faultcode);
sforce.debug.log(error.faultstring);
document.getElementById("divSave").style.visibility='hidden'
document.getElementById("Submit1").disabled = false;
return false;
}
  • July 18, 2008
  • Like
  • 0

Hi,

I’ve created some assignment rules from Leads object. There is no problem at all in rule criteria as it contains only picklist values so there wouldn't contain any errors.

I've created one rule name Test which is  Active that can be set by checking off the Set this as the active lead assignment rule checkbox while creating/editing the Rule name.

When I created the Lead form, it through the error as Error: “There is no active assignment rule”, when i check off the optional checkbox(which appears in the bottom of Lead form) Assign using active assignment rule 

But, I don’t know why the rule is not active, though the Active box was checked off!

 Please give some suggestions what could be the issue? 

regards

 

  • July 10, 2008
  • Like
  • 0
Hi,
 
I've created two picklist fields EmpId and EmpName.When i choose a EmpNo and EmpName, it seems to break the interface for some of the longer employee names. Is it possible to extend the interface as this is out the box functionality?

Awaiting for your repsonse!

regards

 

  • July 03, 2008
  • Like
  • 0
Hi,
 
I am new to Apex trigger and Apex class.
I would like to know how to replace the old values with new values of Account object,if some criteria is met(for example, if the user who is updating the account is System administrator, update the old values(account name,account owner) with new values). I have to do it in the before update trigger. Do i need to create Apex class for updating the values?
 
my sample trigger code:
trigger tocAccountTrigger on Account (before update) {
    if (Trigger.isBefore) {
        if (Trigger.isUpdate) {
            for (Account a : Trigger.new) {
              // update the old values with the new values if the criteria met
            }
        }
    }
}

 
  • May 27, 2008
  • Like
  • 0