• Jordan Sewell
  • NEWBIE
  • 10 Points
  • Member since 2014
  • Salesforce Developer
  • RedPoint Solutions, Inc.

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 3
    Questions
  • 4
    Replies

I'm using dataloader to import EmailMessages from an existing org to a new one. Everything works fine except that I cannot set the "CreatedById"/"CreatedDate" fields despite the fact that I have audit field settings enabled correctly.
I can set this field on basically every other object but it doesn't seem available for the EmailMessage records. This is a problem because the chatter feed shows the wrong user/date and it's important information for case support users.

Does anybody know how you can import EmailMessage records with the CreatedBy user intact from the source?

Thanks,
Jimmy

I've been developing a managed package for the appexchange for a client but we have been doing it in a partner dev org that's tied to my company. I want the client to be able to publish and manage the listing once we're ready to release it. Is there any way for this to be possible?

Thanks
I've got a canvas app in a developer org that is pointing to another org's visualforce page and I'm trying to publish an event from the VF page to the canvas app. I get the following error:

"Uncaught TypeError: Cannot read property 'publish' of undefined" - which is caused by a line in the controller.js
function publish(event) {
      Sfdc.canvas.parent.publish(event)
    }

Here is the code for the VF page that contains the canvas app (subscriber)
<apex:page showHeader="true" sidebar="true">
    <script type="text/javascript" src="https://na24.salesforce.com/canvas/sdk/js/33.0/canvas-all.js"/>
    <script type="text/javascript" src="/canvas/sdk/js/31.0/controller.js"></script>   
    <apex:canvasApp applicationName="testApp" />
    <script>
    // Subscribe to a custom event.
        Sfdc.canvas.controller.subscribe({name : 'mynamespace.myevent',onData : function (e) {console.log(e);}});
    </script>
</apex:page>
And here's the code for the VF page contained in the canvas app:
<apex:page showHeader="false" sidebar="false">
<apex:includeScript value="/canvas/sdk/js/33.0/canvas-all.js"/>
<script type="text/javascript" src="/canvas/sdk/js/31.0/controller.js"></script>   

<script>
	//publish attempt
  function testpayload () { 
    Sfdc.canvas.controller.publish({name : 'mynamespace.myevent',payload : {}});
  }
</script>
<h4>Canvas Testing</h4>
<br/>
<input type="button" value="Test" onclick="testpayload();"/>
</apex:page>
What am I missing? What needs to be included in the publishing VF page so that the parent in the canvas object is defined?

-Jimmy
 
We have recently decided to convert from using the traditional Salesforce Project where we defined metadata packaging through via package.xml and migrating it to SFDX. For this task in our SFDX project, we are required to deploy 5 specific connected apps into scratch orgs when we are building our salesforce project for development and testing purposes.

We have used sfdx force:source:push cli to push the code into the scratch org.

The current situation is that we are able to deploy the 5 connected Apps into our org however, 2 of the 5 connected apps are having issues where you cannot edit their API settings or View them through the app/mgmt/forceconnectedapps/forceAppDetail. Url where you can view their API oath configs.  The other 3 connected apps are functioning perfectly fine.

When we deploy the connected apps into our scratch org
1. Go to Apps
2. Go into the connected App that has some metadata error.
3. We get a “Data Not Available” error

User-added image

4. Go back to the Connected Apps section
5. Click edit on either Assured Download Service or Assured PackOut click the save button
6. Click Save
8. I get a “A general data error occurred with your entries” error

User-added image

Here’s the metadata format we deployed and only 3 of the 5 of them are working.

Connected App A format (2 connected Apps) 1 of the 2 apps is not working
—————————— 
<?xml version="1.0" encoding="UTF-8"?>
<ConnectedApp xmlns="http://soap.sforce.com/2006/04/metadata">
    <canvasConfig>
        <accessMethod>Post</accessMethod>
        <canvasUrl>*inserturl</canvasUrl>
        <locations>Visualforce</locations>
        <samlInitiationMethod>None</samlInitiationMethod>
    </canvasConfig>
    <contactEmail>insertEmailHere</contactEmail>
    <contactPhone>#-###-####-####</contactPhone>
    <description>DescriptionA</description>
    <label>ConnectedAppAName</label>
    <oauthConfig>
        <callbackUrl>insertcallbackurl</callbackUrl>
        <scopes>Full</scopes>
    </oauthConfig>
</ConnectedApp>
Connected App B format (2 connected Apps) 1 of the 2 apps is not working.
—————————— 
<?xml version="1.0" encoding="UTF-8"?>
<ConnectedApp xmlns="http://soap.sforce.com/2006/04/metadata">
    <contactEmail>support@email.com</contactEmail>
    <contactPhone>#-###-###-####</contactPhone>
    <description>DescriptionB</description>
    <label>ConnectedAppBName</label>
    <oauthConfig>
        <callbackUrl>insertcallbackurl</callbackUrl>
        <scopes>Api</scopes>
        <scopes>RefreshToken</scopes>
    </oauthConfig>
</ConnectedApp>
Connected App C format (1 connected App) This one is working
—————————— 
<?xml version="1.0" encoding="UTF-8"?>
<ConnectedApp xmlns="http://soap.sforce.com/2006/04/metadata">
    <contactEmail>support@email.com</contactEmail>
    <contactPhone>#-###-###-####</contactPhone>
    <description>DescriptionC</description>
    <label>ConnectedAppCName</label>
    <oauthConfig>
        <callbackUrl>insertcallbackurl</callbackUrl>
        <scopes>Api</scopes>
        <scopes>Chatter</scopes>
        <scopes>RefreshToken</scopes>
    </oauthConfig>
</ConnectedApp>
Any suggestions, help or general fix for this will be appreciated.
I've been developing a managed package for the appexchange for a client but we have been doing it in a partner dev org that's tied to my company. I want the client to be able to publish and manage the listing once we're ready to release it. Is there any way for this to be possible?

Thanks

I want to create Chatter items using @mentions.  To my knowledge this is only possible using the ConnectApi.ChatterFeeds.postFeedItem funciton and the ConnectApi.FeedItems.  However this function does not take a function so I cannot use it inside a trigger. 

 

Is there a way to bulkify this or is that not possible at the moment with feed items with chatter? Does anyone know of an alternative solution?

 

Thanks

While the API docs have a lot of great examples using cURL, I don't see an example of how to actually obtain the access token. I tried the following with no joy:

 

 

curl grant_type=authorization_code \
  client_id=MY-CONSUMER-KEY \
  client_secret=MY-CONSUMER-SECRET \
  https://na5.salesforce.com/services/oath2/token

 

 

Thanks

 

Jeff Douglas

Appirio, Inc.

http://blog.jeffdouglas.com

 

Author: The Salesforce Handbook

We have recently decided to convert from using the traditional Salesforce Project where we defined metadata packaging through via package.xml and migrating it to SFDX. For this task in our SFDX project, we are required to deploy 5 specific connected apps into scratch orgs when we are building our salesforce project for development and testing purposes.

We have used sfdx force:source:push cli to push the code into the scratch org.

The current situation is that we are able to deploy the 5 connected Apps into our org however, 2 of the 5 connected apps are having issues where you cannot edit their API settings or View them through the app/mgmt/forceconnectedapps/forceAppDetail. Url where you can view their API oath configs.  The other 3 connected apps are functioning perfectly fine.

When we deploy the connected apps into our scratch org
1. Go to Apps
2. Go into the connected App that has some metadata error.
3. We get a “Data Not Available” error

User-added image

4. Go back to the Connected Apps section
5. Click edit on either Assured Download Service or Assured PackOut click the save button
6. Click Save
8. I get a “A general data error occurred with your entries” error

User-added image

Here’s the metadata format we deployed and only 3 of the 5 of them are working.

Connected App A format (2 connected Apps) 1 of the 2 apps is not working
—————————— 
<?xml version="1.0" encoding="UTF-8"?>
<ConnectedApp xmlns="http://soap.sforce.com/2006/04/metadata">
    <canvasConfig>
        <accessMethod>Post</accessMethod>
        <canvasUrl>*inserturl</canvasUrl>
        <locations>Visualforce</locations>
        <samlInitiationMethod>None</samlInitiationMethod>
    </canvasConfig>
    <contactEmail>insertEmailHere</contactEmail>
    <contactPhone>#-###-####-####</contactPhone>
    <description>DescriptionA</description>
    <label>ConnectedAppAName</label>
    <oauthConfig>
        <callbackUrl>insertcallbackurl</callbackUrl>
        <scopes>Full</scopes>
    </oauthConfig>
</ConnectedApp>
Connected App B format (2 connected Apps) 1 of the 2 apps is not working.
—————————— 
<?xml version="1.0" encoding="UTF-8"?>
<ConnectedApp xmlns="http://soap.sforce.com/2006/04/metadata">
    <contactEmail>support@email.com</contactEmail>
    <contactPhone>#-###-###-####</contactPhone>
    <description>DescriptionB</description>
    <label>ConnectedAppBName</label>
    <oauthConfig>
        <callbackUrl>insertcallbackurl</callbackUrl>
        <scopes>Api</scopes>
        <scopes>RefreshToken</scopes>
    </oauthConfig>
</ConnectedApp>
Connected App C format (1 connected App) This one is working
—————————— 
<?xml version="1.0" encoding="UTF-8"?>
<ConnectedApp xmlns="http://soap.sforce.com/2006/04/metadata">
    <contactEmail>support@email.com</contactEmail>
    <contactPhone>#-###-###-####</contactPhone>
    <description>DescriptionC</description>
    <label>ConnectedAppCName</label>
    <oauthConfig>
        <callbackUrl>insertcallbackurl</callbackUrl>
        <scopes>Api</scopes>
        <scopes>Chatter</scopes>
        <scopes>RefreshToken</scopes>
    </oauthConfig>
</ConnectedApp>
Any suggestions, help or general fix for this will be appreciated.