• Rakesh E
  • NEWBIE
  • 25 Points
  • Member since 2012
  • Module Lead
  • Persistent Systems Ltd

  • Chatter
    Feed
  • 1
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 53
    Questions
  • 31
    Replies

Hi,

 

i wrote a Custom Web Service in Salesforce to acceprt Base64 encoded files (PDF/Text) and store them as Attachments.

it worked fine. But the other integration partner has changed the format to "Binary" and my code is not working now.

 

so is there any way to store the files which are received in binary format in an attachment.

i heard that we can store binary format also, but unable to find out the exact process.

please let me know if anyone has idea about this.

 

thanks in advance

 

Regards,

Rakesh

 

Hi,

 

i am trying to post/create a new pdf Document record in salesforce Document object from one org to other using REST API.

i am querying the BLOB data from one Document record from soure org and preparing a POST request and trying to post it in other org .

i am using EncodingUtil.base64Encode(Sourcedocument.body) to send the pdf file.

 

but this file is not getting saved correctly and unabel to open the PDF (getting error : File not start with %PDF). its getting corrupted

 

what is the mistake i am doing please let me know. is the way i am sending the binary data is wrong ?

please let me know if anyone have idea about this

 

Thank you

 

Regards,

Rakesh

hi ,

 

 

can anyone please explain me what is the difference between the <apex:commandbutton> and <apex:commandlink> in terms of its execution,rather than what HTML components they generate when used.

 

my understanding in terms of the HTML elements that are generated

 

<apex:commanbutton> : input element of type "submit"

<apex:commandlink> :  an <a> tag with autogenerated JS which handles "submit"

 

please let me know other diffenreces

 

Regards,

Rakesh

Hi ,

 

i am using a VF page as a content provider for our JQGrid. we are unable to get the JSON data for the gird when loading this page. 

we are getting a "Time out Error" in client org. the same page is working n our sandbox. the codes and number of records that we are returning as the JSON reponse is same in both cases,but not sure why it is not working. below is the error i ma getting in the response

 

NetworkError: 500 Server Error

 

Time limit exceeded

Your request exceeded the time limit for processing.

 

please let me know if there is any specific reason for this error. i am preparing the JSON string in the in the constructor flow itself, by accessing different page parameters according to our requirement.

 

any help is appreciated.

 

Regards,

Rakesh

Hi ,

 

i have a question/ probably small confusion regarding how Workflow tasks are assigned to a user when we select a "Role" in Assigned to section, in following scenarios

 

 1. if the role has multiple users assigned to it ( my answer is  "The task is assigned to the user who triggered the

                                                                                          workflow rule" ).

  2.if the role has No user assigned to it (my answer is "The Task is assigned to the record owner" )

 

is there any change in this behavior with new releases

 

please correct me if i am wrong 

Hi,

 

i am inserting a PDF document in "Document" object. i will get the body of the pdf from an API call. the document is getting inserted correctly in the documents. but when i try to view the file its just displaying "Empty PDF" without any content.

 

where as the in other sandbox i am able to view the pdf content correctly. the code which i am using to store the document is same in both the orgs.

 

one thing i observed is the same pdf document has varying sizes in two orgs.

 

please let mw know what could be the probelm for this. i have delivery today and suddenly came aross this issue, earlier i didnt face this issue.

 

is it anything related to "Document Content Searchable" check box whih i am seeing in document detail page. 

it is checked by defalult in the sandbox where i am able to view the pdf correctly, but unchecked in the org wher i am unable to view the pdf.

 

any help will be appreciated.

 

Regards,

Rakesh

 

 

 

Hi,

 

actually i have a Apex controller which is huge and which has many scenarios with more SOQL queries. when i write test cases in a single test class to test all the scenarios i am getting "Too Many SOQL quiries limit exception". i dont know why salesforce treats all test methods in a single class as a single transaction. 

 

so to compensate this i am thinking of writing another test class to test some scenarios. will this work correctly. is this approach a good practice?

 

please let me know if anyone faced same problem in test classes. help me to solve the problem.

 

Regards,

Rakesh

Hi ,

 

i am unable to upload package from my developer org. we created and uploaded managed packages in this org eralier lot of times.

but now we are observing "Test Case Execution" delays while uploading the package and it is almost 24 hours that the package uploading is still in progress. i am not sure what could be the reason for this. 

 

i am observing same "Test Case Execution" delays in other developer orgs, when i try to execute test classes. i know there is a limit on number of times we an execute test cases in a single day, but i am sure that i didnt reach that limit.

 

 

please help me if anyone has any idea about this problem. my client is waiting for package.

 

Regards,

Rakesh

Hi ,

 

i wrote a query which has an inner query in it to get the child records.

 

i will give an example with standard objects

 

Account acc = [select name,(select firtsname,lastname from Contact) from account limit 1];

 

i am using this "acc" varibale in VF page to display the contact records.

 

<apex:page>

<apex:repeat value="{!acc.contacts}" var="contact" >

 

<apex:outputtext value="{!contact.firstname}"/>

<apex:outputtext value="{!contact.lastname}"/>

</apex:repeat>

 

i have around 130 contacts, but iam getting below error message when i try to open the VF page to view the results.

 

"Aggregate query has too many rows for direct assignment, use FOR loop "

 

please let me know if anyone faced this issue earlier. what is the limit of number of rows in aggregate query.

is ithis is the correct way to get this done.

 

actually in my query there are around 15 inner object queries. that is my parent object has 15 childs.

 

any help would be appreciated

 

thanks in advance

 

Regards,

Rakesh

 

 

 

Hi ,

 

i have a custom object in which i have made the standard name field as "Auto Number". but when i am trying to insert a record through Apex its giving me an error saying that the required field Name is missing.

  

  • Request  Number: Required fields are missing: [Name]
  • Error Occured - Insert failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Required fields are missing: [Name]: [Name]

i have created a managed package in this org , which added a namespace to every API name (however standard fields dont have namespace pre-pended to them)

 

 

please let me know what could be the problem. to my surprise the same is working correctly in another org. that only difference is that in the other org there is no namespace defined. is the namespace creating problem

 

thanks in advance 

 

Regards,

Rakesh

 

 

 

Hi ,

 

iam facing an error as

 

Error: action="{!bumpContacts}": Unknown method 'ContactStandardController.bumpContacts()'

 

 same error iam getting even for deleteContacts() method

 

my visualForce page is 

 

<apex:page standardController="Contact" extensions="ContactController" recordSetVar="contacts" action="{!bumpContacts}">
<apex:form >
<apex:pageBlock title="Bump Selected Contacts">
<apex:pageBlockButtons >
<apex:commandButton action="{!deleteContacts}" value="Confirm"/>
</apex:pageBlockButtons>
<apex:pageBlockTable value="{!selected}" var="cntct">
<apex:column value="{!cntct.firstname}"/>
<apex:column value="{!cntct.lastname}"/>
<apex:column value="{!cntct.email}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>

 

and controller extension is

 

public  class ContactController 
{
    private ApexPages.StandardSetController standardController;
    public List<Contact> selectedContacts;

    public ContactController(ApexPages.StandardSetController standardController)
    {
        this.standardController = standardController;
    }

    public PageReference bumpContacts()
    {       
        // Get the selected records (optional, you can use getSelected to obtain ID's and do your own SOQL)
         selectedContacts = (List<Contact>) standardController.getSelected();

        return null;        
    }

    public PageReference deleteContacts()
    {       
        // Call StandardSetController 'save' method to update (optional, you can use your own DML)
        //return standardController.save();   
        try{
        
        delete selectedContacts ;
        }catch(system.exception ex){
        system.debug('exception occured ' + ex.getmessage());
        }
        return null;
    }
}

 

please let me know why the error is and if i did any mistake.

 

Regards,

Rakesh

HI,

 

 

i have a Dev 401 certification exam voucher which has a code. when i go to webaccessor login and register for Dev 401 exam i didnt find any option to enter/use this voucher code. please let me know hoe an i use this voucher.

 

Regards,

Rakesh

Hi,

 

i am using streaming API for one of our usecase. but when i login as a customer portal user i am unbale to access this puchtopic events. i am getting an error saying

 

[{"channel":"/meta/subscribe","clientId":"q1vf4zlptf4e3m1jk9pzxrlx4mn","error":"403::User not enabled for streaming","successful":false,"id":"2","subscription":"/topic/ExportToExcelPushTopic"}]

 

 

when i searched for that i have seen that we have to enable "View All Data" permission to that user profile. but when i went to the customer portal profile i didnt find that checkbox in the general user permissions section for the portal profile.

 

please let me know how i can handle this.

 

thanks in advance

 

Regards,

Rakesh

Hi,

 

i amfaing this error when i try to do an UPSERT call.

 

ny external ID field is "DossierToSFID__c "

 

i am using upsert as below

 

   upsert recordList DossierToSFID__c ;

 

and i am getting the above error . please let me know if anyone faced this problem earlier.

i am stuck with my work due to this.

 

thank in advance

 

Regards,

Rakesh

Hi,

 

i have created a full sandbox from my production org. as we know record IDs are identical in both these orgs for records that are migrated from production org. so whenever i update a record in my production , the same updation is not happening in sandbox. i thought as the record ids are same both records(sandbox and production) are pointing to same data in the backend , but it is not.

 

so please let me know how salesforce maintains this and why the record IDs are same(is there any specifi reason for that)

 

 

thanks in advance

 

Regards,

Rakesh

Hi,

 

i have a pagination requirement for huge records, using standardSetController and OFFSET feature its not possible to handle more than 10000 records.

 

so i am just thinking of whether we can use the query() and querymore() methods to achieve that.

 

please tell me whatever possiblity to handle pagination for huge set (say 2 lakhs) of records

 

thanks in advance

 

Regards,

Rakesh

Hi,

 

i have commandLink in my VF page(page1). in its action a controller method is called which redirects it to a new page(page2).

whan i just simply click on the link its going to page2.

but when i right clik on the link and say either  open in new tab/ open in new window its again showing me page1 instead of page2.

 

please let mw know what is the problem. is it becuase of commandlink. let me know if there is any sloution or work around for this.

 

thanks in advance

 

Regards,

Rakesh

Hi,

 

we have a requirement where we wrote a "After Upade" trigger on a object. we have an Approval Process defined for this object.

one step in this process is Field update.so when the field is updated in this step , this will fire  the trigger. we are doing some changes for the record in trigger whcih is an update operation. this is giving an error saying the 

"Record is read only, you annot do update operation"

 

we understood that is due to the "Record Locking" feature of approval process. that is after submission the record is locked from editing. but how can we accomplish our requirement.

 

any idea/work around will be great helpful

 

Thanks in advance

 

Regards

Rakesh

Hi,

 

i have a field which is not visible to my profile in field level security.

so i am unable to view this value in the VF page.

 

but my confusion is when i go to backend and check in debug logs i am able to view those value there. 

just want to understand how this visibility is handled in salesforce.

 

please reply me if anyone has idea about this

 

Thank you

 

Regards

Rakesh

 

Hi, 

 

i came accross the statment :

 

If a custom object is a detail or subdetail component in a master-detail relationship, it can't also be the master of a different master-detail relationship.

 

saying that a detail object cannot be a master in another M-D relationship.

 

but iam able to create 4-level M-D relationship as explainde below.

 

object1 > object2 > object3 > object4

 

where object2, object3 and object4 are on master side and object1,object2 and object3 are on detail side.

 

please let me know what is the actual meaning of the statement. am i interpreting it in a wrong way.

 

Regards

Rakesh

Hi,

 

i wrote a Custom Web Service in Salesforce to acceprt Base64 encoded files (PDF/Text) and store them as Attachments.

it worked fine. But the other integration partner has changed the format to "Binary" and my code is not working now.

 

so is there any way to store the files which are received in binary format in an attachment.

i heard that we can store binary format also, but unable to find out the exact process.

please let me know if anyone has idea about this.

 

thanks in advance

 

Regards,

Rakesh

 

HI,

 

 

i have a Dev 401 certification exam voucher which has a code. when i go to webaccessor login and register for Dev 401 exam i didnt find any option to enter/use this voucher code. please let me know hoe an i use this voucher.

 

Regards,

Rakesh

Hi,

 

i amfaing this error when i try to do an UPSERT call.

 

ny external ID field is "DossierToSFID__c "

 

i am using upsert as below

 

   upsert recordList DossierToSFID__c ;

 

and i am getting the above error . please let me know if anyone faced this problem earlier.

i am stuck with my work due to this.

 

thank in advance

 

Regards,

Rakesh

Hi,

 

i have commandLink in my VF page(page1). in its action a controller method is called which redirects it to a new page(page2).

whan i just simply click on the link its going to page2.

but when i right clik on the link and say either  open in new tab/ open in new window its again showing me page1 instead of page2.

 

please let mw know what is the problem. is it becuase of commandlink. let me know if there is any sloution or work around for this.

 

thanks in advance

 

Regards,

Rakesh

 

Hi, 

 

i came accross the statment :

 

If a custom object is a detail or subdetail component in a master-detail relationship, it can't also be the master of a different master-detail relationship.

 

saying that a detail object cannot be a master in another M-D relationship.

 

but iam able to create 4-level M-D relationship as explainde below.

 

object1 > object2 > object3 > object4

 

where object2, object3 and object4 are on master side and object1,object2 and object3 are on detail side.

 

please let me know what is the actual meaning of the statement. am i interpreting it in a wrong way.

 

Regards

Rakesh

 

in a cross object formula field upto what levels we can access the parent object. is it 5/10?

will there be any change in this limit as salesforce chnages it releases.

 

Regards

Rakesh

 

 Hi,

 

 we have one after insert trigger on Parent object. in this trigger we are creating child records for this parent record and inserting them.

 

but when we do insert operation on child records its calling "Before Update" trigger of Parent object.

this is a Master-Detail relationship

 

could any one please tell what is happening here.

 

thanks in advance

 

Regards

Rakesh

Hi,

 

i want to log a case in my developer org. when i click on "Help" link on top right corner in the home page it is redirecting to Help.salesforce.com but when i try to open a case by clicking on "open case" its again going to home page of Help.salesforce.com and this is repeating as a cycle and not able to open a case.

the same is happening in Sandbox also.

 

but when i go to enterprise/production org the link i see on top right corner in "Help & Training"  instead of only "Help" (in Developer org) and its allowing me to open a case.

 

please help me if anyone has idea about this.

i have an urgent requirement to open a case from my developer org.

 

thanks in advance

 

Hi,

 

i have person account enabled for my Account object. i am trying to update account records but getting error as below

 

INVALID_FIELD_FOR_INSERT_UPDATE, Account: bad field names on insert/update call: Do_Not_Call__pc, wxadmsfapp__UHNW__pc, Head_of_Household__pc, U_S_Citizenship__pc: [Do_Not_C..

 

please let me know what is the problem . i am unable to understand what the error is. i dont have any idea about "Person Account" as well.

 

Thanks in advance 

 

Regards

Rakesh

 

Hi all,

 

i have a question. we have a scenario of sending email to the current user from batch job. but batch jobs are asynchronous and will run in the backend even if we are not logged into the salesforce org. so when that batch code gets the mail id of current user using

 

userinfo.getuserId() method , which user will exactly get the mail. please reply if anyone has idea about this.

 

 

Thanks and Regards

Rakesh

 

 

 

 

Hi 

 

I have created an un-managed package and added two profiles to the package and when i install it on other devloper org i am only getting one profile instead of two. I am not understanding what is the problem. please let me know if any one has faced this earlier.

 

 

Thanks

Regards

Rakesh

I get the endpoint where the request has to be sent at runtime. Later i want to send an HTTP post request to this endpoint, so I have to create a remote site setting too at runtime.

Is there a way to create a remote site setting through apex code?

 

Thanks,

Rupali.

I have an application using oAuth for authorization. It's been working fine for months. Over the weekend, issues started happening and after digging into it, it appears that while the authorization is successful (response 200 with valid JSON object returned), we're no longer receiving a refresh token after authorization.

 

Here is the oAuth request/response:

REQUEST:
https://login.salesforce.com/services/oauth2/token?grant_type=authorization_code&client_id=[my_app_client_id]&client_secret=[my_app_client_secret]&redirect_uri=[my_app_redirect_url]&code=[the_auth_code_we_receive_during_authorization]

 

RESPONSE:

{

"id":"https://login.salesforce.com/id/00D30000000AAAAAAA/0053000000KKKKKK",
"issued_at":"1328965006241",
"scope":"full",
"instance_url":"https://[my_org].my.salesforce.com",
"signature":"J/YL4wUXF[stuff]ielR+GLrcBuDz/kHOJs3nKNs=",
"access_token":"00D30000000AAAA!AREAQHAQpw[stuff]ABL50MBOQVPsN.TTnrrvN2gAGNsrJHhK3ehSQvYU[stuff]MfqreLBp3eDXMnCNdJRl3"
}

 

This request is supposed to return a request_token parameter with the JSON response -- and it *always* has in the past. Docs here: http://wiki.developerforce.com/page/Digging_Deeper_into_OAuth_2.0_on_Force.com

Could someone point me in the right direction/provide advice for converting a lead to a person account?

Thank you in advance.

Hi All,

 

I would like to be able to call the SF Metadata API from Apex code in my custom app.

 

I went to Setup/App Setup/Develop/API and clicked on 'Download Metadata WSDL' and saved it to my hard drive.

 

Then I went to Setup/App Setup/Develop/ApexClasses and clicked on the 'Generate from WSDL' button. For Step 1, I navigate to the Metadata WSDL that I just saved and click 'Parse WSDL.' This takes me to the Step 2 screen where I then click on the 'Generate Apex code' button.

 

This takes me to the Step 3 screen which shows this error:

 

<error>

Apex generation failed.

Error message:
Error: Class name 'Metadata' already in use. Please edit WSDL to remove repeated names

 

</error>

 

Does this error mean that what I am attempting to do is not allowed? If it is allowed, how do I get around this error.

 

Any help would be appreciated.

 

Thanks,

Andrew