• Ch. Szandor Knapp
  • NEWBIE
  • 70 Points
  • Member since 2015
  • Salesforce Developer
  • appero GmbH


  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 15
    Replies
Hi All,

I have a question regarding assignment rules in salesforce. I have a set of users who are assigned to a particular assignment rule in lead object level. Is there any way to get those list of users through SOQL query.

I checked through IDE and I didn't get any direct relationship between the object.
below query which tells me about how many assignment rules we have in the system, 

Select a.SystemModstamp, a.SobjectType, a.Name, a.LastModifiedDate, a.LastModifiedById, a.Id, a.CreatedDate, a.CreatedById, a.Active From AssignmentRule a

Any idea on my request question please.

 
  • April 14, 2017
  • Like
  • 0
 I was working on a practice scenario when if Hello field on Opportunity is empty before inserting and updating. the field should filled with world. Below is my code. Can someone tell me where I did wrong 

 
public class OppHelloWorld
 {
 public void addHelloWorld(List<opportunity> opps)
 {
 for (Opportunity o:opps)
 {
 if (o.Hello__c != 'World')
 {
 o.Hello__c = 'World';
 }
 }
 }
 }
Below is the Trigger Code:
 
trigger HelloWorld on Opportunity (Before Insert, Before update) {

List <Opportunity> Opps = new List<Opportunity>();
OppHelloWorld OHW = New OppHelloWorld();
OHW.addHelloWorld(Opps);
}


 
Hi All,

I have a question regarding assignment rules in salesforce. I have a set of users who are assigned to a particular assignment rule in lead object level. Is there any way to get those list of users through SOQL query.

I checked through IDE and I didn't get any direct relationship between the object.
below query which tells me about how many assignment rules we have in the system, 

Select a.SystemModstamp, a.SobjectType, a.Name, a.LastModifiedDate, a.LastModifiedById, a.Id, a.CreatedDate, a.CreatedById, a.Active From AssignmentRule a

Any idea on my request question please.

 
  • April 14, 2017
  • Like
  • 0
 I was working on a practice scenario when if Hello field on Opportunity is empty before inserting and updating. the field should filled with world. Below is my code. Can someone tell me where I did wrong 

 
public class OppHelloWorld
 {
 public void addHelloWorld(List<opportunity> opps)
 {
 for (Opportunity o:opps)
 {
 if (o.Hello__c != 'World')
 {
 o.Hello__c = 'World';
 }
 }
 }
 }
Below is the Trigger Code:
 
trigger HelloWorld on Opportunity (Before Insert, Before update) {

List <Opportunity> Opps = new List<Opportunity>();
OppHelloWorld OHW = New OppHelloWorld();
OHW.addHelloWorld(Opps);
}


 

Hi Everyone!
I have been doing a lot of research and haven't found an answer that suits my needs yet and thus would greatly appreciate any input. I am interested in creating an email template (most likely visual force and custom controller) that can fetch multiple reservation records for a single account object. 
Specifically- For each account (custom object called Viper in this scenario), I want to be able to access each reservation listed under their account and display them individually. 

Our current Salesforce setup includes:
Two (2) custom objects w/ a master-detail relationship
Object One – “Vipers” holds the customer contact information (master)
Object Two – “Reservations” holds the customers reservation information (child)
Any “Viper” record can have multiple “reservation” records attached.


Rough example of what I want below: 

  1. For Account(Viper)
    1. Reservation #1 object details
      1. all desired fields from this reservation 
    2. Reservation #2 object details 
      1. all desired fields from this reservation

Thank you for your time everyone! I really appreciate it! 

Hi All, 

Maybe I am missing something but I am going around in cirlces with the Contacts without Hobbies report. I have: 

1. Created a custom report type to get Contacts without hobbies 
2. Created an Account Value bucket field
3. Create a % Open Opps Formula 
4. Added First Name, Last Name, Total Opp Value, Open Opp Value, Phone, Email, %Open Opps to the report 
5. Summarised by Account Value then Account 

And im still getting an error: 

Challenge Not yet complete... here's what's wrong: The 'Contacts Without Hobbies' report is not configured correctly.

I have added screenshots of all the pieces - hoping someone else has hit this issue 

User-added image

User-added image

User-added image

User-added image
Hi,

I am tring to update "end date" for current sprint, but its giving me following error message.
FIELD_CUSTOM_VALIDATION_EXCEPTION

[object Object]: You can not change the end date after the sprint has started.

Can someone hep me out, how to change this?

Thanks in advance.

 
Hi all,

I'm stuck in the Apex Integration Services - Apex SOAP Callouts challenge with the following message "The Apex class 'ParkLocator' does not appear to be calling the SOAP endpoint.".

Could you please advise ?
The Error I get is: "Step Not yet complete... here's what's wrong: 
Please check that your report includes at least all of these columns: Supply: Supply Name, Unit Cost, Quantity and Total. 
Note: you may run into errors if you've skipped previous steps."

this is my report:
my Report
not sure where I made a mistake
I've started dabling in Lightning Components and worked through a tutorial last year and have done one of the trailheads a few days.  So I know how to code basic Lightning components and apps.  And I see in the metadata that these become AuraDefinitionBundles.  I also so an example of some code where a bit of JS is added to an empty VF page and that always a Lightning Component to be spun up inside a VF page.

What I want to do is take an exist VF page that is exposed to the internet as a SF "Sites" application and port it to Lightning.  What I included in the prior paragaph leads me to believe the page is codable.  Here's what I don't know.  When a Sites application is configured, you have to tell it what it has access to-- VF pages, Apex controllers, objects and fields, etc.  I don't know how you would give it access to the Aura bundle.  (Unless it's totally implicit and you don't have to and it automatically gets acces.)

Can anyone address the question of how to configure and deploy Sites application that includes a VF page that spins up an Lightning Component?
 
I am using a visualforce page email template in which Recipient is a Contact, relatedTo is an Event, it dynamically generates an *.ical Attachment. That works just fine by using

<apex:outputText value="{0,date,yyyyMMdd'T'HHmmss}"><apex:param value="{!relatedTo.StartDateTime}" /></apex:outputText>

What I am not able to achieve is to render a link to Google Calendar that needs the same formatting of StartDateTime/EndDateTime.

I've tried using outputtext as well, but SF prevents me of using that in < a href=''>, if I dont use < a href=''>, some clients wont render the Link as Link, i.e. it is not clickable which is not acceptable. For other reasons, I need to used < messaging:HtmlEmailBody > and cannot use PlainText.

So I tried dissecting my link into params and use Apex:Outputlink.

My approach is as follows:

<apex:OutputLink value="https://www.google.com/calendar/render">
Click me
<apex:param name="action" value="TEMPLATE"/>
<apex:param name="text" value="someValue"/>
<apex:param name="dates" value="{relatedTo.Startdatetime}Z/{!relatedTo.EndDateTime)}Z"/>
<apex:param name="details" value="someOtherValue"/>
<apex:param name="sf" value="true"/>
<apex:param name="output" value="xml"/>
</apex:OutputLink>



Is there any way to get that relatedTo.Startdatetime into the format yyyyMMdd followed by HHmmss in an apex param?

If not, can you think of any workarounds that work with the event object? (FYI: SF does not allow to use StartDateTime in a formula expression to create costums fields of the format needed)
I see the the Apex Math.round() function is being deprecated in favor of Math.roundToLong().

It looks like we now have to use the following code to convert a number field value from double to integer for use in functions that require integer parms (e.g. Date.newInstance(year,month,day))

Integer intValue = Integer.valueOf(String.valueOf(Math.roundToLong(object.Some_Number_Field__c)));

Are there plans to allow casting or conversion from Long to Integer in Apex?  Or at least, is there an easier way to achieve the same result than the example above?

Thanks,