• F.H.Kazmi
  • NEWBIE
  • 0 Points
  • Member since 2006

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 11
    Questions
  • 2
    Replies

I am trying to send a file as attachment to an Account at salesforce.com using the Java Api. The problem I am facing is that when I send a file of less then 11kb as encoded in base64 it works OK but when I send a file larger than 11K, the file is end to the server but not properly i.e. all bytes of the file are not send. Can there be any problem with the Base64 class or else. Also salesforce api requires files to be send encoded in Base64, so is there any other way to it then the one method I have used in the following code?

 

File f = new File("Abc.wav");

FileInputStream fis = new FileInputStream(f);

 

byte[] data  = new byte[f.length()];

fis.read(data);

 

String s = org.apache.axis.encoding.Base64.encode(data);

How can i create attachment using java api

trigger LeadTrigger on Lead (after insert) {
    //works dsdcc
    for (Lead lea : Trigger.New)
    {
        lea.City = 'New York';
        update lea;
    }
   
}

 

/*error when create lead error is:

There were custom validation error(s) encountered while saving the affected record(s). The first validation error encountered was "Apex trigger LeadTrigger caused an unexpected exception, contact your administrator: LeadTrigger: execution of AfterInsert caused by: System.Exception: Record is read-only: */

 

I need to create a database trigger will be configured for new lead record or update lead record is such a manner that when ever any  lead record will be inserted or updated, it will call a URL i.e. post some data to a URL. 

 

In other words I need to know how can I post any data (either through GET or POST) or call any URL when a database trigger executes. Can it be done and how??

I am using Salesforce api for Java. When I query salesforce server to get list of Users of any organization, along with the users that I had created, I also get the License Manager User. I have two questions,

1. What is the purpose of this user, and why it comes when I have not created it.
2. Is there any way to filter out this user through query.

If using salesforce API for Java we Convert a lead, the following error is returned from Salesoforce

Error: Unable to create/update fields: IsConverted. Please check the security settings of this field and verify that it is read/write for your profile.

So, which settings are needed to be set in order to make this work
Issue in Calender's event

If using salesforce API for Java we make an calender Entry Event and in it the event is scheduled to be a custom duration event i.e. not a All Day Event then the event is not saved on the date that we have passed through the API. For example if we make a All day event using salesforce Java API then the event created on salesforce.com has the same date that we had passed through API, but in case of a custom duration event the date is changed when saved in salesforce.com.
i.e. it is not that we had passed through API

If from salesforce.com portal we make an activity history and in it an event schedule is more than one day (that a event starts on a day and ends on another) then event is not fetched by using the api for Java

if we query with any of the dates of that event it is not fetched

e.g.

Select Id,Subject,ActivityDate,ActivityDateTime,CreatedDate,IsAllDayEvent,Location,Description from Event where (ActivityDate>=2008-09-11 and ActivityDate<=2008-09-13 and OwnerId = '00530000000va5aAAA') Order by ActivityDate, ActivityDateTime


we have tried different dates for (ActivityDate>=2008-09-11 and ActivityDate<=2008-09-13 ) but still result is not shown.

Even when for testing we removed the date check that record did'nt come up

e.g. Select Id,Subject,ActivityDate,ActivityDateTime,CreatedDate,IsAllDayEvent,Location,Description from Event where (OwnerId = '00530000000va5aAAA') Order by ActivityDate, ActivityDateTime

with this query also that record did'nt come up

So, we require support regarding it issue that, how such a record will be fetched where an activity history is made and in it an event schedule is more than one day (that a event starts on a day and ends on another)
If from salesforce.com portal we make an activity history and in it an event schedule is more than one day (that a event starts on a day and ends on another) then event is not fetched by using the api for Java

if we query with any of the dates of that event it is not fetched

e.g.

Select Id,Subject,ActivityDate,ActivityDateTime,CreatedDate,IsAllDayEvent,Location,Description from Event where (ActivityDate>=2008-09-11 and ActivityDate<=2008-09-13 and OwnerId = '00530000000va5aAAA') Order by ActivityDate, ActivityDateTime


we have tried different dates for (ActivityDate>=2008-09-11 and ActivityDate<=2008-09-13 ) but still result is not shown.

Even when for testing we removed the date check that record did'nt come up

e.g. Select Id,Subject,ActivityDate,ActivityDateTime,CreatedDate,IsAllDayEvent,Location,Description from Event where (OwnerId = '00530000000va5aAAA') Order by ActivityDate, ActivityDateTime

with this query also that record did'nt come up

So, we require support regarding it issue that, how such a record will be fetched where an activity history is made and in it an event schedule is more than one day (that a event starts on a day and ends on another)
I am getting problem when i switched to professional edition account..
In Lead Object, MobilePhone field is shown in Standard Fields List under setup, while it is not shown when viewing or creating Leads.

If i try to access MobilePhone of Lead via API ( using partners wsdl ), Exception Occurs saying No Such Field exists ( or Unknon Field ).

Is there any way to see wheather a logged in user is using Enterprise, professional or developers account?
Hi

We are developing AppExchange components to integrate our server with Salesforce.com.

Our existing system has users/roles and it relies heavily on this information to process data. Salesforce.com has same. I would like to be able to write code to synchronize the user/role data in our server with salesforce.com. For example if an organization signs up for our application, all their users should be registered on our server without their having to add each inidvidually.

Could this be accompalished with AppExchange API? Which objects should be queried? Is there any sample code.

Thanks for the help

Issue in Calender's event

If using salesforce API for Java we make an calender Entry Event and in it the event is scheduled to be a custom duration event i.e. not a All Day Event then the event is not saved on the date that we have passed through the API. For example if we make a All day event using salesforce Java API then the event created on salesforce.com has the same date that we had passed through API, but in case of a custom duration event the date is changed when saved in salesforce.com.
i.e. it is not that we had passed through API

If from salesforce.com portal we make an activity history and in it an event schedule is more than one day (that a event starts on a day and ends on another) then event is not fetched by using the api for Java

if we query with any of the dates of that event it is not fetched

e.g.

Select Id,Subject,ActivityDate,ActivityDateTime,CreatedDate,IsAllDayEvent,Location,Description from Event where (ActivityDate>=2008-09-11 and ActivityDate<=2008-09-13 and OwnerId = '00530000000va5aAAA') Order by ActivityDate, ActivityDateTime


we have tried different dates for (ActivityDate>=2008-09-11 and ActivityDate<=2008-09-13 ) but still result is not shown.

Even when for testing we removed the date check that record did'nt come up

e.g. Select Id,Subject,ActivityDate,ActivityDateTime,CreatedDate,IsAllDayEvent,Location,Description from Event where (OwnerId = '00530000000va5aAAA') Order by ActivityDate, ActivityDateTime

with this query also that record did'nt come up

So, we require support regarding it issue that, how such a record will be fetched where an activity history is made and in it an event schedule is more than one day (that a event starts on a day and ends on another)