• giribabu geda
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 6
    Replies

Hi all, I developed an .net Application wich uses EnterpriseWSDL API from sealesforce. Currently this application USes my username and password and connects to salesforce to get the dat from sales force. Now my Doubt is when i open my website i have login page where in other users login with there Username and password in to the website.How do i make salesforcesession available to them as well.

 

I mean to say once the  webapplication is deployed  all the users who authorized members of my website should be able to acess the salesforce Object records as soon as they login with their web user ID and passsword. all the users who have aces to the site are also  users of my salesforce application..

 

Hope this makes sense.

 

Thanks in advance.

Giribabu

Hi all, I developed an .net Application wich uses EnterpriseWSDL API from sealesforce. Currently this application USes my username and password and connects to salesforce to get the dat from sales force. Now my Doubt is when i open my website i have login page where in other users login with there Username and password in to the website.How do i make salesforcesession available to them as well.

 

I mean to say once the  webapplication is deployed  all the users who authorized members of my website should be able to acess the salesforce Object records as soon as they login with their web user ID and passsword. all the users who have aces to the site are also  users of my salesforce application..

 

Hope this makes sense.

 

Thanks in advance.

Giribabu

hi All,

 

   Is there any method similar to sforce.apex.excute that can be implimented with in apex class.

 

Please help me with this.

 

 

Thanks in advance

hi All,

 

   Is there any method similar to sforce.apex.excute that can be implimented with in apex class.

 

Please help me with this.

 

 

Thanks in advance

Hi all, Can i Use the sforce.apex.Execute in an Apex webservice method

hi all,


    I am writing an apex webservice which reads XNL string from a thirdparty application.


the XMl looks like the Below format


<root    name="test"  place="dc">

 <childone>

<item firstname="value" lastname="value"></item>

<item firstname="value" lastname="value"></item>

</childone>

</root>



tha code i wrote looks as follows:


XMLStreamReader  reader =new XMLStreamreader(str)

reader.setClalescing(true)

try

{

    while(reader.hasNext())

    {

      if(reader.getEventtype()=xmltag.STARTELEMENT() && reader.getLocalName()='root)

        {

           string str1=reader.getAttributeValue(Null,'name');
           string str2=reader.getAttributeValue(Null,'Place');

       }

       if(reader.getEventtype()=xmltag.STARTELEMENT() && reader.getLocalName()='childone')
       {

          reader.nexttag();

          if(reader.getEventtype()=xmltag.STARTELEMENT() && reader.getLocalName()='item')

          {

                here i am trying to get the attribute values of all items.how do i do that.

          }

       }

    }

}

hi,
 
Help needed,
 
Requirmemts for datamigration from SQL server to Salesforce:
 
i had data in sql server database with 1 lac records.these contact records needs to be loaded  to salesforce using .net  application on button click  .
 
i developed the application and able to load the data on button click event.
 
the way in which i developed the application is onclick of a button i get all the records from salesforce and check each and every record with the record in my local database if the record exists i update the record in sales force else i create a new record.
 
this is the piece of code i use to compare the records:
 

/* Loop will compare PG suid matched with salesfoce suid*/

#region Loop will compare PG suid matched with salesfoce suid

for (i = 0; i < qr.size; i++)

{

contact = (Contact)records[i];

if (Convert.ToString(contact.SUID__c) != null)

{

if (contact.SUID__c.ToString() == str.ToString())

{

k = i;

j = 1;

strcurrentval = str.ToString();

string strcontactsuid = contact.SUID__c.ToString();

break;

}

}

else if(Convert.ToString(contact.Email) != null || Convert.ToString(contact.Email_2__c) != null )

{

if ((Convert.ToString(contact.Email) == prefemail.ToString() || Convert.ToString(contact.Email) == otheremail.ToString()) || (Convert.ToString(contact.Email_2__c) == otheremail.ToString() || Convert.ToString(contact.Email_2__c) == prefemail.ToString()))

{

k = i;

j = 1;

break;

}

}

}

#endregion

/*IF the suid of PG data matched with Salesforce data then it will update */

//dsContact.Tables[0].Columns.Add("Record Status");

if (Convert.ToString(qr.size) != "0" && j == 1)

{

here goes the update and create records to salesforce. 

}

 
the problem i face is severe performance issue.
 
 
please
 i need help on this issue.
 
Thanks in advance.
 

 
 
 
 

My client uses Territories for their Accounts.  This is a feature Salesforce can turn on for an org.

 

I am having trouble getting the Territories field onto a VF page for the Account using the StandardController.  Any ideas on how to do it?

  • August 11, 2010
  • Like
  • 0

I am creating a questionnaire in which a record is created after the completion of page one.  Upon clicking "Next" the record is checked for validation errors, if none it saves and if there are then the page displays those erros.  On multiple page questionnaires, I'm not sure how to grab the ID of the record created on page one so it can be updated with the responses from questions located on page 2.

 

Here is the code I am using:

public PageReference doSave() {

    try {

        this.ctr.Save();

    }  catch(DmlException ex){

        //this catches the errors and ensures they register on the page

        ApexPages.addMessages(ex);

    }

 

 

    //if there's an error message, perform a refresh

    // if not, redirect to google.com

    if (ApexPages.hasMessages()) {

        return null;

    } else {

        return new PageReference('url of page 2');   

    }

}

 

 

Any ideas?

I am invoking an approval process in an after update trigger which results in bunch of runtime errors. The approval process works flawlessly when submitted through default "Submit for Approval" button

 

below is my trigger code and the run time error messages 

 

trigger Approval_Process on SPA__c (after update){

for(SPA__c sp: Trigger.new){

if (sp.Submit_for_Approval__c){

Approval.ProcessSubmitRequest req1 = new Approval.ProcessSubmitRequest();

req1.setComments('Submitting request for approval.');

req1.setObjectId(sp.id);

req1.setNextApproverIds(new Id[] {UserInfo.getUserId()});

//req1.setNextApproverIds='005Q0000000IFNf';

Approval.ProcessResult result = Approval.process(req1);

System.assert(result.isSuccess());

System.assertEquals('Pending', result.getInstanceStatus(), 'Instance Status'+result.getInstanceStatus());

}

}

}

 The runtime errors I get are

CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY

NO_APPLICABLE_PROCESS

 

The detailed message is below

 

Error: Invalid Data. Review all error messages below to correct your data.Apex trigger Approval_Process caused an unexpected exception, contact your administrator:

Approval_Process: execution of AfterUpdate caused by: System.DmlException: Process failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY,

Approval_Process: execution of AfterUpdate caused by: System.DmlException: Process failed. First exception on row 0; first error: NO_APPLICABLE_PROCESS, No applicable approval process found.: [] Trigger.Approval_Process: line 11, column 45: []: Trigger.Approval_Process: line 11, column 45

 

 

 

 

 

  • January 21, 2010
  • Like
  • 0
hi,
 
Help needed,
 
Requirmemts for datamigration from SQL server to Salesforce:
 
i had data in sql server database with 1 lac records.these contact records needs to be loaded  to salesforce using .net  application on button click  .
 
i developed the application and able to load the data on button click event.
 
the way in which i developed the application is onclick of a button i get all the records from salesforce and check each and every record with the record in my local database if the record exists i update the record in sales force else i create a new record.
 
this is the piece of code i use to compare the records:
 

/* Loop will compare PG suid matched with salesfoce suid*/

#region Loop will compare PG suid matched with salesfoce suid

for (i = 0; i < qr.size; i++)

{

contact = (Contact)records[i];

if (Convert.ToString(contact.SUID__c) != null)

{

if (contact.SUID__c.ToString() == str.ToString())

{

k = i;

j = 1;

strcurrentval = str.ToString();

string strcontactsuid = contact.SUID__c.ToString();

break;

}

}

else if(Convert.ToString(contact.Email) != null || Convert.ToString(contact.Email_2__c) != null )

{

if ((Convert.ToString(contact.Email) == prefemail.ToString() || Convert.ToString(contact.Email) == otheremail.ToString()) || (Convert.ToString(contact.Email_2__c) == otheremail.ToString() || Convert.ToString(contact.Email_2__c) == prefemail.ToString()))

{

k = i;

j = 1;

break;

}

}

}

#endregion

/*IF the suid of PG data matched with Salesforce data then it will update */

//dsContact.Tables[0].Columns.Add("Record Status");

if (Convert.ToString(qr.size) != "0" && j == 1)

{

here goes the update and create records to salesforce. 

}

 
the problem i face is severe performance issue.
 
 
please
 i need help on this issue.
 
Thanks in advance.
 

 
 
 
 
I have some Apex code that kicks off from the before Insert trigger for Account, conditionally updating some custom fields etc.  It appears to be working as intended when a new Account is created using the "New" button on the Account tab.

However, the same Apex does not appear to execute when Lead Conversion causes a new Account to be created.  The new Account from the converted Lead shows up fine except the fields that were supposed to be set by my Apex code were not set.

Being a newbie, before I dive into my code to try to figure out if something's wrong with it, I wanted to know if this is a known gotcha.  I.e., should the before insert trigger for Account be kicked off for a new Account from lead conversion in the same way as if the same Account data were entered manually via the "New" button?

(If not, any suggestions for a simple, maintainable workaround?)

I put a debug statement into the Apex method called by the before insert trigger, and unless I am not reading it correctly, it appears to be logged when the "New" button is used to create the Account but not when lead conversion is used to implicitly create the Account.

In this case, the development and testing is occurring on a Sandbox instance (logging in from tapp0.salesforce.com).

Thanks in advance.

T