• Faizan Ali 17
  • NEWBIE
  • 20 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 15
    Questions
  • 6
    Replies
Hi all,

I have a picklist that has names (text) that are the same as my contact names (Appointment_with__c)

I have a lookup field to contact that I want to autofill whenever a name is selected from my picklist. The lookup field is called (Staff__c)

I made a basic trigger but encountering silly errors and perhaps not the best code as I am a beginner:

trigger Autofill on Event (before insert, before update) {
    
    Set<String> ids = new Set<String>();
    
    for(Event evt: Trigger.New)
    {
        if(evt.Appointment_with__c != null)
        {
            ids.add(evt.Appointment_with__c);
        }
    }
    
    List<Staff__c> dclocation = [SELECT Id, Name FROM Staff__c WHERE Name in: ids];
    
    for(Event evt1: Trigger.New)
    {
        evt1.Staff__c = dclocation[0].id;
    }
}

I keep getting 'Invalid type: Staff__c'
Variable does not exist: id'
Hi all, I am trying to create a trigger that will autopopulate my lookup field when a value is selected from the picklist however I am getting these errors and I don't know why.

My lookup field is to contact (which is filtered).

User-added image
Hi all,

I have a picklist that stores names of people. I also have a lookup field to contact.

I want to know if there is a way to auto-populate the lookup field whenever the picklist value has been selected. This will be all be done on the Event object.

Could someone provide an example too? Would be much appreciated!
Hi all,

I would like to know if there is a way to query the database based on the value in the picklist and check it against the name of a contact to grab the email field from that contact?

If there is a way, could someone kindly show an example of this in a class/trigger? The picklist is located on the event/activity object.
Hi all,

I want to be able to open a new record page when my checkbox is set to false. 

For example, I have a checkbox on a contact object. Whenever it is not checked and when the user tries to save it will throw an error and open a record page from my custom object (Standard Hours object).

The Standard Hours object simply contains fields to input date and time.

Currently, I have a process builder as follows and might help clear any further questions you may have:

User-added image

User-added image

User-added image
Hi all,

I just wanted to ask if there is a way to manage hours and days of employees in Salesforce. I want to record every day of the week (Monday to Friday) with hours for each employee.

Anything that will look visually attractive too will be a bonus. 
Hi All,

I have created a workflow rule that fires an email whenever an event is created to the contact selected.

I have tested this in my trailhead org and it works completely fine however when I test this in a sandbox it does not send an email at all. I checked the email logs too.

However when I debugged it I found this:

WF_FLOW_ACTION_ERROR; WF_FLOW_ACTION_ERROR_DETAIL; FLOW_CREATE_INTERVIEW_ERROR; FLOW_START_INTERVIEWS_ERROR; FLOW_ELEMENT_ERROR; INVOCABLE_ACTION_ERROR;

Not sure at all as to what is causing the error, could someone guide me please?
Hi, I am new to Salesforce.

I have this Email Alert setup as so:

User-added image

How would I create a workflow rule that will fire whenever an EVENT is created?

This is the step I am stuck on
Hi, I hope you are all well during this unprecedented time.

I am new to Salesforce and seeking as much knowledge as possible. I want to send an email alert to the contact after creating an event. I have done the following:

Email Alert:
Email alert




Workflow Rule:
workflow rule

I am aware that there is nothing in the formula however I want to fire an email to the contact whenever an event is booked.

Any suggestions how?

Thank you so much in advance
Hi, I hope you are well.

I would like to create something exactly the same as the standard calendar and event in SF.

Basically, whenever I click on a cell in my table it should auto-populate with the date/time.

As of now I can only make it work with a button but I would like to do it with a click.

User-added image
Hi All,

I would like to create an Event on click of a button. I have made the button however I do not know how to replicate the Event object in Calendar.

 I am finding it difficult to make this work since I am new to Visualforce, any guidance/help will be appreciated!
Button
I want this button to open this whenever I click on it:
Event

VF Page Code:
VF Page

My Controller:
User-added image
 
Hi All

I have my own table here:
Table exampleI would like to be able to click on any of the cells inside the table and it will open a box with fields to enter.

For example in the standard view of the SF Calendar it has a button to create a new event when you select a date.

I want this similar functionality but by clicking on a cell inside the table.

Could someone please guide me into achieving this?
Any reason why my code is not displaying the colour?

I want the colour to appear red when it is an appointment and yellow if it is a diary booking:
Table

Here is my code:

Code
Hi all

I am new to coding and would like some guidance.

I have this table here:

Table example
I would like to change the colour of one of the cells within the table if the contact is available at a certain time.

I have a controller class that handles my code and a separate CSS file for the styling.

Could someone guide me or link something that will allow this to happen?
Table example
I am trying to create this sort of table in a custom visualforce page. I would like to get the data from Contacts object and place in a row along the top (as you can see in the picture) and I am trying to display the time on the left of the table. Is there any way to implement this using VF? I am struggling to achieve this.
Hi all,

I have a picklist that has names (text) that are the same as my contact names (Appointment_with__c)

I have a lookup field to contact that I want to autofill whenever a name is selected from my picklist. The lookup field is called (Staff__c)

I made a basic trigger but encountering silly errors and perhaps not the best code as I am a beginner:

trigger Autofill on Event (before insert, before update) {
    
    Set<String> ids = new Set<String>();
    
    for(Event evt: Trigger.New)
    {
        if(evt.Appointment_with__c != null)
        {
            ids.add(evt.Appointment_with__c);
        }
    }
    
    List<Staff__c> dclocation = [SELECT Id, Name FROM Staff__c WHERE Name in: ids];
    
    for(Event evt1: Trigger.New)
    {
        evt1.Staff__c = dclocation[0].id;
    }
}

I keep getting 'Invalid type: Staff__c'
Variable does not exist: id'
Hi all, I am trying to create a trigger that will autopopulate my lookup field when a value is selected from the picklist however I am getting these errors and I don't know why.

My lookup field is to contact (which is filtered).

User-added image
Hi All,

I have created a workflow rule that fires an email whenever an event is created to the contact selected.

I have tested this in my trailhead org and it works completely fine however when I test this in a sandbox it does not send an email at all. I checked the email logs too.

However when I debugged it I found this:

WF_FLOW_ACTION_ERROR; WF_FLOW_ACTION_ERROR_DETAIL; FLOW_CREATE_INTERVIEW_ERROR; FLOW_START_INTERVIEWS_ERROR; FLOW_ELEMENT_ERROR; INVOCABLE_ACTION_ERROR;

Not sure at all as to what is causing the error, could someone guide me please?
Hi, I am new to Salesforce.

I have this Email Alert setup as so:

User-added image

How would I create a workflow rule that will fire whenever an EVENT is created?

This is the step I am stuck on
Hi all

I am new to coding and would like some guidance.

I have this table here:

Table example
I would like to change the colour of one of the cells within the table if the contact is available at a certain time.

I have a controller class that handles my code and a separate CSS file for the styling.

Could someone guide me or link something that will allow this to happen?