• chris_centra
  • NEWBIE
  • 140 Points
  • Member since 2006

  • Chatter
    Feed
  • 2
    Best Answers
  • 4
    Likes Received
  • 0
    Likes Given
  • 73
    Questions
  • 88
    Replies
Hi there,

We released our system about 3 weeks ago and everything has gone quite smoothly. however every now and again something completely random will happen, mainly on the account_status__c object, this is set to change when certain things happen in the system. 

This works, however randomly a whole bunch of account_status__c records will jsut be updated and there is no reason why. What can be causing this?

Thank you for your time.
Transitioning to LEx.  I go to the Accounts tab, check the Person Accounts List View - I see a record with the first name of Kate.  I go to the Case tab, click New, go to the Contact field, and lookup "Kate" - no results.

I swich to Classic (same User).  I go to the Case tab, click New, go to the Contact field, and lookup Kate.  The Contact record appears instantly.

I go back to LEx, Case, New, Contact field, lookup Kate - and now the Kate record appears.  

What's happening?  What am I doing wrong?  Why doesn't Kate appear on my first try in LEx?

thanks
chris
There are several posts on this already, but none of them have a conclusive answer.  The wording of the Critical Update info is ambiguous to me.  My questions are:
1) Does the Critical Update only affect code in managed packages?  (One of the other threads says that this CU broke code that is not in a package)
2) Does the Critical Update only affect Lightning Experience?  (If I'm exposing Lightning code in Classic, is that affected or no?)
 
I'm working on a Community - and I go to the standard Community User Profile page (https://developer.salesforce.com/docs/atlas.en-us.community_templates.meta/community_templates/rss_user_profile.htm) - I don't see anything which indicaties whether the User is active or inactive.  Is there a way to add this information to the standard Community User Profile page?
When a Lead is Converted and the resulting Contact is attached to an existing Account, an automated Chatter post is created on the Account (Type=TrackedChange).  I wrote a Trigger on Account to automatically delete that Chatter post as soon as it is created.  Works great.  I'm writing test coverage now, but it appears that the automated Chatter post is NOT being created when I do the Lead Conversion in the test coverage context.  Is anyone familiar with this?  Is there a way to make the automated Chatter post appear, or does this simply not happen in test coverage?
Hello - 

I built a scatter graph via the standard reporting functionality.  It's decent, but the client wants some additional filtering, so I'm building it in VF.  Step 1 is to create the graph, so I'm using apex:scatterSeries.  However I notice something that is present in the standard graph that I can't figure out how to do in the apex/vf version.  

Each point on the graph represents two values on an Account object.  I want the User to be able to see which Account is associated with each point.  Is there a way to do this?  In the standard graph, you see it when you mouse-over a point.  But I'm not seeing this option for the custom graph.  This seems so simple though - so I'm sure I'm just not finding it.  How do I do it?  

It would be ideal if the third value could be visible without mouse-over - then via toggle I could hide it or whatever.

Thanks for your time.
chris
Hello.  I am trying to add a related list (Approval Processes) to a VF page.  

I can run the following SOQL:
Select o.Name, o.Id, (Select Id, Status From ProcessInstances) From Order_vod__c o

And I can add a different related list to the page via apex:relatedList.

But if I do apex:relatedList list="ProcessInstances", i get the standard "... is not a valid child relationship ..." error.  

Any idea what I'm doing wrong?
thanks for your time.
chris
Hello - I built an sfdc Community - and the only outstanding issue is that I need to make a small modification to the login page.  I can't use Community Builder (i'm using the VF-style Community).  So I need to reproduce the standard login page in VF.  It doesn't look complicated, but I'm wondering if the code is already available somewhere?  Any ideas?
thanks for your time.
chris
Hello.  I have a VF page which includes various text/links/etc and a Chatter feed.  One of the links allows the user to vote on some content - it is an apex:commandLink which calls a controller method and re-renders a small section of the page (specifically the voting area so that the count is updated).  That works fine - however when the section re-renders, i notice that other areas of the page change a bit (fonts are changed, and some other odd things).  I experimented and found that if I remove the Chatter feed, the issue not longer occurs.  I asked a UI expert to look at it and he said:

(start)
When the page receives a response to that AJAX call, a completely new stylesheet is automatically added to the page by SalesForce:

common!chatterCore!chatterExtended.css

This new stylesheet overrides the #toolbar CSS properties established in the extended!setup.css file of SalesForce (which turned off that background image).  It changes the padding and adds that unwanted background image back in.
(end)

Has anyone seen this?  Is there a way to suppress this?

Thanks for your time.
chris
Hello.  I have a VF page which includes the following structure:
<apex:outputPanel id="resultBlock">
                 <div class='hero-previews' data-tab='t-recent'>
                    <section id='t-recent-div' data-tab='t-recent' > 
                      <ul>
                        <apex:repeat value="{!ContentList}" var="res">
                            <li>

There is an action which causes my outputPanel to rerender - because some of the contents change.  And that works fine, but what's odd is that the "section" tag also disappears.  When the page is first rendered, the section tag is present as expected, but on every re-render, it's gone.  Any idea what's happening there, or how to prevent it?

thanks
chris
 
Hello -

I need to embed a video into a Knowledge article (custom rich-text field), but it appears that sfdc restricts this.  I've read a number of threads about this, but I was checking to see if there is anything new.  I found a post (https://developer.salesforce.com/forums/ForumsMain?id=906F000000097mKIAQ) suggesting that you put the html for the embed into a Static Resource, then reference that from an iframe in the rich-text field, but that loophole appears to have been closed. 

A side note, sfdc natively allows you to include youtube, vimeo, and one other vendor, but that's it.

Any thoughts here? 
Thanks so much for your time.

chris
Hello.
I have created a Login Flow - it checks a date field on the User record, does a comparison, and shows the User a screen based on the outcome.  It works well, except when i test it with a new User (I set check the Use Force.com Flows checkbox on the User).  I click the link in the email that is sent and i get:

Insufficient Privileges
You are not logged in. You must log in to perform the operation you requested.

No debug log is created.  I check the User record - and it says the login was successful.

What am I doing wrong?
thanks
chris
Hello.  I have some custom code - when a User adds a Product to an Opp, there is an asynchronous callout to get pricing from a back-end system.  Then the code will update the PricebookEntry...but this will occur after Opportunity page has already re-rendered.  I'm trying to find a way around this.  (moving pricing into sfdc or converting product screens to vf are not viable options for us.)  Any other thoughts for this?  For example, can i make the product-add page redirect to a VF page?  I could do the pricing updates there (with a synchronous callout) - and then refersh after the response is received.  But as far as i know, this isn't possible unless the whole product-add process is pushed to VF.

Any suggestions are appreciated.  Thank you so much for your time!
chris
Hello.  I have a VF page with a configurable chatter:feed component - where a User can choose the entityId - to show the feed for a specific Chatter Group.  However there is a requirement that the User also be able to have the chatter feed display his/her "default" Chatter feed.  Is there a way to do this using the chatter:feed tag?  Essentially I want to set the entityId on chatter:feed so that it displays the same thing that chatter:newsfeed would display.  (VF restricts me from putting both on a page - even though I would only be displaying one or the other...)
thanks for your time.
chris
Hello.  I have a VF page with content split into three columns - and one column holds chatter:newFeed.  Looks great, no trouble.  I have another VF page which is split into three columns - and one column holds chatter:feed - which specifies a given entityId.  This does not dislay well - images/links overlap - as if it's crammed into too small of a space.  Screenshot below.

Is there anything I can do about this?  Is it possible to remove anything from the chatter "header?"  Or any idea why chatter:newsFeed works but chatter:feed does not?  Visually, the difference between the chatter:feed and chatter:newsfeed output appears to be the "More..." option on the chatter:feed display.

User-added image

Thanks for your time
chris
Hello.  Years ago I wrote some Apex code (batch process) which determines the "most recent Task" on a Contact.  It queries the TaskRelation object for each Contact, does some filtering, and chooses the mostly recently completed Task.  No problem - until recently the Users started creating recurring Tasks.  My code doesn't see them.  I did some digging and i found the following:
1) if i run a simple soql query on a NON-recurring Task, one record is returned (Select Id From Task WHERE Id = '00TE0000018y793')
BUT...
2) if i update that Task, setting the RepeatThisTask (RecurrenceRegeneratedType) and RecurrenceInterval fields to non-null values - and i run the exact same query, no record is returned. 

What is happening here?  Does the record find its way to a different object, or do i have to run the query differently?  (FWIW, i notice that with a recurring Task, the TaskRelation record exists - and it points to the correct TaskId, but if i try to pull values from that related Task via SOQL, i get nothing...)

thanks very much for your time.
chris
Hello.  This is an old test coverage issue.  Since api 24, you couldn't see the Standard Pricebook unless you used SeeAllData=true, so you couldn't write isolated test coverage.  I saw that this was patched in Summer 14 (https://success.salesforce.com/ideaView?id=08730000000j9TpAAI).  i'm trying to use it now, but it's not working.  i run this query: Pricebook2 pb = [SELECT Id FROM Pricebook2 WHERE IsStandard = true]; - but it says that no rows are returned.  (i updated the code to API 31 - although i'm not sure that was necessary.  And as far as i know, the sandbox is summer 14 - image is snorkel mask and "14.") 

Any idea what i am doing wrong?

thanks for your time.
chris
Hello.  i provided the enterprise wsdl to a vendor that is building some .net (c#) code.  he pulled the wsdl into visualstudio without a problem, but when he tried to instantiate SforceService, he got en error: Method SforceService.query can not be reflected.

His code is:
Imports SalesForceIntegration.SalesForceWS
Public Class Form1
    Dim vUpdateType As String
    Dim vForegroundMode As Boolean = True
    Dim vTestMode As Boolean = My.Settings.TestMode
    Dim vService As SalesForceWS.SforceService
    Public Sub Process()
        Dim iSuccess As Boolean = False
        Dim iSkip As Integer = 0
        Dim iTake As Integer = 200
        If vUpdateType <> "" Then
            vService = New SalesForceWS.SforceService  <ERRORS ON THIS LINE>

i can provide part of the wsdl as well if that would help.  i've run some searches on this issue - and i've seen some results - but no recent ones on the sfdc forums - so i'm guessing that there's some specific little thing he's doing wrong.  any ideas?  (many years ago i did my own .net dev with sfdc - and i never saw this issue.)

thanks for your time
chris
hello -

i've been using the force.com ide for many years to write apex/vf/etc.  just in the past couple of days, i'm seeing very odd behavior.  normally, when i save code that contains a compile-time error, the Problems tab shows a red symbol and tell me what the error is.  suddenly, when there's an error, i get a warning that the code could only be saved locally and not to sfdc (technically true, but it doesn't tell me my error...if i remove the errant code or fix the error, it saves without incident).  another example - equally strange, normally when test coverage code fails, again there's a red icon in the Apex Test Runner tab and i can drill down to the specific error.  now it doesn't do that.  it only shows that there are warnings, and i have to review the Debug Log to see if there is an issue and what the specific issue is. 

i had been using v27 when this started occurring, so i updated to v28, but the behavior is the same.  this is really bizarre to me because for its shortcomings, the eclipse tool has been solid as a rock since i started using it.  anyone have an idea of what's going on?

thanks for your time.
chris
Hello - i have an apex webservice which creates a new Lead based on incoming information and, conditionally, Converts the Lead to an Account/Contact/Opportunity using Database.convertLead.  occasionally - maybe 10% of the time (no pattern i can find) - it takes a very long time to run this method.  i added some logging so that i could see the timestamp at various spots in the code, and the convertLead method takes 2-3 minutes to complete.  (this causes some problems because the code is part of an apex web service - so the system calling the web service gets a timeout.

has anyone had a similar issue?  any thoughts?  i've considered doing the conversion asynchronously, but i need to return the newly created Ids to the calling system.

thanks
chris
Hello.  i have a vf page with a question which is answered using radio inputs.  however there are many radio inputs, and i'd like to present them as multiple rows of maybe four radios each (so a single selectradio with twenty selectoption nodes - in a 4x5 grid).  is there no way to make this happen - other than switching to html?  (i'm familiar with the "layout" attribute on the selectradio but that doesn't quite get me there...)
thanks
chris


Hello.  i have a vf page with a question which is answered using radio inputs.  however there are many radio inputs, and i'd like to present them as multiple rows of maybe four radios each (so a single selectradio with twenty selectoption nodes - in a 4x5 grid).  is there no way to make this happen - other than switching to html?  (i'm familiar with the "layout" attribute on the selectradio but that doesn't quite get me there...)
thanks
chris


hello -

are there general rules/guidelines for creating CSS (for use in visualforce pages) that won't conflict with the existing sfdc CSS?  a vendor provided a CSS for some pages and when i include it, it affects some of the standard sfdc page bits (tabs, etc).  (i should note that i have to keep the header and sidebar, so i can't turn off standard stylesheets.) 

is the basic rule to avoid overriding html tags -  by referencing everything from css using the class attribute?  any tricks beyond that?

thanks for your time.
chris
Hello.  i started a thread a few weeks ago regarding an issue where round robin assignment was failing when two nearly-simultaneous transactions would grab the same User for assignment (https://developer.salesforce.com/forums/ForumsMain?id=906F000000094RQIAY).  a solution that works for me (in theory at least) is to use the FOR UPDATE clause in my SOQL - along with a bit of error handling to confirm that no two threads will assign the same user.   so i've updated my code - but: is it possible to write test coverage for it?  

in my test coverage, i know ahead of time which user will be assigned via the round robin, so i do a FOR UPDATE query on that record - then i start the normal flow of the code.  however my test kept failing.  after much frustration, i believe i've found the issue explained in the documentation: "While the records are locked by a client, the locking client can modify their field values in the database in the same transaction."  My problem is (i think) that in my test coverage, i'm always the same "client."  

So my question is: is there a way to be a different client in a test coverage method?

thanks for your time.
chris
Hi all,

there is the critical update "Add a Namespace Prefix to Query Parameters and pageReference.state Properties", where we don't know how to test. What does Salesforce mean with it? an example?.



 
When a Lead is Converted and the resulting Contact is attached to an existing Account, an automated Chatter post is created on the Account (Type=TrackedChange).  I wrote a Trigger on Account to automatically delete that Chatter post as soon as it is created.  Works great.  I'm writing test coverage now, but it appears that the automated Chatter post is NOT being created when I do the Lead Conversion in the test coverage context.  Is anyone familiar with this?  Is there a way to make the automated Chatter post appear, or does this simply not happen in test coverage?
Hello - 

I built a scatter graph via the standard reporting functionality.  It's decent, but the client wants some additional filtering, so I'm building it in VF.  Step 1 is to create the graph, so I'm using apex:scatterSeries.  However I notice something that is present in the standard graph that I can't figure out how to do in the apex/vf version.  

Each point on the graph represents two values on an Account object.  I want the User to be able to see which Account is associated with each point.  Is there a way to do this?  In the standard graph, you see it when you mouse-over a point.  But I'm not seeing this option for the custom graph.  This seems so simple though - so I'm sure I'm just not finding it.  How do I do it?  

It would be ideal if the third value could be visible without mouse-over - then via toggle I could hide it or whatever.

Thanks for your time.
chris
Hello.  I am trying to add a related list (Approval Processes) to a VF page.  

I can run the following SOQL:
Select o.Name, o.Id, (Select Id, Status From ProcessInstances) From Order_vod__c o

And I can add a different related list to the page via apex:relatedList.

But if I do apex:relatedList list="ProcessInstances", i get the standard "... is not a valid child relationship ..." error.  

Any idea what I'm doing wrong?
thanks for your time.
chris
Hi there,

We released our system about 3 weeks ago and everything has gone quite smoothly. however every now and again something completely random will happen, mainly on the account_status__c object, this is set to change when certain things happen in the system. 

This works, however randomly a whole bunch of account_status__c records will jsut be updated and there is no reason why. What can be causing this?

Thank you for your time.
Hello.
I have created a Login Flow - it checks a date field on the User record, does a comparison, and shows the User a screen based on the outcome.  It works well, except when i test it with a new User (I set check the Use Force.com Flows checkbox on the User).  I click the link in the email that is sent and i get:

Insufficient Privileges
You are not logged in. You must log in to perform the operation you requested.

No debug log is created.  I check the User record - and it says the login was successful.

What am I doing wrong?
thanks
chris
Hello.  I have a VF page with a configurable chatter:feed component - where a User can choose the entityId - to show the feed for a specific Chatter Group.  However there is a requirement that the User also be able to have the chatter feed display his/her "default" Chatter feed.  Is there a way to do this using the chatter:feed tag?  Essentially I want to set the entityId on chatter:feed so that it displays the same thing that chatter:newsfeed would display.  (VF restricts me from putting both on a page - even though I would only be displaying one or the other...)
thanks for your time.
chris
Hello.  I have a VF page with content split into three columns - and one column holds chatter:newFeed.  Looks great, no trouble.  I have another VF page which is split into three columns - and one column holds chatter:feed - which specifies a given entityId.  This does not dislay well - images/links overlap - as if it's crammed into too small of a space.  Screenshot below.

Is there anything I can do about this?  Is it possible to remove anything from the chatter "header?"  Or any idea why chatter:newsFeed works but chatter:feed does not?  Visually, the difference between the chatter:feed and chatter:newsfeed output appears to be the "More..." option on the chatter:feed display.

User-added image

Thanks for your time
chris
Hello.  Years ago I wrote some Apex code (batch process) which determines the "most recent Task" on a Contact.  It queries the TaskRelation object for each Contact, does some filtering, and chooses the mostly recently completed Task.  No problem - until recently the Users started creating recurring Tasks.  My code doesn't see them.  I did some digging and i found the following:
1) if i run a simple soql query on a NON-recurring Task, one record is returned (Select Id From Task WHERE Id = '00TE0000018y793')
BUT...
2) if i update that Task, setting the RepeatThisTask (RecurrenceRegeneratedType) and RecurrenceInterval fields to non-null values - and i run the exact same query, no record is returned. 

What is happening here?  Does the record find its way to a different object, or do i have to run the query differently?  (FWIW, i notice that with a recurring Task, the TaskRelation record exists - and it points to the correct TaskId, but if i try to pull values from that related Task via SOQL, i get nothing...)

thanks very much for your time.
chris
Hello.  This is an old test coverage issue.  Since api 24, you couldn't see the Standard Pricebook unless you used SeeAllData=true, so you couldn't write isolated test coverage.  I saw that this was patched in Summer 14 (https://success.salesforce.com/ideaView?id=08730000000j9TpAAI).  i'm trying to use it now, but it's not working.  i run this query: Pricebook2 pb = [SELECT Id FROM Pricebook2 WHERE IsStandard = true]; - but it says that no rows are returned.  (i updated the code to API 31 - although i'm not sure that was necessary.  And as far as i know, the sandbox is summer 14 - image is snorkel mask and "14.") 

Any idea what i am doing wrong?

thanks for your time.
chris
hello -

i've been using the force.com ide for many years to write apex/vf/etc.  just in the past couple of days, i'm seeing very odd behavior.  normally, when i save code that contains a compile-time error, the Problems tab shows a red symbol and tell me what the error is.  suddenly, when there's an error, i get a warning that the code could only be saved locally and not to sfdc (technically true, but it doesn't tell me my error...if i remove the errant code or fix the error, it saves without incident).  another example - equally strange, normally when test coverage code fails, again there's a red icon in the Apex Test Runner tab and i can drill down to the specific error.  now it doesn't do that.  it only shows that there are warnings, and i have to review the Debug Log to see if there is an issue and what the specific issue is. 

i had been using v27 when this started occurring, so i updated to v28, but the behavior is the same.  this is really bizarre to me because for its shortcomings, the eclipse tool has been solid as a rock since i started using it.  anyone have an idea of what's going on?

thanks for your time.
chris
hello.  i have to ceate a bunch of survey pages in vf - each survey has a handful of questions - some of the questions are repeated between surveys.

what i would love to do is have a vf page with the form tag for the whole survey, create the frequently-repeated questions as vf components, and then drop them into the vf form as necessary.  so this is where i have a disconnect with custom components.  i've played with this, and when i submit (the form and submit button are in the "outer" vf page), the values from the component don't make it to my instance of the controller.  (i found that if i put the button inside a component and click that button, then the input values are in the controller.)

so my question is: is there a way to do what i want to do (create a snippet that will accept input - that i can drop into a page)?  seems that components are great for displaying frequently-used bits, but it's a little more complicated when input is involved...

thanks for your time.
chris
Hey Everyone,

Beginner here, hoping if somebody could help me with my trigger. I'm attempting to create a new contract when a custom object is updated.

It allows me to save the trigger, but when i update the custom object I'm getting the following error:

Apex trigger AutoContract caused an unexpected exception, contact your administrator: AutoContract: execution of AfterUpdate caused by: System.NullPointerException: Attempt to de-reference a null object: Trigger.AutoContract: line 11, column 1

Here is the code i'm using:

/////////////////////////////////////////////////

trigger AutoContract on Zuora__SubscriptionProductCharge__c (After Update) {
List<Contract> listContracts= new List<Contract>();
for(Zuora__SubscriptionProductCharge__c S: Trigger.new){
Contract C= new Contract();
C.Description=S.Zuora__ProductDescription__c;
C.accountid=S.Zuora__Account__r.Id;
C.Type_of_Sale__c=S.Zuora__ProductName__c;
C.Payment_Plan__c=S.Zuora__BillingPeriod__c;
C.Contract_Total__c=S.Zuora__ExtendedAmount__c;
C.StartDate=S.Zuora__EffectiveStartDate__c;
C.Account.Name=S.Zuora__Account__r.Name;
C.User__c='00550000002TLtx';
listContracts.add(c);
}

   if(listContracts.isEmpty()== false)
{Database.insert(listContracts);

}


  }

//////////////////////////////////////////////////

It seems that the line that is causing the error is the line where i'm trying to map the Contract account name. Can anybody help explain why i'm getting the error and what I need to add to fix?

Thank you!
Hello.  i started a thread a few weeks ago regarding an issue where round robin assignment was failing when two nearly-simultaneous transactions would grab the same User for assignment (https://developer.salesforce.com/forums/ForumsMain?id=906F000000094RQIAY).  a solution that works for me (in theory at least) is to use the FOR UPDATE clause in my SOQL - along with a bit of error handling to confirm that no two threads will assign the same user.   so i've updated my code - but: is it possible to write test coverage for it?  

in my test coverage, i know ahead of time which user will be assigned via the round robin, so i do a FOR UPDATE query on that record - then i start the normal flow of the code.  however my test kept failing.  after much frustration, i believe i've found the issue explained in the documentation: "While the records are locked by a client, the locking client can modify their field values in the database in the same transaction."  My problem is (i think) that in my test coverage, i'm always the same "client."  

So my question is: is there a way to be a different client in a test coverage method?

thanks for your time.
chris

Has anyone had success displaying video on a VF page by using the embed code from a CDN like Limelight? Here's the code they provide:

 

<span class="LimelightEmbeddedPlayer"><script src="http://assets.delvenetworks.com/player/embed.js"></script><object type="application/x-shockwave-flash" id="limelight_player_393753" name="limelight_player_393753" class="LimelightEmbeddedPlayerFlash" width="800" height="360" data="http://assets.delvenetworks.com/player/loader.swf"><param name="movie" value="http://assets.delvenetworks.com/player/loader.swf"/><param name="wmode" value="window"/><param name="allowScriptAccess" value="always"/><param name="allowFullScreen" value="true"/><param name="flashVars" value="deepLink=true&amp;playerForm=LVPPlayerHorizontalPlaylist&amp;channelId=59affe0988334bbb82412775fd75c62c"/></object><script>LimelightPlayerUtil.initEmbed('limelight_player_393753');</script></span>

 

The player shows up, but it doesn't play and the play button does nothing.

 

I'm sure I'm missing something and any bit of help would be appreciated.