• ImpactMG
  • NEWBIE
  • 25 Points
  • Member since 2011

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 12
    Replies
I created an connected app and added it to a managed package. The Connected App is used with the JWT Bearer Token Flow, and has "Permitted Users" set to "Admin approved users are pre-authorized".

Unfortunately after installation of the managed package containing the Connected App in the target organization the "Permitted Users" - setting is reset. It is not "Admin approved users are pre-authorized" as preconfigured in the development org.

Is this a bug?
I created an connected app and added it to a managed package. The managed package includes a permission set that references the connected app. (we distribute a prepared permission set that has all rights needed in the package, so users have only be assigned to this permission set as part of installation)

Unfortunately the connected app is not part of the permission set on an org in which the manage package is installed. The assignment to the connected app is set in the development org, but during installation this is not populated to the target org.

Is it by purpose or a bug?
 
At this moment it is not possible to synchronize the Lightning Event Series with 3rd party systems.
  * the Recurrence2-Fields are Readonly
  * the "Master"-Event is not visible
Is there a plan to change this and give developers the possibility to synchronize Event Series with 4rd party systems (as it is possible with Recurring Events)?

Hi,

 

Is it possible to get to know the new Owner of the new created Objects Account/Contact in a trigger while a lead is being converted?

 

In the After/Before Insert Trigger of Account/Contact the OwnerID is set to the Owner of the Lead.

In After/Before Update Trigger of Lead, if I try to query Accounts/Contacts OwnerID (Using [SELECT OwnerID from Account where ID=:ConvertedAccountID]), I still get the ID of the user that owns the Lead, not the new User.

The After/Before Update Trigger of Account/Contact is NOT executed.

 


Any Ideas/Help?

Hi,

 

this is kind of weird.

If you try to set any DateTime field in a Salesforce database Object to a Timestamp before 1911-03-01, the time portion of the Timestamp is stored incorrectly in the field. Try this:

 

Event myEvent = new Event();
myEvent.ActivityDateTime = DateTime.newInstance(1900, 1, 1, 10, 0, 0);
myEvent.DurationInMinutes = 20;
myEvent.Subject= 'testevent';
upsert myEvent;

Now execute a query in e.g. force.com Explorer (any other platform than apex code):

select ActivityDateTime from Event where Subject='testevent'

 the content of the ActivityDateTime Field differs from the value set in Apex code: 1900-01-01 10:00:00 -> 1900-01-01 09:50:39

 

This is reproduceable for every TimeStamp field on standard or custom objects.

 

If you fire the query in Apex the value shown is correct. The error only occurs for third party tools that are reading the data directly from Salesforce without using Apex.

 

Is this a well known behavior or a new bug?

Hi,

 

I would like to pass a List of Records from one Visualforce Page with a custom Controller to another Visualforce Page with a StandardSetController, the same way as it works with Custom Buttons.

 

I would like to call this page MyPage:

<apex:page
  standardController="Account"
  recordSetVar="accounts">
  <apex:form >
     <apex:pageBlock >
       <apex:pageBlockTable value="{!selected}" var="account">
         <apex:column value="{!account.name}"/>
       </apex:pageBlockTable>
     </apex:pageBlock>
  </apex:form>
</apex:page>

 

from a Button on another Visualforce Page with this Controller:

public with sharing class myController {
  list<Account> Accounts;

  public PageReference CallOtherVisualforcePageWithListOfAccounts{
    ApexPages.PageReference myRef = Page.MyPage;

    // TODO Pass Accounts to myRef !?!

 }
}

 Is there a way to accomplish that?

Hi,

 

I use remoteFunction-calls in my visualforce pages. It turns out, that this funcionality only works in IE and FF, not in Safari.

 

It's easy to reproduce:

 

* Create a RemoteSite with Remote Site URL: "http://www.google.at"; set the Disable Protocol Security Option

* Create a Page:

 

<apex:page >
<apex:includeScript value="/soap/ajax/21.0/connection.js"/>
<apex:form >
<apex:commandButton immediate="true" action="javascript&colon;test()" onclick="test(); return false;" value="Test"/>
</apex:form>

<script type="text/javascript">
function test() {
sforce.connection.remoteFunction({
async : true,
cache : false,
requestData: 'GET /',
method: "GET",
url : 'http://www.google.at',
onSuccess : function(response) { alert('OK: '+response); },
onFailure : function(response) { alert('ERROR: '+response); }
});
}
</script>
</apex:page>

* havigate to /apex/yourpagename and click on the Test-Button

 

on FF or IE an alert is called with the contents of the google page

in Safari I get this response:

 

<html><head><title>401 Unauthorized</title></head>
<body>
<h1>401 Unauthorized</h1>
<p /><hr />
<small></small>
</body>

 

Can somebody verify that? I tested on 2 different PCs, but with the same development organisation.

 

thx

impactit

Hi,

 

Is it possible to get to know the new Owner of the new created Objects Account/Contact in a trigger while a lead is being converted?

 

In the After/Before Insert Trigger of Account/Contact the OwnerID is set to the Owner of the Lead.

In After/Before Update Trigger of Lead, if I try to query Accounts/Contacts OwnerID (Using [SELECT OwnerID from Account where ID=:ConvertedAccountID]), I still get the ID of the user that owns the Lead, not the new User.

The After/Before Update Trigger of Account/Contact is NOT executed.

 


Any Ideas/Help?

Goodday

 

 

Is it possible to have a dynamic include statement in a visualforce page (to include another visualforce page) - either with an IF statement,or by specifiying the included page via a variable/parameter?

 

Secondly, is there any way to embed a PDF in a visualforce page ?

 

Many thanks in advance

Ross

  • February 03, 2012
  • Like
  • 0

Hi,

 

this is kind of weird.

If you try to set any DateTime field in a Salesforce database Object to a Timestamp before 1911-03-01, the time portion of the Timestamp is stored incorrectly in the field. Try this:

 

Event myEvent = new Event();
myEvent.ActivityDateTime = DateTime.newInstance(1900, 1, 1, 10, 0, 0);
myEvent.DurationInMinutes = 20;
myEvent.Subject= 'testevent';
upsert myEvent;

Now execute a query in e.g. force.com Explorer (any other platform than apex code):

select ActivityDateTime from Event where Subject='testevent'

 the content of the ActivityDateTime Field differs from the value set in Apex code: 1900-01-01 10:00:00 -> 1900-01-01 09:50:39

 

This is reproduceable for every TimeStamp field on standard or custom objects.

 

If you fire the query in Apex the value shown is correct. The error only occurs for third party tools that are reading the data directly from Salesforce without using Apex.

 

Is this a well known behavior or a new bug?

I'm looking for an alternative to passing selected records from a List View via the URL.  Here is how I'm currently doing it, but I'm running into IE URL limits when more than 100 records are selected.  This is a custom List view button executing JavaScript.

 

var ids = {!GETRECORDIDS( $ObjectType.Account )};

if(ids.length < 1 ) {
alert('Please select at least one Account.')
}
else {
// window.open('/apex/Quick_Email?rec='+ids.join(',')+'&retURL=001/o');
window.location='/apex/Quick_Email?rec='+ids.join(',')+'&retURL=001/o';
}

 

What other methods could I implement?

 

  • August 15, 2011
  • Like
  • 0

Hi,

 

I use remoteFunction-calls in my visualforce pages. It turns out, that this funcionality only works in IE and FF, not in Safari.

 

It's easy to reproduce:

 

* Create a RemoteSite with Remote Site URL: "http://www.google.at"; set the Disable Protocol Security Option

* Create a Page:

 

<apex:page >
<apex:includeScript value="/soap/ajax/21.0/connection.js"/>
<apex:form >
<apex:commandButton immediate="true" action="javascript&colon;test()" onclick="test(); return false;" value="Test"/>
</apex:form>

<script type="text/javascript">
function test() {
sforce.connection.remoteFunction({
async : true,
cache : false,
requestData: 'GET /',
method: "GET",
url : 'http://www.google.at',
onSuccess : function(response) { alert('OK: '+response); },
onFailure : function(response) { alert('ERROR: '+response); }
});
}
</script>
</apex:page>

* havigate to /apex/yourpagename and click on the Test-Button

 

on FF or IE an alert is called with the contents of the google page

in Safari I get this response:

 

<html><head><title>401 Unauthorized</title></head>
<body>
<h1>401 Unauthorized</h1>
<p /><hr />
<small></small>
</body>

 

Can somebody verify that? I tested on 2 different PCs, but with the same development organisation.

 

thx

impactit

Hi all!

 

I'm new to Apex development, and struggling to get SOQL to do what I need. I have a custom object SalesHistory that is a child of Account, and I need to filter the results of a SOQL query on Account to include only SalesHistory objects whose LastModifiedDate is greater than a custom datetime field on the Account object named TotalSales_LastRefreshTime__c.

 

Like so:

SELECT Id, (SELECT Id FROM SalesHistory__r WHERE LastModifiedDate > TotalSales_LastRefreshTime__c)

FROM Account

 

TotalSales_LastRefreshTime__c being the custom field on Account. This does not work however. It gives me a MALFORMED_QUERY with "unexpected token TotalSales_LastRefreshTime__c". I've also tried prefixing theTotalSales_LastRefreshTime__c with "Account__r." and "Account.", but it all gives me the same error back.

 

What am I missing here? Is it even possible to filter child subqueries based on comparisons with parent object fields? Or in more general terms, is it even possible to include fields from the outer query in the WHERE clause of a subquery?

 

I should also mention that breaking this up into several queries and storing intermediate results in collection variables is not an option for me, because the query is intended to be the basis of a Batch Apex job and will hence be returned as a Database.QueryLocator for execution by the platform.

 

Thankful for any assistance!

 

BR,

Daniel Stolt

I have an opportunity that I would like to undelete. I can find the data in the database using both Apex Explorer and through an APEX query if I use the ALL ROWS flag. I understand how to undelete using the apex command Undelete:

 

id OppId = '0068000000VVkwlAAD';
Opportunity opp = [select id, name from opportunity where id =: OppId ALL ROWS];

Database.UndeleteResult result = Database.Undelete(opp, false);
System.debug(result);

 

But... this record is not in the recycle bin. I get an error:

 |USER_DEBUG|[5,1]|DEBUG|Database.UndeleteResult[getErrors=(Database.Error[getFields=();getMessage=Entity is not in the recycle bin;getStatusCode=System.StatusCode.UNDELETE_FAILED;]);getId=0068000000VVkwlAAD;isSuccess=false;]

 

So the data is in the system... I just want to flip the isdeleted flag... Can I do this?