• Kelvin Cheung
  • NEWBIE
  • 15 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 8
    Replies
We have Visualforce pages in our package with pageBlockTables displaying info from NoteAndAttachment SObjects.  Inside of that pageBlockTable, we display the column:
<apex:column value="{!na.ParentId}" headerValue="Related To"/>
After some research, we found that this column is responsible for a number of dependencies being created.  In fact, it seems every SObject on the system (including Custom Objects from other packages) has a dependency where it is referenced by the Visualforce pages with these pageBlockTables.  This means that other managed packages with Custom Objects cannot be uninstalled because of these dependencies.  Since we're not actually referencing these SObject types, we believe these dependencies are an error.

We've gotten around this problem by changing that column to:
<apex:column headerValue="Related To">
  <apex:outputLink value="/{!na.parentId}">{!na.parentName}</apex:outputLink>
</apex:column>
This gets rid of any dependencies, however it's slightly less functional than the reference to the ParentId.
With our managed package, we are unable to install the package past a certain version as a fresh install onto customer instances.  We receive an "Insufficient Privileges" error when doing so, even if the user performing installation is a Sys Admin.  This happens both with installing directly from a package install URL or from AppExchange and happens in both Sandboxes and Production instances.  Here's an example of the error while trying to install on a developer instance:
 
Y​our request to install package "[package version name here]" was unsuccessful. None of the data or setup information in your salesforce.com organization was affected.
If your install continues to fail, contact Salesforce CRM Support through your normal channels and provide the following information.
Organization: Org Name (org Id)
User: User Name (user Id)
Package: Package Name (package Id)
Problem:
1.  Insufficient Privileges
You do not have the level of access necessary to perform the operation you requested. Please contact the owner of the record or your administrator if access is necessary.

 
Previous versions of the package do not have this problem.  Right now, we are working around this issue by installing an earlier version and then upgrading to new versions (either via push upgrade or providing a link to the newer version).  The upgrade does not run into the same Insufficient Privileges error.

Any help is appreciated.  Thanks!
I've had some trouble with SOSL in escaping wildcard characters (* and ?).  From the SOSL documentation (http://www.salesforce.com/us/developer/docs/soql_sosl/Content/sforce_api_calls_sosl_find.htm), it seems like * should be escaped with \* or possibly \\* or even \\\\*, but none of those seem to work.

These are the results I saw:
[FIND 'pre*post' IN ALL FIELDS RETURNING Lead(Id, Name)];  // works as a wildcard
[FIND 'pre\*post' IN ALL FIELDS RETURNING Lead(Id, Name)];  // error: Invalid string literal 'pre\*post'. Illegal character sequence '\*' in string literal.
[FIND 'pre\\*post' IN ALL FIELDS RETURNING Lead(Id, Name)];  // error: Invalid string literal 'pre\*post'. Illegal character sequence '\*' in string literal.
[FIND 'pre\\\\*post' IN ALL FIELDS RETURNING Lead(Id, Name)]; // seems to function as wildcard same as no backslash

Similar behavior is observed with ? instead of *.

Any help?  Thanks in advance!
I'm running into some behavior with Apex SOSL queries in our managed package that I don't quite understand. Previously I was hitting a 200-record return limit on SOSL queries.  After realizing this limit was increased to 2000 in API version 28, I changed our API version to the latest (32). Now I'm seeing us hit a limit of 250 records per type.

For instance, with the query:
List<List<SObject>> searchList = [FIND 'com' IN ALL FIELDS RETURNING Lead(Id), Account(Id)];

Results seem to be capped at 250 Leads and 250 Accounts returned.  I can't find any documentation of such a limit.  The only thing I can find is a way to increase the batchSize in QueryOptions for API-based SOSL queries, but I can't see anything that applies to Apex.

Any help?  Thanks in advance!
We have a "Connected App" that we rely on for getting access/refresh tokens for API access.  On our end, we use OmniAuth on our Ruby on Rails servers, and this generally works as normal.  Last week someone was authorizing our app and got a failure.  Digging into it, it looks like we properly get the callback from the client, passing us the authorize_url and code.  When we make the the request to "https://login.salesforce.com/services/oauth2/token", we get a failure response with error_description "ip restricted or invalid login hours".

Anyone know why we would be getting this error here?  I would expect there might be IP/login restrictions that would deny the login when the user logs in to Salesforce.com, providing his credentials.  But in this case, that login succeeds, but when we attempt to pass on the auth code from our AWS server to login.salesforce.com, we're getting the error.  Why would IP/login-hour restrictions apply to this request?

The user did say they have IP restrictions, so we figured it was worth a shot to add our servers' IPs to the trusted IP list.  That did not solve the problem (same error).  Any ideas?

Thanks in advance!

-kelvin
Ok, our sandbox has just been upgraded to Sumemr16 and we are having issues with our Batch Apex processes.  We current submit a series of batch jobs using "Database.executeBatch" and when the process gets to the 2nd one we get the following error message...
"System.LimitException: Too many async calls created: 2"
I know the limits have been changed to One limit to rule them all, but I thought this was set at 200 not 2.
Anyone else seen this or have any ideas?
thanks
We have Visualforce pages in our package with pageBlockTables displaying info from NoteAndAttachment SObjects.  Inside of that pageBlockTable, we display the column:
<apex:column value="{!na.ParentId}" headerValue="Related To"/>
After some research, we found that this column is responsible for a number of dependencies being created.  In fact, it seems every SObject on the system (including Custom Objects from other packages) has a dependency where it is referenced by the Visualforce pages with these pageBlockTables.  This means that other managed packages with Custom Objects cannot be uninstalled because of these dependencies.  Since we're not actually referencing these SObject types, we believe these dependencies are an error.

We've gotten around this problem by changing that column to:
<apex:column headerValue="Related To">
  <apex:outputLink value="/{!na.parentId}">{!na.parentName}</apex:outputLink>
</apex:column>
This gets rid of any dependencies, however it's slightly less functional than the reference to the ParentId.
With our managed package, we are unable to install the package past a certain version as a fresh install onto customer instances.  We receive an "Insufficient Privileges" error when doing so, even if the user performing installation is a Sys Admin.  This happens both with installing directly from a package install URL or from AppExchange and happens in both Sandboxes and Production instances.  Here's an example of the error while trying to install on a developer instance:
 
Y​our request to install package "[package version name here]" was unsuccessful. None of the data or setup information in your salesforce.com organization was affected.
If your install continues to fail, contact Salesforce CRM Support through your normal channels and provide the following information.
Organization: Org Name (org Id)
User: User Name (user Id)
Package: Package Name (package Id)
Problem:
1.  Insufficient Privileges
You do not have the level of access necessary to perform the operation you requested. Please contact the owner of the record or your administrator if access is necessary.

 
Previous versions of the package do not have this problem.  Right now, we are working around this issue by installing an earlier version and then upgrading to new versions (either via push upgrade or providing a link to the newer version).  The upgrade does not run into the same Insufficient Privileges error.

Any help is appreciated.  Thanks!
I've had some trouble with SOSL in escaping wildcard characters (* and ?).  From the SOSL documentation (http://www.salesforce.com/us/developer/docs/soql_sosl/Content/sforce_api_calls_sosl_find.htm), it seems like * should be escaped with \* or possibly \\* or even \\\\*, but none of those seem to work.

These are the results I saw:
[FIND 'pre*post' IN ALL FIELDS RETURNING Lead(Id, Name)];  // works as a wildcard
[FIND 'pre\*post' IN ALL FIELDS RETURNING Lead(Id, Name)];  // error: Invalid string literal 'pre\*post'. Illegal character sequence '\*' in string literal.
[FIND 'pre\\*post' IN ALL FIELDS RETURNING Lead(Id, Name)];  // error: Invalid string literal 'pre\*post'. Illegal character sequence '\*' in string literal.
[FIND 'pre\\\\*post' IN ALL FIELDS RETURNING Lead(Id, Name)]; // seems to function as wildcard same as no backslash

Similar behavior is observed with ? instead of *.

Any help?  Thanks in advance!
I'm running into some behavior with Apex SOSL queries in our managed package that I don't quite understand. Previously I was hitting a 200-record return limit on SOSL queries.  After realizing this limit was increased to 2000 in API version 28, I changed our API version to the latest (32). Now I'm seeing us hit a limit of 250 records per type.

For instance, with the query:
List<List<SObject>> searchList = [FIND 'com' IN ALL FIELDS RETURNING Lead(Id), Account(Id)];

Results seem to be capped at 250 Leads and 250 Accounts returned.  I can't find any documentation of such a limit.  The only thing I can find is a way to increase the batchSize in QueryOptions for API-based SOSL queries, but I can't see anything that applies to Apex.

Any help?  Thanks in advance!