• Ratheven Sivarajah
  • NEWBIE
  • 115 Points
  • Member since 2022

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 23
    Questions
  • 12
    Replies
I am trying to filter the lookup on my LWC based on a picklist value(combobox) on the same screen. This LWC funtunality allows the user to create multiple lanes. These lanes include origin,destination and product type which I save in a array where I then pass it to my Apex to create records.
This is my HTML file.
<template>
    <div class="all-form-div">
        <template for:each={lanes} for:item="lane" for:index="index">
           
            <div class="individual-form-div" key={lane.id}>
                <div class="select-field">
                    <lightning-combobox
                        class="lightning-input-select"
                        data-id={index}
                        name="product"
                        label="product Type"
                        value={value}
                        placeholder="Select a package type"
                        options={productTypeOptions}
                        onchange={handleChange}>
                    </lightning-combobox>
                </div>
               
                <lightning-record-edit-form data-id={index} object-api-name="Lanes_Identified__c">
                    <div class="input-fields">
                        <div class="input-field">
                            <lightning-input-field field-name="Origin__c" onchange={handleChange} data-id={index} value={lane.origin} name="origin" label="Origin"></lightning-input-field>
                        </div>
                        <div class="input-field">
                            <lightning-input-field field-name="Destination__c" onchange={handleChange} data-id={index} value={lane.destination} name="destination" label="Destination"></lightning-input-field>
                        </div>
                    </div>
                </lightning-record-edit-form>
               
                <div class="input-field">
                    <lightning-input
                        data-id={index}
                        message-when-value-missing=" "
                        label="Volume"
                        name="Volume"
                        type="number"
                        required="true"
                        onchange={handleChange}>
                    </lightning-input>
                </div>
                <div class="delete-button">
                    <lightning-button-icon
                        icon-name="utility:delete"
                        data-id={index}
                        onclick={deleteVolume}
                        value={lane.id}>
                    </lightning-button-icon>
                </div>
            </div>
        </template>
        <hr>
    </div>
    <div class="add-button">
        <lightning-button-icon
            icon-name="utility:add"
            class="add-another"
            onclick={addAnother}>
        </lightning-button-icon>
    </div>
</template>
This is my JS file
import { LightningElement, api, wire, track } from 'lwc';
import { getRecord, getFieldValue } from 'lightning/uiRecordApi';
export default class CreateLanesIdentified extends LightningElement {
    @api parcel_json_string = '';
    @api recordId;
    @track originfield;
    @track destinationfield;
    id = 1;
    @track lanes = [
        {
            id: 0,
            origin: "",
            destination: "",
            product: "Air",
            volume: 0
        }
    ];
    // @api validate(){
    //     let allFieldsFilled = true;
    //     let errorMsg = '';
    //     for (let i = 0; i < this.lanes.length; i++) {
    //         let elem = this.lanes[i];
    //         if(!elem.origin||
    //             !elem.destination ||
    //             !elem.product ||
    //             !elem.volume
    //              ){
    //                 allFieldsFilled = false;
    //                 errorMsg = 'Please fill out all the fields.';
    //                 break;
    //              }
    //     }
    //     if (allFieldsFilled) {
    //         return { isValid: true };
    //     } else {
    //         return { isValid: false, errorMessage: errorMsg };
    //     }
    // }
    get productTypeOptions() {
        return [
            { label: 'Air', value: 'Air' },
            { label: 'Ocean', value: 'Ocean' },
            { label: 'Ground', value: 'Ground' },
        ];
    }
    @wire(getRecord, { recordId: '$recordId', fields: ['Lanes_Identified__c.Origin__c', 'Lanes_Identified__c.Destination__c'] })
    location;
    handleChange(evt) {
        console.log(evt.target.value)
        this.lanes[evt.target.dataset.id][evt.target.name] = evt.target.value;
        console.log(this.lanes[evt.target.dataset.id])
        this.parcel_json_string = JSON.stringify(this.lanes)
        console.log(this.parcel_json_string,"this.parcel_json_string")
    }
    addAnother() {
        // let flag = true;
        // this.lanes.forEach((elem) => {
        //     if (!elem.origin || !elem.destination || !elem.volume) {
        //         flag = false;
        //     }-
        // });
        // if (!flag) {
        //     return;
        // }
        console.log(this.lanes, "lanes array before push")
        this.lanes.push({
            id: this.id++,
            origin: "",
            destination: "",
            product: "Air",
            volume: 0
        });
        console.log(this.lanes, "lanes array after the push")
        this.parcel_json_string = JSON.stringify(this.lanes)
        console.log(this.parcel_json_string,"this.parcel_json_string")
    }
    deleteVolume(evt) {
        if (this.lanes.length <= 1) {
            return;
        }
        this.lanes.splice(evt.target.dataset.id, 1);
        this.parcel_json_string = JSON.stringify(this.lanes)
        console.log(this.parcel_json_string,"this.parcel_json_string")
       
    }
 
}
Hi there,
I'm new to Einstein Prediction, and from what I understand, it only works with checkbox, formula, and number fields. However, in my situation, I want to determine if a customer will choose a particular product type based on a picklist value from previous transactions. How would you go about solving this?
Hey everyone I have 3 independent milestone that get activated based on the status of the case. I am writing a trigger to close whichever mileston was activated before the case status is changed to closed. Thank you for your help!!

----------------Trigger------------------
trigger MilestoneCompleteTrigger on Case (before update, after update) {
    DateTime completionDate = System.now();
    List<Id> updateCases = new List<Id>();
        for(Case c: Trigger.new){ 
        if(c.Status == 'Closed'){
        updateCases.add(c.Id);
            }           
            if (updateCases.isEmpty() == false){
                for(Case cases: Trigger.old){ 
                      
             if(cases.Status == 'New'){
                milestoneUtils.completeMilestone(updateCases, 'First Response', completionDate); 
                 
             } else if(cases.Status != 'Awaiting Customer Response' || cases.Status != 'Customer Follow-Up Required'){
                 milestoneUtils.completeMilestone(updateCases, 'In our hands', completionDate); 
                 
             } else {
                 milestoneUtils.completeMilestone(updateCases, 'In the Customer hands', completionDate); 
             }
           }
          }
        }
}

----------Apex class-----------------
public class MilestoneUtils {
    public static void completeMilestone(List<Id> caseIds, 
            String milestoneName, DateTime complDate) {  
    List<CaseMilestone> cmsToUpdate = [select Id, completionDate
            from CaseMilestone cm
            where caseId in :caseIds and cm.MilestoneType.Name=:milestoneName 
            and completionDate = null limit 1];
    if (cmsToUpdate.isEmpty() == false){
        for (CaseMilestone cm : cmsToUpdate){
            cm.completionDate = complDate;
            }
        update cmsToUpdate;
        }
    }
}
--------------------The error I am recieving is -----------------
MilestoneCompleteTrigger: execution of BeforeUpdate caused by: System.DmlException: Update failed. First exception on row 0 with id 5556C000000QjtEQAS; first error: SELF_REFERENCE_FROM_TRIGGER, Object (id = 5006C00000ACcUO) is currently in trigger MilestoneCompleteTrigger, therefore it cannot recursively update itself: [] Class.MilestoneUtils.completeMilestone: line 12, column 1 Trigger.MilestoneCompleteTrigger: line 15, column 1
I am writing a trigger where I am bringing in a Date/Field field from case. It has a letter in it 2023-02-10T16:15:35.000+0000 and when I try to subtract it with "DateTime.now()" I get an error "Date/time expressions must use Integer or Double or Decimal ".

This is my code 
trigger CaseTrigger on Case (before update) {
     for(Case cases: Trigger.new){ 
         if(cases.stopped_time__c != null){
             cases.Total_amount_of_time_in_Hours__c= (DateTime.now()-cases.stopped_time__c );
         } 
    }
}
I have a field called (stopped since) that shows the time when the milestone is paused but when it gets activated again it disappears. If I pause it again it shows the current time. How do I calculate the total amount of time when the milestone is in pause. 
How do you calculate the total amount of time spent when the milestone is paused. I have a field called stopped that shows the time when the milestone is paused but when it gets activated again it disappears. I tried creating a new field which is a formula and I am getting stuck.
So I have created my milestone called First Response and tried to auto complete it when I send an email to a contact associated with the account. I found a code online but does not seem to work
https://help.salesforce.com/s/articleView?id=sf.entitlements_milestones_trigger.htm&type=5
Can you help me I have copied the apex class and trigger and still nothing works
I am writing a trigger where every new case gets an entitlement that I created automatically. I want the same entitlement for every case even if the accounts are different. What I have done so far I have created a entitlement process and created a dummy account. I then created a new entitlment with the entitlement process and dummy account. I then put entitlement in my case layout so when I create a case I can search for the entitlment and append to any case. I want to make the entitlement stick to every case that gets generated automatically without me selecting it in my case layout. 
So I have created a entitlement process and created a dummy account. I then created a new entitlment with the entitlement process and dummy account. I then put entitlement in my case layout so when I create a case I can search for the entitlment and append to any accounts. I want to make the entitlement stick to every case that gets generated automatically without me selecting it in my case layout. 
I have created a VF page which has a command link that take me to my desired link but there is istdp p1 at the end of the URL which I dont want. Thank you in advance.

<apex:page controller="TechnologyProduct"  lightningStylesheets="true" showHeader="false" sidebar="false" applyBodyTag="false" applyHtmlTag="false">

    <div id="wrapper">
     <apex:repeat value="{!TechnologyProduct}" var="res" id="repeat">
            <apex:outputPanel rendered="{!res.Detail_Link__c != null}" layout='none'>
                    <apex:outputlink value="{!res.Detail_Link__c}" styleClass="btn" id="button"> {!res.Detailed_Product_Name__c} </apex:outputlink>                  
            </apex:outputPanel>
     </apex:repeat>
    </div>
</apex:page>
I have created a VF page which has a command link that take me to my desired link but there is istdp p1 at the end of the URL which I dont want. Thank you in advance.

<apex:page controller="TechnologyProduct"  lightningStylesheets="true" showHeader="false" sidebar="false" applyBodyTag="false" applyHtmlTag="false">
<style type="text/css">
    [id*=button] {  
                    border: 1px solid black !important;
                    color: black !important;
                    text-decoration: none !important;
                    padding: 9px !important;
                    cursor: pointer !important;
 }
 [id*=wrapper] {    
                    margin: auto;
                    width: 50%;
                    text-align: center !important;
                    padding: 10px;
                    height: 100px !important;
                }
  [id*=repeat] {    
                    margin: 20px !important; }
   
</style>
    <div id="wrapper">
     <apex:repeat value="{!TechnologyProduct}" var="res" id="repeat">
            <apex:outputPanel rendered="{!res.Detail_Link__c != null}" layout='none'>
                    <apex:outputlink value="{!res.Detail_Link__c}" styleClass="btn" id="button"> {!res.Detailed_Product_Name__c} </apex:outputlink>                  
            </apex:outputPanel>
     </apex:repeat>
    </div>
</apex:page>
Hey everyone I have a quick question I have a outputlink that looks like a button and I want it to hover when I go over it. This is my code. Thank you in advance.

<style type="text/css">
    [id*=button] {  background-color: white !important;
                    border: 1px solid black !important;
                    color: black !important;
                    text-decoration: none !important;
                    padding: 9px !important;
                    cursor: pointer !important;
 }
 [id*=button:hover] {  background-color: white !important;
                }
 [id*=wrapper] {  
                    margin: auto;
                    width: 50%;
                    text-align: center !important;
                    padding: 10px;
                    height: 100px !important;
                }
   
</style>
    <div id="wrapper">
     <apex:repeat value="{!TechnologyProduct}" var="res" >
            <apex:outputPanel rendered="{!res.Detail_Link__c != null}" layout='none'>
                    <apex:outputlink value="{!res.Detail_Link__c}" styleClass="btn" id="button"> {!res.Detailed_Product_Name__c} </apex:outputlink>                  
            </apex:outputPanel>
     </apex:repeat>
    </div>
</apex:page>
Hey So I have created a button where I want the !res.Detail_Link__c to be displayed in the button and I want it to go to the link when click on !res.Detail_Link__c and if there is no link the button should not be visible.

<apex:page controller="TechnologyProduct" lightningStylesheets="true">
    <apex:form>
    <apex:pageBlock>
    <apex:pageBlockSection title="Vitality Check Attributes">
            <apex:repeat value="{!TechnologyProduct}" var="res">
<apex:outputText value="{!res.Detail_Link__c}" /><br/>
       <apex:commandButton  value="{res.Detailed_Product_Name__c}"/>
            </apex:repeat>
    </apex:pageBlockSection>
         </apex:pageBlock>
        </apex:form>
</apex:page>
Hey I was able to do a SOQL and store it in a list. How do I return it and use it in my VF page. Thank you in advance

Controller:
public with sharing class TechnologyProduct {

    public TechnologyProduct() {
     List <Technology_Product__c> result = [SELECT Id, Name FROM Technology_Product__c where Account__c='00105000002oNIyAAM']; 
    }   
}
I want to display some data from my custom object(Technology_product__c) using the id from the master-detail object(Account). Thank you in advance.

SELECT Name,(SELECT name FROM Technology_Product__r ) FROM Account WHERE Id='00105000002oNIyAAM'
Hey I am new to visualforce. I am coding through VScode. I am able to get the particular data and show it on my sandbox and It looks fine when I put lightningStyleSheet="true". When I put the page in a site the css changes. Is this because there is a wrapper over my page that is influencing the css. If so how would I find out? Is there a way to overpower that css? How do you write css in a apex page, do you create a different style page and connect? A lot of question I know, Thanks for the help. 

This is the code:
<apex:page controller="TestQuote"  lightningStylesheets="true" showHeader="false" sidebar="false" applyBodyTag="false" applyHtmlTag="false"  >
<apex:form  >
<apex:pageBlock >
<apex:pageBlockSection >
    <apex:pageBlockSectionItem >
    <apex:outputLabel value="Quote Request Name:" for="name" ></apex:outputLabel>
    <apex:outputField value="{!result.Quote_Request__r.name}" />
    </apex:pageBlockSectionItem>  
</apex:pageBlockSection>    
</apex:pageBlock>
</apex:form>
</apex:page>
  
Where I work, sometimes the cases are open for several days. I would like a agent to reach out to the client and make sure we are still working on it everyday. I have created a entitlement process and a milestone but don't know how to schedule a new trigger / timer everyday. I have created a milestone but after you click mark as complete, How do you make it appear again the next day until the status of the case is closed Thank you in advance
Hey everyone thank you for taking the time in reading. I have made an entitlement process where I have 2 milestone called First Response and Case is escalated. The First Response after the timer is done it changes the case:priority from low to high where the second milestone activates when the criteria is High.
I am doing a soql on a custom object which is a lookup to a standard object(case). This works I changed the ending with an r Quote_Request__r. I dont know how to display Quote_Request__r..name.

--------------------------class--------------
public class operations_class{
    public List<Case> getNewCases(){
        List<Case> filterList = [SELECT AccountId,CreatedById,Quote_Request__r.name FROM case WHERE Id ='50005000005ym2OAAQ' ];
        return filterList;
    }
}

-----------------------------VFpage-----------------------------
<apex:page controller="operations_class">
    <apex:pageBlock>
        <apex:pageBlockTable   value="{!filterList}" var="a">        
                <apex:column value="{!a.Quote_Request__r.name}"></apex:column>      
        </apex:pageBlockTable>
    </apex:pageBlock>
</apex:page>
Hey Everyone, I am trying to make a visualforce page with the following controller but I am recieveing an error unknown property operation_class.cases on the VF page. Need help. Thank you in advance

---------------controler----------------
public class operations_class{
    
    list<AccountWrapper> accountWrapperList = new list<AccountWrapper>();
    public String currentRecordId {get;set;}
    
    public operations_class(){
        Map<Id, AccountWrapper> accountMap = new Map<Id, AccountWrapper>();
        
        currentRecordId  = ApexPages.CurrentPage().getparameters().get('id');
        for(case acc :[SELECT CreatedById, Quote_Request__r.name FROM case WHERE id =: currentRecordId ]){
            
            AccountWrapper accountWrap = accountMap.get(acc.CreatedByID);
            if (null==accountWrap){
                accountWrap = new AccountWrapper();
                accountMap.put(acc.CreatedByID, accountWrap);
                accountWrap.userId=acc.CreatedById;
            }
            
            accountWrap.cases.add(acc);
        }       
        accountWrapperList = accountMap.values();
    }
    
    public list<AccountWrapper> getAccounts()
    {
        return accountWrapperList;
    }
    
    public class AccountWrapper
    {
        public Id userId {get; set;}
        public List<case> cases {get; set;}
        public AccountWrapper()
        {
            cases=new List<case>();
        }
    }
}


----------VFpage------------------------------
<apex:page controller="operations_class">
    <table>
        <apex:repeat value="{!cases}" var="cas">
                    <tr>
                        <td>
                            <apex:outputText value="Name : {!cas.Name}"/>
                        </td>                       
                    </tr>    
           </apex:repeat>
    </table>
</apex:page>
I am writing a trigger where I am bringing in a Date/Field field from case. It has a letter in it 2023-02-10T16:15:35.000+0000 and when I try to subtract it with "DateTime.now()" I get an error "Date/time expressions must use Integer or Double or Decimal ".

This is my code 
trigger CaseTrigger on Case (before update) {
     for(Case cases: Trigger.new){ 
         if(cases.stopped_time__c != null){
             cases.Total_amount_of_time_in_Hours__c= (DateTime.now()-cases.stopped_time__c );
         } 
    }
}
I am trying to filter the lookup on my LWC based on a picklist value(combobox) on the same screen. This LWC funtunality allows the user to create multiple lanes. These lanes include origin,destination and product type which I save in a array where I then pass it to my Apex to create records.
This is my HTML file.
<template>
    <div class="all-form-div">
        <template for:each={lanes} for:item="lane" for:index="index">
           
            <div class="individual-form-div" key={lane.id}>
                <div class="select-field">
                    <lightning-combobox
                        class="lightning-input-select"
                        data-id={index}
                        name="product"
                        label="product Type"
                        value={value}
                        placeholder="Select a package type"
                        options={productTypeOptions}
                        onchange={handleChange}>
                    </lightning-combobox>
                </div>
               
                <lightning-record-edit-form data-id={index} object-api-name="Lanes_Identified__c">
                    <div class="input-fields">
                        <div class="input-field">
                            <lightning-input-field field-name="Origin__c" onchange={handleChange} data-id={index} value={lane.origin} name="origin" label="Origin"></lightning-input-field>
                        </div>
                        <div class="input-field">
                            <lightning-input-field field-name="Destination__c" onchange={handleChange} data-id={index} value={lane.destination} name="destination" label="Destination"></lightning-input-field>
                        </div>
                    </div>
                </lightning-record-edit-form>
               
                <div class="input-field">
                    <lightning-input
                        data-id={index}
                        message-when-value-missing=" "
                        label="Volume"
                        name="Volume"
                        type="number"
                        required="true"
                        onchange={handleChange}>
                    </lightning-input>
                </div>
                <div class="delete-button">
                    <lightning-button-icon
                        icon-name="utility:delete"
                        data-id={index}
                        onclick={deleteVolume}
                        value={lane.id}>
                    </lightning-button-icon>
                </div>
            </div>
        </template>
        <hr>
    </div>
    <div class="add-button">
        <lightning-button-icon
            icon-name="utility:add"
            class="add-another"
            onclick={addAnother}>
        </lightning-button-icon>
    </div>
</template>
This is my JS file
import { LightningElement, api, wire, track } from 'lwc';
import { getRecord, getFieldValue } from 'lightning/uiRecordApi';
export default class CreateLanesIdentified extends LightningElement {
    @api parcel_json_string = '';
    @api recordId;
    @track originfield;
    @track destinationfield;
    id = 1;
    @track lanes = [
        {
            id: 0,
            origin: "",
            destination: "",
            product: "Air",
            volume: 0
        }
    ];
    // @api validate(){
    //     let allFieldsFilled = true;
    //     let errorMsg = '';
    //     for (let i = 0; i < this.lanes.length; i++) {
    //         let elem = this.lanes[i];
    //         if(!elem.origin||
    //             !elem.destination ||
    //             !elem.product ||
    //             !elem.volume
    //              ){
    //                 allFieldsFilled = false;
    //                 errorMsg = 'Please fill out all the fields.';
    //                 break;
    //              }
    //     }
    //     if (allFieldsFilled) {
    //         return { isValid: true };
    //     } else {
    //         return { isValid: false, errorMessage: errorMsg };
    //     }
    // }
    get productTypeOptions() {
        return [
            { label: 'Air', value: 'Air' },
            { label: 'Ocean', value: 'Ocean' },
            { label: 'Ground', value: 'Ground' },
        ];
    }
    @wire(getRecord, { recordId: '$recordId', fields: ['Lanes_Identified__c.Origin__c', 'Lanes_Identified__c.Destination__c'] })
    location;
    handleChange(evt) {
        console.log(evt.target.value)
        this.lanes[evt.target.dataset.id][evt.target.name] = evt.target.value;
        console.log(this.lanes[evt.target.dataset.id])
        this.parcel_json_string = JSON.stringify(this.lanes)
        console.log(this.parcel_json_string,"this.parcel_json_string")
    }
    addAnother() {
        // let flag = true;
        // this.lanes.forEach((elem) => {
        //     if (!elem.origin || !elem.destination || !elem.volume) {
        //         flag = false;
        //     }-
        // });
        // if (!flag) {
        //     return;
        // }
        console.log(this.lanes, "lanes array before push")
        this.lanes.push({
            id: this.id++,
            origin: "",
            destination: "",
            product: "Air",
            volume: 0
        });
        console.log(this.lanes, "lanes array after the push")
        this.parcel_json_string = JSON.stringify(this.lanes)
        console.log(this.parcel_json_string,"this.parcel_json_string")
    }
    deleteVolume(evt) {
        if (this.lanes.length <= 1) {
            return;
        }
        this.lanes.splice(evt.target.dataset.id, 1);
        this.parcel_json_string = JSON.stringify(this.lanes)
        console.log(this.parcel_json_string,"this.parcel_json_string")
       
    }
 
}
I have a field called (stopped since) that shows the time when the milestone is paused but when it gets activated again it disappears. If I pause it again it shows the current time. How do I calculate the total amount of time when the milestone is in pause. 
How do you calculate the total amount of time spent when the milestone is paused. I have a field called stopped that shows the time when the milestone is paused but when it gets activated again it disappears. I tried creating a new field which is a formula and I am getting stuck.
So I have created my milestone called First Response and tried to auto complete it when I send an email to a contact associated with the account. I found a code online but does not seem to work
https://help.salesforce.com/s/articleView?id=sf.entitlements_milestones_trigger.htm&type=5
Can you help me I have copied the apex class and trigger and still nothing works
I have created a VF page which has a command link that take me to my desired link but there is istdp p1 at the end of the URL which I dont want. Thank you in advance.

<apex:page controller="TechnologyProduct"  lightningStylesheets="true" showHeader="false" sidebar="false" applyBodyTag="false" applyHtmlTag="false">
<style type="text/css">
    [id*=button] {  
                    border: 1px solid black !important;
                    color: black !important;
                    text-decoration: none !important;
                    padding: 9px !important;
                    cursor: pointer !important;
 }
 [id*=wrapper] {    
                    margin: auto;
                    width: 50%;
                    text-align: center !important;
                    padding: 10px;
                    height: 100px !important;
                }
  [id*=repeat] {    
                    margin: 20px !important; }
   
</style>
    <div id="wrapper">
     <apex:repeat value="{!TechnologyProduct}" var="res" id="repeat">
            <apex:outputPanel rendered="{!res.Detail_Link__c != null}" layout='none'>
                    <apex:outputlink value="{!res.Detail_Link__c}" styleClass="btn" id="button"> {!res.Detailed_Product_Name__c} </apex:outputlink>                  
            </apex:outputPanel>
     </apex:repeat>
    </div>
</apex:page>
Hey everyone I have a quick question I have a outputlink that looks like a button and I want it to hover when I go over it. This is my code. Thank you in advance.

<style type="text/css">
    [id*=button] {  background-color: white !important;
                    border: 1px solid black !important;
                    color: black !important;
                    text-decoration: none !important;
                    padding: 9px !important;
                    cursor: pointer !important;
 }
 [id*=button:hover] {  background-color: white !important;
                }
 [id*=wrapper] {  
                    margin: auto;
                    width: 50%;
                    text-align: center !important;
                    padding: 10px;
                    height: 100px !important;
                }
   
</style>
    <div id="wrapper">
     <apex:repeat value="{!TechnologyProduct}" var="res" >
            <apex:outputPanel rendered="{!res.Detail_Link__c != null}" layout='none'>
                    <apex:outputlink value="{!res.Detail_Link__c}" styleClass="btn" id="button"> {!res.Detailed_Product_Name__c} </apex:outputlink>                  
            </apex:outputPanel>
     </apex:repeat>
    </div>
</apex:page>
Hey So I have created a button where I want the !res.Detail_Link__c to be displayed in the button and I want it to go to the link when click on !res.Detail_Link__c and if there is no link the button should not be visible.

<apex:page controller="TechnologyProduct" lightningStylesheets="true">
    <apex:form>
    <apex:pageBlock>
    <apex:pageBlockSection title="Vitality Check Attributes">
            <apex:repeat value="{!TechnologyProduct}" var="res">
<apex:outputText value="{!res.Detail_Link__c}" /><br/>
       <apex:commandButton  value="{res.Detailed_Product_Name__c}"/>
            </apex:repeat>
    </apex:pageBlockSection>
         </apex:pageBlock>
        </apex:form>
</apex:page>
Hey I am new to visualforce. I am coding through VScode. I am able to get the particular data and show it on my sandbox and It looks fine when I put lightningStyleSheet="true". When I put the page in a site the css changes. Is this because there is a wrapper over my page that is influencing the css. If so how would I find out? Is there a way to overpower that css? How do you write css in a apex page, do you create a different style page and connect? A lot of question I know, Thanks for the help. 

This is the code:
<apex:page controller="TestQuote"  lightningStylesheets="true" showHeader="false" sidebar="false" applyBodyTag="false" applyHtmlTag="false"  >
<apex:form  >
<apex:pageBlock >
<apex:pageBlockSection >
    <apex:pageBlockSectionItem >
    <apex:outputLabel value="Quote Request Name:" for="name" ></apex:outputLabel>
    <apex:outputField value="{!result.Quote_Request__r.name}" />
    </apex:pageBlockSectionItem>  
</apex:pageBlockSection>    
</apex:pageBlock>
</apex:form>
</apex:page>
  
Hey Everyone, I am trying to make a visualforce page with the following controller but I am recieveing an error unknown property operation_class.cases on the VF page. Need help. Thank you in advance

---------------controler----------------
public class operations_class{
    
    list<AccountWrapper> accountWrapperList = new list<AccountWrapper>();
    public String currentRecordId {get;set;}
    
    public operations_class(){
        Map<Id, AccountWrapper> accountMap = new Map<Id, AccountWrapper>();
        
        currentRecordId  = ApexPages.CurrentPage().getparameters().get('id');
        for(case acc :[SELECT CreatedById, Quote_Request__r.name FROM case WHERE id =: currentRecordId ]){
            
            AccountWrapper accountWrap = accountMap.get(acc.CreatedByID);
            if (null==accountWrap){
                accountWrap = new AccountWrapper();
                accountMap.put(acc.CreatedByID, accountWrap);
                accountWrap.userId=acc.CreatedById;
            }
            
            accountWrap.cases.add(acc);
        }       
        accountWrapperList = accountMap.values();
    }
    
    public list<AccountWrapper> getAccounts()
    {
        return accountWrapperList;
    }
    
    public class AccountWrapper
    {
        public Id userId {get; set;}
        public List<case> cases {get; set;}
        public AccountWrapper()
        {
            cases=new List<case>();
        }
    }
}


----------VFpage------------------------------
<apex:page controller="operations_class">
    <table>
        <apex:repeat value="{!cases}" var="cas">
                    <tr>
                        <td>
                            <apex:outputText value="Name : {!cas.Name}"/>
                        </td>                       
                    </tr>    
           </apex:repeat>
    </table>
</apex:page>
Hey everyone, I am new to salesforce. I have a question I am trying to grab the firstname, lastname and phone from the related list of contacts and display it on a visualforce page 
---------page--------
<apex:page controller="AccountController">
<div style="text-align: center:">
    <p>Name:{!firstName}</p>
    <p>Name:{!lastName}</p>
    <p>Name:{!phone}</p>
</div>
</apex:page>

-------controller-------
public without sharing class AccountController {
    public static string firstName;
    public static string lastName;
    public static string phone;
    public case AccountController() {
        string aId = ApexPages.currentPage(),getParameters().get('id')
        List <opportunity> openList = [select id, FirstName, LastName, phone from contact where accountid = :aId ];
        firstName = openList.FirstName
        lastName = openList.LastName
        phone = openList.phone
    }
}

---Error---
I am getting an error 'AccountController.firstName'

Thank you in advance I really appreciate it!!