• Siddharth
  • NEWBIE
  • 25 Points
  • Member since 2005

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 36
    Questions
  • 21
    Replies

I have a page which queries to data from a customer table. This is then displayed in a pageblocktable in a pageblock with many row.

 

I want to have (if possible) a pageblock that will display the details of a record based on a record being selected 'onclick' but I can't seem to figure out how to rerender the pageblock based on clicking an item in the pageblocktable. I have tried using the actionSupport but this doesn't see to work inside the pageblocktable?

 

Any help is appreciated.

Hi,

 

My query "Select l.Owner.ManagerId, l.OwnerId, l.Name From Lead l" is not giving me any results. I have tried using eclipse, SForce explorer and even th debugger, but it returns "No such column 'ManagerId' on entity 'Name'." I am able to access all other fields from the User object.

 

Can someone confirm me if this is a bug or whether this field is not accessible.

 

Thanking you in anticipation

 

Siddharth

Hi All,

I am trying to integrate public sites to show data from google blogs, but the issue is that everytime I fetch data I am asked to provide access to gdata API. I am using Google toolkit and AuthSub authentication process. Also I want this authentication process to be hidden from end user and should actually be once. Is there a API where i can send google signing credentials in URL and that returns me token to access my data anytime.

 

Thanks

Siddharth

Hi All,

 

Is there a way to delete all the data from Salesforce production accounts with using data loader. I am looking for a button or a link in salesforce to perform this action.

 

Thanks

Siddharth

We have a managed package which uses FLEX, can some tell me how to set the value for ClientId in Flex in SOAP Header.

 

Thanks

Siddharth

Astadia

We have installed a force.com package in sandbox environment using the system admin profile. While installation we turned off the apex warning and configured field level security. It installed smoothly but for system admin profile client is not getting access to all the apex classes.

 

When we go to profile and try to edit and add apex class access it doesnot show all the classes there, its only one apex class that has got access out of 20 classes. However i can see all the classes available under develeopement -> Apex Class section.

 

Any idea why this is happening as it is only for this install or is it some issue with spring 09 release because for all other instances it worked fine.

 

Thanks

Siddharth

All,

We are facing issues with the deployment of Dashboards through the manages package. 

We have components in one of our Dashboard that display the Top and Bottom 5 rows with certain value e.g. Top 5 Campaigns with Max ROI. 

Issue #1: Dashboard component setting not set during New Package InstallationWhen this Dashboard is deployed in a freash SF instance through a Managed Package, all components are displayed but the setting in "Maximum Values Displayed" field of the Components is not reflected. This results in all records getting displayed in the Component (instead of Top '5'). 

Issue #2: Dashboard changes not reflected in Package UpgradeIt appears that when we install a managed package upgrade, we do not get the benefit of the new components in a Dashboard. We have a managed application installed in our SF instance and when an upgrade to the Package was released, Dashboard changes (new components, deleted components and changed components) didn't reflect even though the supporting custom reports got deployed. We have tired installing the package upgrade in 3 different instances, but the issue persists. 

Please suggest the possible root cause and if this is a know issue with Package installation. Thanks.

 

Thanks

Siddharth

Message Edited by Siddharth on 01-27-2009 03:08 PM
Is there a way in salesforce to hide Visualforce Code and SControls when creating a package. I want them to be part of package but should be private and not visible to users.

Thanks
Siddharth
Guys,
 
We have a visualforce page and we are adding support for multi-currency feature. In visualforce if you access the field directly on the page then it formats the field as per its data type, but if we use wrappers to display field values then it doesn't format the field directly and I am forced to write code to get the correct currency code from the record level.
 
Is there any other way to do it more efficiently. Also will I be required to create separate package for single/multi currency enabled orgs.
 
Please suggest
Thanks
 
Siddharth
I want a JS validation on my Visualforce page before i call ActionSupport, but it seems this is not possible below is the snippet, can someone point out if I am doing something incorrect here.
 

<apex:selectList id="PeriodOptions" value="{!PeriodOptions}" size="1" onclick="return ValidateShowAll();">

<apex:selectOption itemValue="1" itemLabel="This Month" />

<apex:selectOption itemValue="2" itemLabel="Last Month" />

<apex:selectOption itemValue="3" itemLabel="Last Year" />

<apex:actionSupport action="{!FilterCampaigns}" event="onchange" rerender="MainPanel">

</apex:actionSupport>

 

If I remove my javascript my action support functions good, but I need to validate my page before invoking this. Other possibility could have been if i can use AJAX call from javascriot but i need to rebind my panel with updated data.

Can some some one help me out.

 

Thanks

Siddharth

Hi,
 
On my VF page i have a Dropdownlist and a PageBlockTable section and I am building OutputLink in PageBlockTable. I need, that when ever user clicks on the link, whatever value is presently selected in dropdownlist should be added as a parameter to my URL for the new VF page.
 
My Dropdownlist is populating at runtime as below:

<apex:selectList id="type" value="{!ROIOptions}" size="1" >

           <apex:selectOptions value="{!ROIFieldValues}"/>

</apex:selectList>

I tried using <apex:param> tag but no luck with that. Is this possible.
 

<apex:pageBlockTable value="{!Campaigns}" var="cmp">

      <apex:column width="10%">

           <apex:outputLink value="/apex/Marketing_Campaign?pcnt=0&id={!cmp.Id}">{!cmp.ExtnName}

                <apex:param value="{!ROIOptions}" name="mode" ></apex:param>

            </apex:outputLink>

      </apex:column>

Using above stuff just adds parameter name but no value is assigned. Suggestion??
 
 
Thanks
Siddharth 
All,
 
I am building a productized solution but just wanted to confirm that whether the field ids highlighted below
 
https://na2.salesforce.com/a05/e?CF00N40000001Sy0Q=Dreamforce+%2708&CF00N40000001Sy0Q_lkid=a0240000004Nx5
 
remains same when the application is downloaded in other instance as a package or does it gets changed. Do they continue to refer to the same reference fields. I need to pass the values of reference object in querystring so that it fills a the reference fields when creating a new record in salesforce.
 
If this gets changed then can someone provide suggestions on how to fetch field Ids for reference field on a page.
 
Thanks
Siddharth
Hello,
 
I have written an apex class which has function called getCampaigns(). This functions executes parameterized queries and returns a wrapper list.
 
On my Visualforce page i have a search panel which filter the campaigns based on Dates and other criterias. When i click on the command button to execute this function in the SystemLog i could see it executing 2-3 times and also it doesnot maintain the new dates in text boxes after postback.
 
Below is a small snippet from the code:
 
private Integer FitlerStatus;
private Integer IsPostBack = 1;
WrapperCalender[] wrapExtn;
public PageReference GetAllData()
{
 MonthSDate = '';
 MonthEDate = '';
 MonthStartDate = null;
 MonthEndDate = null;
 
 this.FitlerStatus = 1;
 IsPostBack = 4;
 wrapExtn = getCampaigns();
 return null;
}
public WrapperCalender[] getCampaigns()
{
 if (IsPostBack == 2 && FitlerStatus == 0)
 {  
  cmpList = [Select c.StartDate,c.EndDate,c.Id, (Select id, Name, Budget_Status__c From CMOExtensions__r) from Campaign c
   where IsActive = true and startdate >=: MonthStartDate and startdate <=: MonthEndDate 
   and startdate != null order by c.StartDate asc];
 }
 else
 {
  if (IsPostBack == 3)
  {      
   cmpList = [Select c.StartDate,c.EndDate,c.Id, (Select id, Name, Budget_Status__c From CMOExtensions__r) from Campaign c
    where IsActive = true and startdate >=: MonthStartDate and enddate <=: MonthEndDate
    and startdate != null order by c.StartDate asc];
      
  }
  if (IsPostBack == 4)
  {   
   cmpList = [Select c.StartDate,c.EndDate,c.Id, (Select id, Name, Budget_Status__c From CMOExtensions__r) from Campaign c
    where IsActive = true and startdate != null order by c.StartDate asc];
  }
 }
 
 wrapExtn = new WrapperCalender[cmpList.size()];
 
 if(cmpList !=null && cmpList.size()>0)
 {
  //
 }
}
 
So now when i access GetAllData() on command button click then all the 3 scenarios gets executed. Can someone prove help or suggestion, that would be appreciated.
 
thanks in advance
Siddharth
Hi All,
 
I am trying to put a validation on a custom object which has a lookup to both Opportunity and Accounts. So when I save the record, can I apply a validation rule to check that whether the selected Opportunity.Account and selected Account are same or not. Because i want to restrict a user from selecting an opportunity that belong to a different account, than seleted one. If someone can provide a sample formula of this kind it would be of great help.
 
Thanks
Siddharth
All,
 
Can we have querymore in APEX. I have around 1200 records which needs to be displayed at one go and I as read there is a limitation for 1000 records in APEX queries. So is there anything of QueryMore sort in APEX, or if not is it possible to achieve this.
 
Thanks
Siddharth
Hi All,
 
Is there a way to use a describe call in APEX class. Example if I need to describe accounts object and get back all the detail the same way as we do with API.
 
Other ways, how can I retieve values for a pickilist using APEX class.
 
Thanks
Sidd
Hi All,
 
Is it possible to send invoke APEX class using API call, which means that using SOSL I query the APEX objects and then trigger that APEX call and perform the desired functionlity.
 
Thanks
 
Friends,
 
I have created a simple APEX class with a function named HELLO() which accepts a string, searched in accounts for name starting with that string and returns a count in string format. I have generated it as a Web Method so that I can use this in .Net. I further generated a WSDL file from it and tried to use it ASP.NET.
 
After creating an instance of my web service, i get the Hello method accessible, but how do I set the login credentials for my APEX call. It says invalid session Id. Snippet from ASP.Net code.
 

protected void Page_Load(object sender, EventArgs e)

{

Test.HelloWorld2Service obj = new CellsMerge.Test.HelloWorld2Service();

string a = obj.Hello("s");

}

 

Any suggestions as how can we achieve this functionality.

Siddharth

Friends,
 
I have created a simple APEX class with a function named HELLO() which accepts a string, searched in accounts for name starting with that string and returns a count in string format. I have generated it as a Web Method so that I can use this in .Net. I further generated a WSDL file from it and tried to use it ASP.NET.
 
After creating an instance of my web service, i get the Hello method accessible, but how do I set the login credentials for my APEX call. It says invalid session Id. Snippet from ASP.Net code.
 

protected void Page_Load(object sender, EventArgs e)

{

Test.HelloWorld2Service obj = new CellsMerge.Test.HelloWorld2Service();

string a = obj.Hello("s");

}

 

Any suggestions as how can we achieve this functionality.

Siddharth

Hi,
 
I have 2 custom fields in both lead and contact like
 
Field 1 - Checkbox (default is unchecked)
Field 2 - Text
 
I have defined the lead conversion mapping where :
 
Field 1 in leads maps to Field 1 in contacts and,
Field 2 in leads maps to Field 2 in contacts
 
The problem I am facing is that upon conversion, even after mapping has been defined, the value of field 1 is not carried over to contact where value for field 2 is successfully transfered. Is it a limitation from salesforces' end that only selected field type value will be transfered to account/contact upon lead conversion.
 
Although i can move the value using the API but I wish to do it as an automated process, where salesforce does it on its own.
 
Thanking you in anticipation
 
Siddharth

I have a page which queries to data from a customer table. This is then displayed in a pageblocktable in a pageblock with many row.

 

I want to have (if possible) a pageblock that will display the details of a record based on a record being selected 'onclick' but I can't seem to figure out how to rerender the pageblock based on clicking an item in the pageblocktable. I have tried using the actionSupport but this doesn't see to work inside the pageblocktable?

 

Any help is appreciated.

I have a before trigger that calls this class which auto assigns the region and the ownerid to the account based on the recordtype, state and zip of the region object. the region object holds all the assignments. It works great but when I execute a batch load through data laoder I hit too many script statements 200001 error. any way i can fix?

 

 

public with sharing class AccountUtilities
{
public static void acctAssign(List<Account> aList)
{
List<region__c> rList = [select id, zip_start__c, zip_end__c, state__c,sales_user__c, business_unit__c, recordTypeId from region__c];
Map<Id,RecordType> rtMap = new Map<Id,RecordType>([Select id,Name from RecordType where sObjectType IN ('Account','region__c')]);
for(Account a:aList)
{
try
{
for(integer i= 0; i< rList.size(); i++)
{
String billingPostalCode= String.valueOf(a.BillingPostalCode);
if(a.billingstate== rList.get(i).state__c && a.Protected__c != true && rtMap.get(a.recordtypeid).Name == rtMap.get(rList.get(i).recordtypeid).Name && a.business_unit__c == tList.get(i).business_unit__c)
{
if(a.billingPostalCode >= rList.get(i).zip_start__c && a.billingPostalCode<=rList.get(i).zip_end__c || rList.get(i).zip_start__c ==null && rList.get(i).zip_end__c ==null )
{
a.region__c = rList.get(i).id;
a.OwnerId = rList.get(i).sales_user__c;
}
}
}
}
catch (System.Exception e)
{
// process exception
}

}
}



Has anyone created a code for this? We would like to create a new field that returns the last time a lead, or contact, was called. The problem with the "last activity" field is that it includes mass emails which doesn't really help us. Figure we need to use Apex code to query the type of activity etc. and bring back the date of the last phone call. 

  • November 29, 2012
  • Like
  • 0

Hi,

 

My query "Select l.Owner.ManagerId, l.OwnerId, l.Name From Lead l" is not giving me any results. I have tried using eclipse, SForce explorer and even th debugger, but it returns "No such column 'ManagerId' on entity 'Name'." I am able to access all other fields from the User object.

 

Can someone confirm me if this is a bug or whether this field is not accessible.

 

Thanking you in anticipation

 

Siddharth

We have a managed package which uses FLEX, can some tell me how to set the value for ClientId in Flex in SOAP Header.

 

Thanks

Siddharth

Astadia

Is there a way in salesforce to hide Visualforce Code and SControls when creating a package. I want them to be part of package but should be private and not visible to users.

Thanks
Siddharth
Hello,
 
I have written an apex class which has function called getCampaigns(). This functions executes parameterized queries and returns a wrapper list.
 
On my Visualforce page i have a search panel which filter the campaigns based on Dates and other criterias. When i click on the command button to execute this function in the SystemLog i could see it executing 2-3 times and also it doesnot maintain the new dates in text boxes after postback.
 
Below is a small snippet from the code:
 
private Integer FitlerStatus;
private Integer IsPostBack = 1;
WrapperCalender[] wrapExtn;
public PageReference GetAllData()
{
 MonthSDate = '';
 MonthEDate = '';
 MonthStartDate = null;
 MonthEndDate = null;
 
 this.FitlerStatus = 1;
 IsPostBack = 4;
 wrapExtn = getCampaigns();
 return null;
}
public WrapperCalender[] getCampaigns()
{
 if (IsPostBack == 2 && FitlerStatus == 0)
 {  
  cmpList = [Select c.StartDate,c.EndDate,c.Id, (Select id, Name, Budget_Status__c From CMOExtensions__r) from Campaign c
   where IsActive = true and startdate >=: MonthStartDate and startdate <=: MonthEndDate 
   and startdate != null order by c.StartDate asc];
 }
 else
 {
  if (IsPostBack == 3)
  {      
   cmpList = [Select c.StartDate,c.EndDate,c.Id, (Select id, Name, Budget_Status__c From CMOExtensions__r) from Campaign c
    where IsActive = true and startdate >=: MonthStartDate and enddate <=: MonthEndDate
    and startdate != null order by c.StartDate asc];
      
  }
  if (IsPostBack == 4)
  {   
   cmpList = [Select c.StartDate,c.EndDate,c.Id, (Select id, Name, Budget_Status__c From CMOExtensions__r) from Campaign c
    where IsActive = true and startdate != null order by c.StartDate asc];
  }
 }
 
 wrapExtn = new WrapperCalender[cmpList.size()];
 
 if(cmpList !=null && cmpList.size()>0)
 {
  //
 }
}
 
So now when i access GetAllData() on command button click then all the 3 scenarios gets executed. Can someone prove help or suggestion, that would be appreciated.
 
thanks in advance
Siddharth
Hi

I assume this is simple enough, but don't want to waste time figuring it out.  I'm trying to render the Name of a Record as a link to the Record in a column of a pageBlockTable.

I'm using this syntax currently:

Code:
<apex:column headerValue="Name">
      <apex:outputLink value="{!lead.Id}">{!lead.Name}</apex:outputLink>
</apex:column>

 Supposing I'm on a na2.salesforce.com, this will output the link as https://na2.salesforce.com/apex/00Q4000000HA9xUEAT.  Obviously I don't want the /apex/ in the URL.  I know I want to use the current server as the value in outputLink and the Record ID as a param, but how do I merge in the URL of the current server?

Thanks!
Hi
I use toolbar ,toolbar group , but i got only green color.
How can i change toolbar color. and i also wants links are in white colors.
I attach my code.please give me suggestions & if possible then give me a sample code.
 
 
<apex:toolbar id="theToolbar" styleClass="pbTitle">
               
               
              
                <apex:toolbarGroup itemSeparator="line" location="left" id="toobarGroupForm2">
                              
                              
                              <apex:outputLink value="/apex/DashBoard" id="myPage" target="theIframe" >My Page</apex:outputLink>
                                <apex:outputLink value="/apex/DashBoard1" id="DashBoard1" target="theIframe" >DashBoard1</apex:outputLink>
                                <apex:outputLink value="/apex/Program_Setup" id="Program_Setup"  target="theIframe">Program Setup</apex:outputLink>
                                <apex:outputLink value="/apex/Forecasting" id="Forecasting"  target="theIframe">Forecasting</apex:outputLink>
                                <apex:outputLink value="/apex/Inventory_Management" id="Inventory_Management"  target="theIframe">Inventory Management</apex:outputLink>
                                <apex:outputLink value="/apex/Store_Performance" id="Store_Performance"  target="theIframe">Store Performance</apex:outputLink>
                              
                       
                </apex:toolbarGroup>
  </apex:toolbar>
 
 
 
Thanks & Regards
Brijesh Baser
Hi,
 
I am creating a SOQL query where the field name and the field value in where clause, both comes dynamically. Eg:
 
something like:
 
String fieldname = 'Name';
Account account = [Select Id from Acocunt where :fieldname like 'ABC'];
 
This doesnt works :(
 
Can anyone please advise, how can i get this query?
 
Thanks
[GM]
 
  • March 07, 2008
  • Like
  • 0
Friends,
 
I have created a simple APEX class with a function named HELLO() which accepts a string, searched in accounts for name starting with that string and returns a count in string format. I have generated it as a Web Method so that I can use this in .Net. I further generated a WSDL file from it and tried to use it ASP.NET.
 
After creating an instance of my web service, i get the Hello method accessible, but how do I set the login credentials for my APEX call. It says invalid session Id. Snippet from ASP.Net code.
 

protected void Page_Load(object sender, EventArgs e)

{

Test.HelloWorld2Service obj = new CellsMerge.Test.HelloWorld2Service();

string a = obj.Hello("s");

}

 

Any suggestions as how can we achieve this functionality.

Siddharth

"2007-10-29T10:38:36.000Z" how to convert this into datetime format for c#
 
amit@varstreet.com
We have created an external .NET app that logs into our SalesForce.com account and retrieves corresponding contact data, which is then used to email out company-specific messages. The app works fine, but now we would like to update our SalesForce.com account with a record of those email postings.
 
Accordingly, it seems like we need to create "completed" tasks that are assigned to each contact that has been emailed. I've written the following test code in .NET just to see if I can create task objects in SalesForce:
 

Dim sForceService As New sforce.SforceService
sForceService.Url = mSessionURL
sForceService.SessionHeaderValue =
New sforce.SessionHeader
sForceService.SessionHeaderValue.sessionId = mSessionID
Dim taskArray(0) As sforce.sObject
Dim sTask As sforce.Task = New sforce.Task
sTask.CreatedById = mUserID
sTask.OwnerId = mRecipientID
sTask.ActivityDate = DateTime.Now
sTask.Description =
"Test Description"
sTask.Priority = "Normal"
sTask.Status = "Completed"
sTask.Subject = "Email: Test Email"
taskArray(0) = sTask
Dim sr() As sforce.SaveResult = sForceService.create(taskArray)

When I try to run the code in Visual Studio's Debug mode, everything seems to work fine until it gets to the very last line above; when the Dim sr() As sforce.SaveResult = sForceService.create(taskArray) code executes, I get the following error: "Unable to automatically step into the server. Connecting to the server machine "na2-api.salesforce.com" failed. The format of the specified network name is invalid."

I've tried researching this error and verifying that what I'm trying to do is valid, but I can't find any answers. Has anyone tried creating their own task objects before? Note that I'm presuming that the same SalesForce server is used to create new objects as well as read existing company data. All help is appreciated.

Hi Community,
 
 I am unable to select ParentId from case using outbound message. In Notification function i am getting 8.0 Server URL which through following exception while executing outbound message: -
"INVALID_FIELD: No such column 'ParentId' on entity 'Case'. If you are attempting to use a custom field, be sure to append the '_"
 
Thanks! I would appreciate any solution or suggestions.
 
 
I am Trying to insert a field with null but i am getting error of Dupliacte record ,Using API 8.0
 
 
Hi
I am trying to use sfdc AJAX 8.0 with .net 2005. Can anyone help me out inorder to how should i use it. I have used the
following script tag and has included the same in the aspx page as below:
 
<script src="https://na1.salesforce.com/soap/ajax/8.0/connection.js" type="text/javascript"></script>
 
Also inorder to test the ajax utlity i have added the following code in the <Head> tag.
 
<script type="text/javascript">
        function setup()
        {
            var callback = {onSuccess: display, onFailure: failed};
            var lr = sforce.connection.login(Username,password);
            var userInfo = sforce.connection.getUserInfo(callback);
        }
        function display(userInfo) {
            var doc = document.getElementById("name-span");
            doc.innerHTML = userInfo.userName;
        }
        function failed(error) {
            document.getElementById("name-span").innerHTML =
               error.toString();
        }
      </script>
 
In the body i have called the setup function as below
 
<body onload="setup()">
     Hi there! <span id="name-span"></span>
    <form id="form1" runat="server">
    <div>
       
    </div>
    </form>
</body>

This what i have found on one of the samples on community, but it doesn't seems to be working. Please help me out as how should i make use of AJAX. Also is there any way where we can call this from a simple HTML page. Do we need API support to use AJAX or is it the reference script that will make it all. Any suggestion and help would be appreciated.

Hi,

We are facing a problem in updating Sales Price for an Opportunity Line Item.

As per the API document the label Sales Price on the screen represents field Unit Price in Opportunity Line Item Object.(Is this correct??)

We are making an API call to update a few custom fields along with Unit Price. Other Fields are getting updated but Unit Price is not getting updated. Our objective is to set Sales Price to a value equal to value of a Custom Field.

Is there some catch into it that we are missing?

Any help would be appreciated.

Hi,

 There is a problem in getting the dates. I update the Opportunity table and insert the ADI_Last_Calculated_date as the Server Timestamp and at the same time SalesForce updates the last modified date for the opportunity. So there is difference in the Time. Can anyone suggest why is it so? I have tried using different date formats.

***********************************Function Description*********************************

Public Function updateRevenueToOpportunity(ByVal ID As String, ByVal Opp_ExpTotalValue As Integer, ByVal Opp_TotalValue As Integer, ByVal Opp_PeakAnnualValue As Integer, ByVal Opp_ExpPeakAnnualValue As Integer)

Dim saveResults() As SaveResult

Dim updateOpp As sObject = New sObject

Dim ilength = 0, iError As Integer = 0

Dim xElemnt(6) As System.Xml.XmlElement

Dim Doc As New System.Xml.XmlDocument

Try

xElemnt(0) = Doc.CreateElement("ADI_Expected_Total_Amount__c")

xElemnt(0).InnerText = Opp_ExpTotalValue

xElemnt(1) = Doc.CreateElement("ADI_Total_Amount__c")

xElemnt(1).InnerText = Opp_TotalValue

xElemnt(2) = Doc.CreateElement("ADI_Peak_Annual_Amount__c")

xElemnt(2).InnerText = Opp_PeakAnnualValue

xElemnt(3) = Doc.CreateElement("ADI_Expected_Peak_Annual_Amount__c")

xElemnt(3).InnerText = Opp_ExpPeakAnnualValue

xElemnt(4) = Doc.CreateElement("ADI_Last_Calculated_Date__c")

xElemnt(4).InnerText = Replace(Format(objService.getServerTimestamp.timestamp, "yyyy-MM-ddThh:mm:ss.millisZ"), "illi", "", 1)

xElemnt(5) = Doc.CreateElement("ADI_Generate_Forecast__c")

xElemnt(5).InnerText = "False"

updateOpp.Id = ID

updateOpp.Any = xElemnt

updateOpp.type = "Opportunity"

saveResults = objService.update(New SFPartner.sObject() {updateOpp})

Dim Err As [Error]

While (ilength < saveResults.Length)

If saveResults(ilength).success Then

_Logger.LogInfo("OpportunityLineItem successfully updated with " + saveResults(ilength).id + " as the ID")

Else

While (iError < saveResults(ilength).errors.Length)

Err = saveResults(ilength).errors(iError)

_Logger.LogError("Opportunity Line Item could not be updated : '" + Err.message + "'", "updateRevenueToOpportunitylineItem")

iError = iError + 1

End While

End If

ilength = ilength + 1

End While

Catch ex As Exception

Throw New Exception("Failed to update Opportunity")

End Try

End Function

*************************************Output Result***************************************

OpportunityID - 006000000077XUuAAM  

LastModifiedDate - 5/19/2005 5:01 PM   

Name - Punit Opportunity 1 Product

ADI_Last_Calculated_date  -  5/19/2005 10:31 AM