• ScottWells
  • NEWBIE
  • 0 Points
  • Member since 2011

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

I'm in the process of integrating jqGrid into a VisualForce page, ideally using a JSON data source provided by Apex RESTful services.  At this point it keeps telling me that the session is invalid, so I'm trying to figure out what to do.

 

My Apex RESTful service class looks like:

 

@RestResource(urlMapping='/jqGrid/*')
global with sharing class JqGridController
{
    @HttpGet
    global static JqGridResponse doGet()
    {
        ...
    }
}

 

and the referencing VisualForce page contains the following:

 

jQuery('#{!gridId}').jqGrid(
{
    datatype: 'json',
    url: "{!URLFOR('/services/apexrest/jqGrid')}",
    loadBeforeSend: function(jqXHR)
    {
        jqXHR.setRequestHeader("Authorization", "Bearer {!URLENCODE($Api.Session_Id)}");
    },
    ...
});
...

Does anyone know why this isn't working and, more importantly, what I need to do to get it working?

 

Thanks!

 

We're in the process of readying our application for security review.  The application was developed as an unmanaged package and was updated to be delivered as two managed packages, one that is an extension of the other.  As we ready for review, we've installed the base managed package (essentially a shared library containing custom objects, Apex classes, etc., that will be used by multiple products) as a beta in the org where we're developing the extension managed package (the actual product).  Now several of our VIsualForce pages that have always worked fine suddenly fail with errors like:

 

Could not resolve field 'CustomFieldName__c' from <apex:inputField> value binding '{!CustomFieldName__c}' in page productNamespace:visualForcePageName

 

I've searched a bit and found the following links with similar errors:

 

http://boards.developerforce.com/t5/Visualforce-Development/Visualforce-error-since-namespace-added/td-p/169230

http://boards.developerforce.com/t5/forums/forumtopicprintpage/board-id/Visualforce/message-id/38108/print-single-message/false/page/1

http://boards.developerforce.com/t5/Visualforce-Development/Problems-with-namespace-prefix/td-p/89512

http://boards.developerforce.com/t5/Visualforce-Development/New-Build-on-NA1/m-p/89501

 

The first link documents an existing bug with VisualForce pages and managed packages, but we haven't actually uploaded a managed package with the custom objects, pages, or controllers that are failing in this case.  At this point they're still unmanaged assets in an org, albeit one for which we have already registered a namespace.

 

The second link is about the user not having proper authorization for the object or fields, but this happens even when I'm logged in as a System Administrator.

 

The third and fourth links are about what seems to be a short-lived bug in the platform four years ago that only occurred when Developer Mode is on, but I don't have that on when this is happening and I would imagine that was fixed long ago given the age of the posts.

 

Based on this, I'm assuming that our problem is most closely related to the first link, but again technicaly the objects, pages, and controllers here aren't in a managed package yet.  I'm hoping someone here has run into this problem and has a solution or workaround for it because this is gating our progress toward submission for security review.

 

For what it's worth, I've already tried qualifying the custom field names in the <apex:inputField> tags with the correct namespace, but they're automatically removed on save because, again, these pages are referencing custom objects in the same package and therefore shouldn't be namespaced.

 

Thanks in advance for any help you may be able to provide!

 

I've started to add workflow to our managed package, in particular for outbound message integration.  The resulting metadata XML contains a specific user ID from my dev org, so when other team members try to deploy the metadata to their orgs, it fails.

 

Obviously I can have our build scripts replace the user ID with one from each developer's own org just before deploying it, but I'm concerned about what this means for our resulting managed package as delivered to our customers.  Is there a way to abstract the specific user ID out of the externalized workflow definition for both team development and end customer deployment purposes?

 

I'm currently looking at the outbound messaging feature of workflow as a way to propagate a limited subset of state to an external system as part of a composite application.  Basically the state that will be propagated is configuration data for a resource-intensive application with a Force.com-based app as the user-facing configuration UI.  I could obviously do this myself using post-DML triggers and callouts, but since outbound messaging already has delivery tracking and retries, I'd prefer to use the features of the platform when possible.

 

This functionality will be rolled into a managed package, and the endpoint URL may vary by customer based on region or other variables.  As far as I can tell at a glance, the endpoint URL is fixed as part of the metadata definition of the workflow, though.  If I were doing this using post-DML triggers and callouts, I'd have the callout URL be stored in a custom setting (and of course established as a trusted callout endpoint).

 

So with all of that explanation and prefacing out of the way, does anyone know of a way to use outbound messaging with an externalized endpoint URL?

 

Thanks!

 

Short introduction: we want to separate our application to 3 editions, and one of them will have triggers and some specific pages, and another editions - no, so with such structure we cannot use one common application with some flag, that would identify the desired edition and change functionality (we don't want to add needless elements to package at all).


a) is it necessary to have 3 managed packages in our case? Or there is a better way?

 

b) and can we use one core(several Apex-classes) for different installed applications? Let's say user already has installed App_1, is it possible to install App_2, that will use some part of App_1's classes? Without creating new classes - duplicates(that will only have another namespace prefix).

 

Does anyone know if the Ant migration tool supports the new purgeOnDelete (introduced in summer 11) attribute of the deploy metadata command. I have downloaded the latest ant-salesforce.jar from my DE and run a deploy command and I get the following error.

 

 sf:deploy doesn't support the "purgeOnDelete" attribute

 

purgeOnDeletebooleanIf true, the deleted components in the destructiveChanges.xml manifest file aren't stored in the Recycle Bin. Instead, they become immediately eligible for deletion.

This field is available in API version 22.0 and later.

This option only works in Developer Edition or sandbox organizations; it doesn't work in production organizations.