• jStark
  • NEWBIE
  • 30 Points
  • Member since 2010

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

Good morning,

 

We've been developing an application that we have recently turned into a managed package. The addition of having a namespace has caused a few headaches. Throughout the application, we are using both the Ajax Toolkit as well as Remote Actions. Now the toolkit supports:

sforce.connection.defaultNamespace = 'TestApp';

 We ran across that by looking at both the documentation and the actual connection.js code. Now we have the issue with Remote Actions to clean up yet. What's happening is that as an example, we're returning some SObjects back, such as an array of custom objects. Then we are accessing fields like:

myObject.Sequence__c
myObject.OtherObject__r.Temp__c

 The issue here is that this code no longer works, since the namespace is proliferated through the results. The Ajax Toolkit does not put the namespace in the results.

 

Is there a way to use Remote Actions in a namespace-agnostic manner? Otherwise, how do we continue to develop in separate orgs with a team of developers that all deploy to 1 org for testing, and then move that to the org for building the package?

 

Thank you,

Jed

  • February 29, 2012
  • Like
  • 0

Hello everyone, I've been working on a little product catalog application using the REST api. I've got my authentication going with OAuth2, and can query my custom object just fine. I'm working on the update method. I've gotten to the point where I get an HTTP 415 error, which is unsupported media type. I have an update_hash that I'm trying to pass. I've tried these various forms of the hash:

 

update_hash

  = speed3.25 mph

update_hash.to_json

  = {"speed":"455 mph"}

update_hash.dump

 = "{\"speed\":\"455 mph\"}"

 

 

Now this last one looks like how it should be sent. When using the OAuth2 Gem, and this:

 

resp = @access_token.post("#{@resturl}/sobjects/StarkT1__Terminator__c/#{id}?_HttpMethod=PATCH", update_hash, {"ContentType" => "application/json"})

 

I receive this error:

 

undefined method `merge' for "\"{\\\"speed\\\":\\\"455 mph\\\"}\"":String

 

So it looks like the @access_token.post() is doing it's own conversion. Just passing in the hash gives me the 415 error though. So I thought I'd try a RestClient.post and see what happens:

 

resp = RestClient.post("#{@resturl}/sobjects/StarkT1__Terminator__c/#{id}?_HttpMethod=PATCH", update_hash, :content_type => :json, :authorization => "OAuth #{@saccess_token}")

 

This gives me an http 400, bad request. Trying different versions of the update_hash seems to always give me an http 400 error, so something else is wrong with my RestClient post.

 

Any of you gurus out there can tell at a glance what I'm doing wrong?

 

Thanks,

Jed

  • March 23, 2011
  • Like
  • 0

Hello everyone!

 

I'm working on instrumentation for my custom app and I was wondering if the Force platform had anything that we can tap into, or if anyone knew of good 3rd party software compatible with Force.com. We have our in-house systems covered, and we can implement something for the strictly client-side operations, but I need to trace through all the Apex calls as well.

 

I did a quick search of the boards, blogs, and AppExchange but nothing jumped out at me.

 

Any ideas?

 

Thanks,

Jed

  • February 22, 2011
  • Like
  • 0

Hello everyone, I've been trying to do some research on deleting Salesforce components from my DE org using the migration tool but haven't found much for answers. My unanswered questions are:

 

1) How does the delete handle dependencies? If I have an Apex class as a controller for a Visualforce page, and I wish to delete both, can I have them both in the same destructiveChanges.xml file? Or if I just want to delete the class and leave the page, do I need to manually change the dependency first?

 

2) When I've tried to use a destructiveChanges.xml file, and follow the documentation here, I get errors saying "object missing from package.xml", but nowhere is it mentioned I need to have a package.xml for deleting nor what should be in it. Is this documented anywhere? I've even read on the discussion boards that I shouldn't have anything in the deployRoot but my 2 xml files.

 

3) If I want to clean out a DE org to use with a new project, can I list all of my classes, custom objects, etc, in any order in my destructiveChanges.xml file and have it be successfull? (Similar to #1). I am aware that if I try to delete something that isn't there, Ant will stop. This hinders team development quite a bit, and I know is listed on the idea boards. (I voted!)

 

I need to document and prove these processes out before we begin development. If anyone has done any of these things, or knows where more thorough documentation lies, please reply.

 

Thank you!

Jed

  • February 14, 2011
  • Like
  • 0

Hi everyone, I have a question on how IDs are handled with Salesforce-to-Salesforce. Let's say I have Company A, and Company B, who have a Connection. Company A is publishing Leads with a few fields, and Company B is subscribing. Before the Connection was created, Company B had a bunch of Leads. Company B is also creating its own Leads for other purposes, that end up getting converted. Now we're creating Leads in Company A, and doing some work in Company B with the data in those Leads. What happens when a Lead in Company A has the same ID as a Lead in Company B? How does Company B differentiate between the two Leads? If I have 1 custom field on the Lead in Company A that Company B is allowed to update, I run the risk of having multiple Leads with the same ID.

 

Any information, or the place to look to find it would be great. I did some searching, and reading up on Salesforce-to-Salesforce but I didn't see anything down to this level of detail.

 

Thanks,

Jed

  • November 12, 2010
  • Like
  • 0

Good morning,

 

We've been developing an application that we have recently turned into a managed package. The addition of having a namespace has caused a few headaches. Throughout the application, we are using both the Ajax Toolkit as well as Remote Actions. Now the toolkit supports:

sforce.connection.defaultNamespace = 'TestApp';

 We ran across that by looking at both the documentation and the actual connection.js code. Now we have the issue with Remote Actions to clean up yet. What's happening is that as an example, we're returning some SObjects back, such as an array of custom objects. Then we are accessing fields like:

myObject.Sequence__c
myObject.OtherObject__r.Temp__c

 The issue here is that this code no longer works, since the namespace is proliferated through the results. The Ajax Toolkit does not put the namespace in the results.

 

Is there a way to use Remote Actions in a namespace-agnostic manner? Otherwise, how do we continue to develop in separate orgs with a team of developers that all deploy to 1 org for testing, and then move that to the org for building the package?

 

Thank you,

Jed

  • February 29, 2012
  • Like
  • 0

Hello everyone, I've been working on a little product catalog application using the REST api. I've got my authentication going with OAuth2, and can query my custom object just fine. I'm working on the update method. I've gotten to the point where I get an HTTP 415 error, which is unsupported media type. I have an update_hash that I'm trying to pass. I've tried these various forms of the hash:

 

update_hash

  = speed3.25 mph

update_hash.to_json

  = {"speed":"455 mph"}

update_hash.dump

 = "{\"speed\":\"455 mph\"}"

 

 

Now this last one looks like how it should be sent. When using the OAuth2 Gem, and this:

 

resp = @access_token.post("#{@resturl}/sobjects/StarkT1__Terminator__c/#{id}?_HttpMethod=PATCH", update_hash, {"ContentType" => "application/json"})

 

I receive this error:

 

undefined method `merge' for "\"{\\\"speed\\\":\\\"455 mph\\\"}\"":String

 

So it looks like the @access_token.post() is doing it's own conversion. Just passing in the hash gives me the 415 error though. So I thought I'd try a RestClient.post and see what happens:

 

resp = RestClient.post("#{@resturl}/sobjects/StarkT1__Terminator__c/#{id}?_HttpMethod=PATCH", update_hash, :content_type => :json, :authorization => "OAuth #{@saccess_token}")

 

This gives me an http 400, bad request. Trying different versions of the update_hash seems to always give me an http 400 error, so something else is wrong with my RestClient post.

 

Any of you gurus out there can tell at a glance what I'm doing wrong?

 

Thanks,

Jed

  • March 23, 2011
  • Like
  • 0

Hello everyone!

 

I'm working on instrumentation for my custom app and I was wondering if the Force platform had anything that we can tap into, or if anyone knew of good 3rd party software compatible with Force.com. We have our in-house systems covered, and we can implement something for the strictly client-side operations, but I need to trace through all the Apex calls as well.

 

I did a quick search of the boards, blogs, and AppExchange but nothing jumped out at me.

 

Any ideas?

 

Thanks,

Jed

  • February 22, 2011
  • Like
  • 0

Hello everyone, I've been trying to do some research on deleting Salesforce components from my DE org using the migration tool but haven't found much for answers. My unanswered questions are:

 

1) How does the delete handle dependencies? If I have an Apex class as a controller for a Visualforce page, and I wish to delete both, can I have them both in the same destructiveChanges.xml file? Or if I just want to delete the class and leave the page, do I need to manually change the dependency first?

 

2) When I've tried to use a destructiveChanges.xml file, and follow the documentation here, I get errors saying "object missing from package.xml", but nowhere is it mentioned I need to have a package.xml for deleting nor what should be in it. Is this documented anywhere? I've even read on the discussion boards that I shouldn't have anything in the deployRoot but my 2 xml files.

 

3) If I want to clean out a DE org to use with a new project, can I list all of my classes, custom objects, etc, in any order in my destructiveChanges.xml file and have it be successfull? (Similar to #1). I am aware that if I try to delete something that isn't there, Ant will stop. This hinders team development quite a bit, and I know is listed on the idea boards. (I voted!)

 

I need to document and prove these processes out before we begin development. If anyone has done any of these things, or knows where more thorough documentation lies, please reply.

 

Thank you!

Jed

  • February 14, 2011
  • Like
  • 0

how can we check the debug logs of guest users