• Felicia Abramson - Bit9
  • NEWBIE
  • 5 Points
  • Member since 2014
  • Business Analyst - Salesforce
  • Bit9

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 4
    Replies
We have some buttons we want to put on every page layout (since that is the only reason why we have different page layouts on this one object), and the buttons are driven with Apex. The plan is to only allow users in certain profiles or with certain permission sets to click the buttons successfully. Right now when a user clicks the button and doesn't have the Apex class enabled for them, they recieve an ugly error message:

User-added image


Is there any way we could customize this to show an error message like "Your account is not enabled for this functionality. Please contact the SFDC admins"?
We were using webtabs to open a link to our own training site. Unfortunatley the vendor (third party) changed the URL and on the backend has X-Frame-Options enabled, making our webtab useless. What we would like to do is createa visualforce page to display some custom links directing users to the training site. I managed to get the two hyperlinks to display with Apex/my background in HTML coding, but next what I want to do is format this Visualforce page to be similar to an HTML area home page component that we have. Is there a good guide out there to help convert html speak to Apex/Visualforce?

For example, I thought I'd have to do an <a href....> tag in the code, then was able to google what that should be in apex (<apex:outputlink value...>), but I was hoping there would be a massive guide out there.

Thanks!
What would be a good resource ot help me write some test classes? I am a certified system administrator with no history of coding. The issue we have is we have alot of code written by a former employee with either no coverage or not 100% coverage, and somehow we got an overall coverage  in production of 72% -- not sure how that happened.

Four classes have four lines each, with no coverage, (if we are able to bump those up to 100% we get to 75% coverage overall), so I think those are going to be my best bets for writing test classes, but like I said, not sure where to start with that.

Any help would be great. Thanks in advance!

Any help would be appreciated. Thanks!
We are trying to test a web service Apex Class. The employee who is writing the test class has done trigger class test methods but not anything related to web service Apex Classes before.

He received the following error:

System.CalloutException: You have uncommitted work pending. Please commit or rollback before calling out

and determined it is due to DML and callout in the same test class. Does anyone have any ideas on a work around?
 
We have some custom buttons being developed that we only want to be displayed if items in a picklist match a certain criteria. For example, if the product field is a product that starts with the letter A, don't show the the buttons. If the product selected starts with the letter B, show the buttons (we only have two options that products can start with so it's pretty simple).

My initial idea was to use record types, page layouts, and WFR's, but we already use record types and there is potentially alot of intergration from our software engineers who use this object that we don't want to worry about messing that up. So while we work that part out, is there anything programatically we can do to show or hide buttons based on a field on the record? Without using record types?
When a case is created/edited and and the contact associated to the case is on a specific account (note: not the same as the account on the case), we would like a predefined case team to be added to the case. The case team will always be the same for the Contact's account. This way we can have partners who also work cases for us be able to see any case (and then any account) they are on the case team for.

Brought this to the success forums and got started down the right path but I can't get the flows to fire. I have a flow for each case team/contact's account scenario, and a process that looks at the contact's account and compares it to the account ID we want it to be associated with (not using account name incase account names change). The process looks at the contact and if it's in account A, flow A will fire. If not, it will see if the contact is in account B. If so, flow B will fire, if not, checks against account C, and so on.

Screenshots from my first try are below. Since this I've changed the variable to be Input and Output instead of Private, and I confirmed that I am a flow user, but I still can't get it to fire. Any ideas?

 Screenshots of elements in flow and process builder crieria
This is a very specific example of what I'd like to do. As I thought of what needed to be done I figured it would be something realted to Apex but wanted to run it by the community.

As a note, I am an Admin and I can read some code but have not created anything related to Apex (just started watching the Apex for Admins video right now to get started :) )

We want to be able to escalate specific types of cases, if needed to a new case called CSI. What we would like to do is from the old case, click a button and be taken to a new case with a different record type. We would like for the new case to clear out the value of the account and the contact (eventually this new case may be related to more than one account if enough customers report an issue), and we would like the old case to be linked to the new case via a lookup field on the old case layout. I'm trying to wrap my head around how this can be done without apex but I'm drawing a blank.

In the meantime we could have this be a manual process (create a new case with the new record type, save it, go back to the old case and search for the new case in the lookup field), but I feel like that can be an annoyance and could lead to error.

Any thoughts? 
What would be a good resource ot help me write some test classes? I am a certified system administrator with no history of coding. The issue we have is we have alot of code written by a former employee with either no coverage or not 100% coverage, and somehow we got an overall coverage  in production of 72% -- not sure how that happened.

Four classes have four lines each, with no coverage, (if we are able to bump those up to 100% we get to 75% coverage overall), so I think those are going to be my best bets for writing test classes, but like I said, not sure where to start with that.

Any help would be great. Thanks in advance!

Any help would be appreciated. Thanks!
We have some custom buttons being developed that we only want to be displayed if items in a picklist match a certain criteria. For example, if the product field is a product that starts with the letter A, don't show the the buttons. If the product selected starts with the letter B, show the buttons (we only have two options that products can start with so it's pretty simple).

My initial idea was to use record types, page layouts, and WFR's, but we already use record types and there is potentially alot of intergration from our software engineers who use this object that we don't want to worry about messing that up. So while we work that part out, is there anything programatically we can do to show or hide buttons based on a field on the record? Without using record types?
This is a very specific example of what I'd like to do. As I thought of what needed to be done I figured it would be something realted to Apex but wanted to run it by the community.

As a note, I am an Admin and I can read some code but have not created anything related to Apex (just started watching the Apex for Admins video right now to get started :) )

We want to be able to escalate specific types of cases, if needed to a new case called CSI. What we would like to do is from the old case, click a button and be taken to a new case with a different record type. We would like for the new case to clear out the value of the account and the contact (eventually this new case may be related to more than one account if enough customers report an issue), and we would like the old case to be linked to the new case via a lookup field on the old case layout. I'm trying to wrap my head around how this can be done without apex but I'm drawing a blank.

In the meantime we could have this be a manual process (create a new case with the new record type, save it, go back to the old case and search for the new case in the lookup field), but I feel like that can be an annoyance and could lead to error.

Any thoughts?