• Nitin Parande
  • NEWBIE
  • 10 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 8
    Replies
I have a custom button which has a URL link which I construct in Formula Editor. 

In the formula field I give \apex\AAAAAA?id=YYYYYY     where AAAAAA is the VF Page Name. YYYYYYY is the id of the record.  This works fine for standard user but does  not work for Partner (Community) User.   I am trying to see how I can constrcut the URL which can work for both standard and community user by constructing the user accordingly based on the logged in user.

Any help is appreciated.
I have strange behavior with a APEX Batch job

I run this job with batch size of 1 and it puts a job of 1000 Batches to process. However after it run for some time I have seen following behavior

1. I see the batches are processing fine say like it has processed 300. All of a sudden I see all jobs completed and it says it processed 800 batches (not sure where the other 200 batches go). Looking at the data looks like it did not process everything that should have been processed.

2. Some times I see it is processing fine say at 400th batch and all of a sudden it would say completed with all 1000 batch completed. Looking at the data looks like it did not process everything that should have been processed.

Any ideas why this could happen ?

The batch class internally call another class method in the execute method. This method has some what more logic in it. However this method when run individually does not have any issues (No Heap size issue or other performance issues).  Not sure because of the call method the complete Batch job is abruptly aborted. (with specifying any error)

I have opened a case with Salesforce but want to see if any one else have seen this issue.   
 

Want to get feedback on best way to design following :
Our legacy(non-salesforce)  system currently sends users daily emails with attachments, Our requirements is to send the emails to Salesforce and store the attachments in Salesforce where users can access. We plan to use email API. Currently checking limitations of it like attachment size, no of emails, frequency  etc.
1. Users should not be able to access attachments of other users
2. The Role-Hierarchy should apply. Meaning the users manager in the role-hierarchy setup should be able to see the attachments of his subbordinates.
3. When user leaves the company the attachments needs to be visible to other user who replaces him
4. The attachments should be able to be downloaded  from salesforce using REST API for other systems to pull it down.

There are various ways you can store files/attachments for users - in personal library/folders, attachments to objects, documents etc.

What is the best way to store the files which will satisfy all others requirements. We have to use the email-API method for capturing the files as we don't want to change out external system.

Any ideas ?

Thanks
Friends,

As we know the various limitations of service callouts (10 per future call), Triggers bulkification, future calls(10 per apex trnx)  have question on the best approach.
To put the problem in a simple way (though there are other aspects to it)

I have a table AA which is populated with data in batch. At one time you could see data in burst of 1 to 700 or may be more.
I need to push the data in the table to external system through SOAP webservice call and want to do it more or less in a real time.

Within Apex trnx we can only call 10 future calls within which we can call 10 callouts so max 100 callsout in one Apex trnx.  Scheduling the class to process 100 records every hour is not an option to me.

One option is I create another Table BB. The system that populates Table AA will insert a record in Table BB (after populating Table AA). Trigger on Table BB  will fire  to process batch of 100 callout from Table AA.  After submitting the callouts to process records in Table AA it will insert a record in Table BB to retigger another batch of 100. It will keep inserting record in Table BB untill there are no  records in Table AA.   However I am not sure if this option is really feasible from governor limits perspective. Secondly the callouts being future calls you would never know what is in queue to be processed for Table AA.

Any ideas on how we can design this. If this is not possible real time to process ALL  callouts, what could be the best way to process maximum callouts (more then 100 at a time)

Any advise appreciated. 



I have a requirment to create a service which takes input as a user ( userid) and the service needs to return the list of Accounts the user has access to. The user can get access to account  to all possible ways that salesforce can provide (Sharing rules, Role Hierharchies, Record Ownership, Account Team etc...).

I looked around on AccountShare object, GroupMember, UserRecordAcess, Role  object. but could not really connect all the dots together to come up with logic to accomplish this.

USerRecordAccess has the details but you have to provide the USerid and Recordid in order to pull the records which does not fit my requirment.

Looking for any guidance.
I have strange behavior with a APEX Batch job

I run this job with batch size of 1 and it puts a job of 1000 Batches to process. However after it run for some time I have seen following behavior

1. I see the batches are processing fine say like it has processed 300. All of a sudden I see all jobs completed and it says it processed 800 batches (not sure where the other 200 batches go). Looking at the data looks like it did not process everything that should have been processed.

2. Some times I see it is processing fine say at 400th batch and all of a sudden it would say completed with all 1000 batch completed. Looking at the data looks like it did not process everything that should have been processed.

Any ideas why this could happen ?

The batch class internally call another class method in the execute method. This method has some what more logic in it. However this method when run individually does not have any issues (No Heap size issue or other performance issues).  Not sure because of the call method the complete Batch job is abruptly aborted. (with specifying any error)

I have opened a case with Salesforce but want to see if any one else have seen this issue.   
 
I have a requirment to create a service which takes input as a user ( userid) and the service needs to return the list of Accounts the user has access to. The user can get access to account  to all possible ways that salesforce can provide (Sharing rules, Role Hierharchies, Record Ownership, Account Team etc...).

I looked around on AccountShare object, GroupMember, UserRecordAcess, Role  object. but could not really connect all the dots together to come up with logic to accomplish this.

USerRecordAccess has the details but you have to provide the USerid and Recordid in order to pull the records which does not fit my requirment.

Looking for any guidance.
I have strange behavior with a APEX Batch job

I run this job with batch size of 1 and it puts a job of 1000 Batches to process. However after it run for some time I have seen following behavior

1. I see the batches are processing fine say like it has processed 300. All of a sudden I see all jobs completed and it says it processed 800 batches (not sure where the other 200 batches go). Looking at the data looks like it did not process everything that should have been processed.

2. Some times I see it is processing fine say at 400th batch and all of a sudden it would say completed with all 1000 batch completed. Looking at the data looks like it did not process everything that should have been processed.

Any ideas why this could happen ?

The batch class internally call another class method in the execute method. This method has some what more logic in it. However this method when run individually does not have any issues (No Heap size issue or other performance issues).  Not sure because of the call method the complete Batch job is abruptly aborted. (with specifying any error)

I have opened a case with Salesforce but want to see if any one else have seen this issue.   
 
I have a requirment to create a service which takes input as a user ( userid) and the service needs to return the list of Accounts the user has access to. The user can get access to account  to all possible ways that salesforce can provide (Sharing rules, Role Hierharchies, Record Ownership, Account Team etc...).

I looked around on AccountShare object, GroupMember, UserRecordAcess, Role  object. but could not really connect all the dots together to come up with logic to accomplish this.

USerRecordAccess has the details but you have to provide the USerid and Recordid in order to pull the records which does not fit my requirment.

Looking for any guidance.