• Arun Parmar
  • NEWBIE
  • 100 Points
  • Member since 2018
  • Salesforce Developer
  • Metacube


  • Chatter
    Feed
  • 3
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 31
    Replies
Hello Folks,

I am creating a Lightning component to display the list of attachments related to registering a custom object. Could check where I am going wrong, because nothing is displayed.
 
AttachmentList.cmp 
--------------------------------------------------------------------------------- 
<aura:component implements="forceCommunity:availableForAllPageTypes,force:hasRecordId" access="global" controller="AttachmentListController"> <aura:attribute name="recordId" type="Id" required="true"/> <aura:attribute name="files" type="List"/> <aura:handler name="init" value="{!this}" action="{!c.doInit}"/> <span class="text-blue"> <!-- <aura:iteration items="{!v.record.Attachments}" var="obj"> --> <aura:iteration items="{!v.files}" var="obj"> {!obj.Title} <br/> </aura:iteration> </span>
 </aura:component>

AttachmentListcontroller.js -------------------------------------------------------------------------------------------------- 

({ 

doInit : function(component, event, helper) { $A.enqueueAction(component.get('c.getList')); }, getList: function(component, event, helper) { var action = component.get("c.getContentDocs"); action.setParams( { arecordId : component.get('v.recordId') }); action.setCallback(this, function(actionResult) { component.set('v.files',actionResult.getReturnValue()); }); $A.enqueueAction(action); }, 

})

AttachmentListController.apxc ------------------------------------------------------------------------------------------------------------ 

public class AttachmentListController
 { 

@AuraEnabled 
public static List<ContentDocument> getContentDocs(Id arecordId) 
{
 List<ContentDocumentLink> CDLs = [SELECT ContentDocumentId FROM ContentDocumentLink WHERE LinkedEntityId = :arecordId];

 //List<ContentDocumentLink> CDLs = [SELECT ContentDocumentId FROM ContentDocumentLink WHERE LinkedEntityId = :'a08M000000BuU4vIAF']; if (CDLs.size() < 1) return new List<ContentDocument>(); // Make a List of ContentDocument IDs List <Id> CDIdList = new List <Id> (); for (ContentDocumentLink nextCDL : CDLs) { CDIdList.add(nextCDL.ContentDocumentId); } List<ContentDocument> entries = [SELECT Id, Title, FileType FROM ContentDocument WHERE ContentDocument.Id IN :CDIdList]; return entries;
 }
 }



Thanks
I am trying to capture the previous and current values of a field if it changes. CAN NOT use native FHT, or FAT or anything else. I must do this with process builder. Below is the formula I am trying to use and under that the error  I get.

If anything but a check box, I am good. However, the checkboxes I can not get to work.

CODE=

FieldA is a Boolean field

IF(       OR(
                      ISNEW(),
                AND(
                     FieldA = TRUE, 
                      PRIORVALUE(FieldA)  = FALSE            
                       )
                 ),
"TRUE",

IF(       OR(
                      ISNEW(),
                AND(
                     [FieldA = FALSE, 
                      PRIORVALUE(FieldA)  = TRUE
                       )
                 ),
"FALSE",  FieldA))

ERROR:
The formula expression is invalid: Incorrect parameter type for function 'IF()'. Expected Text, received Boolean

 

I am trying to create orderitems from OpportunityLine items and also creating order on Opportunity. But I am getting the following error
Error: execution of AfterUpdate caused by: System.TypeException: Invalid id value for this SObject type: 00kq0000008mWXjAAM: Class.Autocreation .CreatingOrders:
at this particular line [ordr1.Id = oli.Id;]
Which Id needs to be take, I don't understand Can anyone help me.Thanks inadvance

public static void CreatingOrders(List<Opportunity> newlist){
      set<Id> oppId = new set<Id>();
    for(Opportunity opp : newList){
        oppId.add(opp.id); //Adding Opportunity's to Set.    
         }
    List<Opportunity> oppList = [select id,name,StageName,Accountid, (select Status,Account.name,enddate from Orders)
                                 from Opportunity where Id =: oppId];

     List<OpportunityLineItem> oppList1 = [SELECT id,Quantity,Product2Id,
                                  UnitPrice,Description, TotalPrice,PricebookEntry.Name, PricebookEntry.Product2.Family,
                                  OpportunityId FROM OpportunityLineItem where OpportunityId =: oppId];



    List<Order> insrtordrs = new List<Order>();
    List<OrderItem> insrtordrs1 = new List<OrderItem>();

    for(Opportunity opp1 : oppList){
        for(OpportunityLineItem oli : oppList1 ){  
        if (opp1.Orders.size()>0){
            system.debug('Orders exists*******************' +opp1.Orders);

        } 
        else if(opp1.StageName == 'Closed-Won') {
          Order ordr =new Order();
          ordr.AccountId = opp1.AccountId;
          ordr.OpportunityId = opp1.id;
          ordr.Status = 'Draft';
          ordr.EffectiveDate = system.today();
          //ordr.ContractId = opp1.ContractId; 
          insrtordrs .add(ordr);

            OrderItem ordr1 =new OrderItem();
            ordr1.Id = oli.Id;
            ordr1.PricebookEntryId = oli.PricebookEntryId;
            ordr1.UnitPrice        = oli.UnitPrice;
            ordr1.Description      = oli.Description;
            ordr1.Quantity         = oli.Quantity;
            insrtordrs1 .add(ordr1);  

        }   
       }
    }
    insert insrtordrs ;
    insert insrtordrs1 ;

 }
  • June 04, 2019
  • Like
  • 0
var editRecordEvent = $A.get("e.force:editRecord");
                            editRecordEvent.setParams({
                                "recordId": conRecord.Id,
                                "nooverride":"1"
                            });
                            editRecordEvent.fire();

Using this my record is saved but page stucked on blank screen, i want to redirect it to record detail page.
please help on this.
I want to create a profile which can prevent from deployment.
i.e. If a user have this profile than user can perform deployment operations else not.
How to achieve this.?
User-added imageI Want to add custom button in my custom lightning web component design attribute, like above image.is it possible?
If its not possible thn any other way to implement multiselect picklist in desing attribute in LWC.
 
I want to restrict salesforce global search in outlook with some filter criteria, is it possible?
Receiving this error when i am sending email from lightning. i want to send email to my user and i m also using receipient type User in visualforce email template but still i am getting this error "You must send visualforce templates to either a Contact or a Lead".
I followed all process of linking to trailhead, trailhead account is verified but badges are not showing there.
Please help on this.
I want to create a profile which can prevent from deployment.
i.e. If a user have this profile than user can perform deployment operations else not.
How to achieve this.?
How can I see all the fields I add in the related list?
User-added image

User-added image
Only a maximum of 4 are seen?


 
Hi Team,

I took back up of lightning AURA components from Salesforce org. I have the zip file containing those AURA components.

The AURA components have been purged from the recycle bin. How do I restore the AURA component back into Salesforce org?

Many Thanks in advance for all your help and support1
Hello,

I am trying to deploy this apex trigger from sandbox to production but keep getting this error:

Your organization's code coverage is 74%. You need at least 75% coverage to complete this deployment. Also, the following triggers have 0% code coverage. Each trigger must have at least 1% code coverage.

I'm wondering what would be the best way to increase the code coverage with my trigger below. This trigger is used with Dropbox. Any help would be so appreciated!
 
trigger Dropbox_Trigger_Vendor on Vendor__c (after update, after delete) {
    
        if(Trigger.isAfter && Trigger.isUpdate){
            Dropbox_for_SF.HandleRecordChange.OnRecordChange(Trigger.old, Trigger.new);
        }
    
        if(Trigger.isAfter && Trigger.isDelete){
            Dropbox_for_SF.HandleRecordChange.HandleMerge(Trigger.old);
        }
}

 
Hello Folks,

I am creating a Lightning component to display the list of attachments related to registering a custom object. Could check where I am going wrong, because nothing is displayed.
 
AttachmentList.cmp 
--------------------------------------------------------------------------------- 
<aura:component implements="forceCommunity:availableForAllPageTypes,force:hasRecordId" access="global" controller="AttachmentListController"> <aura:attribute name="recordId" type="Id" required="true"/> <aura:attribute name="files" type="List"/> <aura:handler name="init" value="{!this}" action="{!c.doInit}"/> <span class="text-blue"> <!-- <aura:iteration items="{!v.record.Attachments}" var="obj"> --> <aura:iteration items="{!v.files}" var="obj"> {!obj.Title} <br/> </aura:iteration> </span>
 </aura:component>

AttachmentListcontroller.js -------------------------------------------------------------------------------------------------- 

({ 

doInit : function(component, event, helper) { $A.enqueueAction(component.get('c.getList')); }, getList: function(component, event, helper) { var action = component.get("c.getContentDocs"); action.setParams( { arecordId : component.get('v.recordId') }); action.setCallback(this, function(actionResult) { component.set('v.files',actionResult.getReturnValue()); }); $A.enqueueAction(action); }, 

})

AttachmentListController.apxc ------------------------------------------------------------------------------------------------------------ 

public class AttachmentListController
 { 

@AuraEnabled 
public static List<ContentDocument> getContentDocs(Id arecordId) 
{
 List<ContentDocumentLink> CDLs = [SELECT ContentDocumentId FROM ContentDocumentLink WHERE LinkedEntityId = :arecordId];

 //List<ContentDocumentLink> CDLs = [SELECT ContentDocumentId FROM ContentDocumentLink WHERE LinkedEntityId = :'a08M000000BuU4vIAF']; if (CDLs.size() < 1) return new List<ContentDocument>(); // Make a List of ContentDocument IDs List <Id> CDIdList = new List <Id> (); for (ContentDocumentLink nextCDL : CDLs) { CDIdList.add(nextCDL.ContentDocumentId); } List<ContentDocument> entries = [SELECT Id, Title, FileType FROM ContentDocument WHERE ContentDocument.Id IN :CDIdList]; return entries;
 }
 }



Thanks
I am trying to capture the previous and current values of a field if it changes. CAN NOT use native FHT, or FAT or anything else. I must do this with process builder. Below is the formula I am trying to use and under that the error  I get.

If anything but a check box, I am good. However, the checkboxes I can not get to work.

CODE=

FieldA is a Boolean field

IF(       OR(
                      ISNEW(),
                AND(
                     FieldA = TRUE, 
                      PRIORVALUE(FieldA)  = FALSE            
                       )
                 ),
"TRUE",

IF(       OR(
                      ISNEW(),
                AND(
                     [FieldA = FALSE, 
                      PRIORVALUE(FieldA)  = TRUE
                       )
                 ),
"FALSE",  FieldA))

ERROR:
The formula expression is invalid: Incorrect parameter type for function 'IF()'. Expected Text, received Boolean

 
I have a lightning page and the data in that page got mapped to the custom object's corresponding fileds. Now my requirement is the data in that lightning page should not allow duplicates. For that I need to add a key to the code to check if the data is already existing or new one. If already existing then we should not allow that duplicate record in the lightning page. 

I don't really know how to crack this. Please help me with the inputs.
Hi every one.

I am stucking in use Rich Text Editor of SLDS https://lightningdesignsystem.com/components/rich-text-editor/#site-main-content, I has completed design experience but I can't click the buttons for action bold, Italic, underline.v.v. Do I have to handle all of button by javascript? 
Thanks
I have added a LWC component onto an APP page:
 
<?xml version="1.0" encoding="UTF-8"?>
    <FlexiPage xmlns="http://soap.sforce.com/2006/04/metadata">
        <flexiPageRegions>
            <componentInstances>
                <componentName>myComponent</componentName>
            </componentInstances>
            <name>main</name>
            <type>Region</type>
        </flexiPageRegions>
        <masterLabel>Something</masterLabel>
        <template>
            <name>flexipage:defaultAppHomeTemplate</name>
        </template>
        <type>AppPage</type>
    </FlexiPage>


I have then set the App Page as a tab for my App.

When my flexipage is rendered, there is a default header with my tab icon and tab name rendered in the UI.

How can i hide that header so that the only thing rendered is my flexipage LWC component?
I have a custom object (Revenue_Amount__c) that is the child on a master-detail relationship with Opportunity. 
My goal is to have the ability to modify data on the Revenue_Amount__c without leaving the Opportunity screen. 
To this end I have created a Visualforce page and an Apex class.
The VF:
<apex:page standardController="Opportunity" extensions="OpportunityActualList"  sidebar="false" showHeader="false">
    <apex:form >
        <apex:pageBlock >
        
            <apex:pageMessages />

            <apex:pageBlockButtons >
                <apex:commandButton value="QuickSave" action="{!quicksave}"/>
                <apex:commandButton value="Save" action="{!save}"/>
            </apex:pageBlockButtons>
            <input id="theHiddenInput" type="hidden" name="{!Opportunity.Name}" />
            
            <apex:outputPanel layout="block" style="overflow:auto;width:600px;height:606px" >
              <apex:pageBlockTable value="{!amounts}" var="x" id="list">
                                
                <apex:column headerValue="Id">
                    <apex:inputField value="{!x.Id}"/>
                </apex:column>
                
                <apex:column headerValue="Type">
                    <apex:inputField value="{!x.Type__c}"/>
                </apex:column>
                 
                <apex:column headerValue="Date">
                    <apex:inputField value="{!x.Fiscal_Date__c}"/>
                </apex:column>
                
                <apex:column headerValue="Amount">
                    <apex:inputField value="{!x.Dollar_Amount__c}"/>
                </apex:column>
                 
                <apex:column headerValue="Show">
                    <apex:inputField value="{!x.Show_On_Report__c}"/>
                </apex:column>
                 
                <apex:column headerValue="Opp">
                    <apex:inputField value="{!x.Name}"/>
                </apex:column>


              </apex:pageBlockTable> 

            </apex:OutputPanel> 
        </apex:pageBlock>
    </apex:form>
</apex:page>
Opportunity Controller extension
 
public class OpportunityActualList {

    private final Opportunity opp;

    public OpportunityActualList(ApexPages.StandardController stdController) {
        this.opp = (Opportunity)stdController.getRecord();
    }

    public ApexPages.StandardSetController setCon {
        get {
            if(setCon == null) {

                setCon = new ApexPages.StandardSetController(Database.getQueryLocator(
                    [SELECT id, MonthlyRevenueAmounts__r.name , Dollar_Amount__c, type__c, Fiscal_Date__c, Show_On_Report__c, Revenue_Amount__c.Name
                       FROM Revenue_Amount__c
                   WHERE MonthlyRevenueAmounts__r.name = :opp.Name
                   and  Show_On_Report__c = 'SHOW'
                   and  Type__c = 'Actual'
                   order by Fiscal_Date__c desc ]));
            }
            return setCon;
        }
        set;
    }

    public List<Revenue_Amount__c> getAmounts() {
        return (List<Revenue_Amount__c>) setCon.getRecords();
    }
}
Opportunity screen image. In reality I only need the Date and Amount column.
User-added imageWhen I change an amount and then click on QuickSave, the panel (shown above) refreshes and the new amount value is shown. The behaviour is like you would expect when you do an update. But, when you view the actual Revenue_Amount__c record, the old value is still there.   

the log
46.0 APEX_CODE,DEBUG;APEX_PROFILING,NONE;CALLOUT,NONE;DB,INFO;NBA,INFO;SYSTEM,DEBUG;VALIDATION,INFO;VISUALFORCE,INFO;WAVE,INFO;WORKFLOW,NONE
11:08:17.0 (455361)|USER_INFO|[EXTERNAL]|00580000003ZDZy|mmoore@quinstreet.com.mike|(GMT-07:00) Pacific Daylight Time (America/Los_Angeles)|GMT-07:00
11:08:17.0 (497720)|EXECUTION_STARTED
11:08:17.0 (503871)|CODE_UNIT_STARTED|[EXTERNAL]|066220000000ReR|VF: /apex/Opportunity_YoY_Actuals
11:08:17.0 (1228336)|VF_DESERIALIZE_VIEWSTATE_BEGIN|066220000000ReR
11:08:17.0 (8968923)|VF_DESERIALIZE_VIEWSTATE_END
11:08:17.9 (9763059)|SYSTEM_MODE_ENTER|true
11:08:17.10 (10437964)|SYSTEM_MODE_ENTER|true
11:08:17.0 (10999702)|SYSTEM_MODE_ENTER|true
11:08:17.77 (77859418)|SYSTEM_MODE_ENTER|true
11:08:17.0 (85970297)|CODE_UNIT_STARTED|[EXTERNAL]|VF Controller Save
11:08:17.0 (85991440)|SYSTEM_MODE_ENTER|false
11:08:17.0 (134521244)|CODE_UNIT_STARTED|[EXTERNAL]|Validation:Opportunity:00622000002jJP3
11:08:17.0 (134542832)|VALIDATION_RULE|03d80000000PY2P|B2B_Campaign_Objectives_Required
11:08:17.0 (134842407)|VALIDATION_FORMULA|Probability >= 0.5 &&
RecordTypeId = '01280000000BpSv' &&
isPickVal (Campaign_Objectives__c ,'--None--'   )|RecordTypeId=01280000000Hqet , Campaign_Objectives__c=null , Probability=10.0
11:08:17.0 (134851463)|VALIDATION_PASS
11:08:17.0 (134854689)|VALIDATION_RULE|03d80000000PY2F|B2B_Enhancements_Additions_Required
11:08:17.0 (134952606)|VALIDATION_FORMULA|Probability >= 0.50  &&
RecordTypeId = '01280000000BpSv' &&
isBlank ( Enhancements_Additions__c )|Enhancements_Additions__c=null , RecordTypeId=01280000000Hqet , Probability=10.0
11:08:17.0 (134958799)|VALIDATION_PASS
11:08:17.0 (134961891)|VALIDATION_RULE|03d800000006Txv|B2B_MustBeNotNullWhenAccountIsAgency
11:08:17.0 (135194241)|VALIDATION_FORMULA|NOT(ISPICKVAL(Account.Originating_System__c, 'ITBE'))
&&
ISPICKVAL(Category__c, 'Business to Business') 
&& 
LEN(Client_Name__c) = 0
&& 
ISPICKVAL(Account.Type, 'Agency')|Account.Type=null , Client_Name__c=null , Category__c=null , Account.Originating_System__c=<Not Migrated>
11:08:17.0 (135205236)|VALIDATION_PASS
11:08:17.0 (135208369)|VALIDATION_RULE|03d800000006Txq|B2B_MustBeNullWhenAccountIsClient
11:08:17.0 (135401165)|VALIDATION_FORMULA|NOT(ISPICKVAL(Account.Originating_System__c, 'ITBE'))
&&
ISPICKVAL(Category__c, 'Business to Business')
&&
LEN(Client_Name__c) > 0
&&
ISPICKVAL(Account.Type, 'Client')|Account.Type=null , Client_Name__c=null , Category__c=null , Account.Originating_System__c=<Not Migrated>
11:08:17.0 (135413060)|VALIDATION_PASS
11:08:17.0 (135416218)|VALIDATION_RULE|03d80000000PY2K|B2B_Topic_Segment_Required
11:08:17.0 (135544996)|VALIDATION_FORMULA|and(
Probability >= 0.50 ,
RecordTypeId = '01280000000BpSv',
or (isBlank (Topic_Segment__c),isNull(Topic_Segment__c) )
)|RecordTypeId=01280000000Hqet , Probability=10.0 , Topic_Segment__c=null
11:08:17.0 (135552711)|VALIDATION_PASS
11:08:17.0 (135555512)|VALIDATION_RULE|03d80000000Tidg|Check_CompanyId_Value
11:08:17.0 (135653731)|VALIDATION_FORMULA|AND(
	(LID__LinkedIn_Company_Id__c <> NULL),
	NOT(ISNUMBER(LID__LinkedIn_Company_Id__c))
)|LID__LinkedIn_Company_Id__c=null
11:08:17.0 (135661258)|VALIDATION_PASS
11:08:17.0 (135664131)|VALIDATION_RULE|03d80000000TfFC|CSD_user_Stage_restriction
11:08:17.0 (137741521)|VALIDATION_FORMULA|( ISPICKVAL( StageName , 'Close Within (1) Week')  &#124;&#124; ISPICKVAL(StageName, 'Closed Won') )  &&  $UserRole.Name  = 'B2B Tech Rep' &&  ISCHANGED( StageName )|StageName=Advanced Negotiations , $UserRole.Name=System Admin
11:08:17.0 (137756366)|VALIDATION_PASS
11:08:17.0 (137759931)|VALIDATION_RULE|03d80000000LHtS|EDU_Product_Month_is_Day_1_of_Month
11:08:17.0 (137871970)|VALIDATION_FORMULA|DAY(EDU_Product_Month__c)  <>  1|EDU_Product_Month__c=2019-05-01 00:00:00
11:08:17.0 (137885584)|VALIDATION_PASS
11:08:17.0 (137888747)|VALIDATION_RULE|03d80000000Thle|no_change_account_after_platform_push
11:08:17.0 (138000798)|VALIDATION_FORMULA|PRIORVALUE(  AccountId  ) <> AccountId
&&
  billing_io_key__c   <>   NULL|AccountId=0012200000IrAZe , billing_io_key__c=null
11:08:17.0 (138007160)|VALIDATION_PASS
11:08:17.0 (138009936)|VALIDATION_RULE|03d80000000TXwy|no_change_system_IO_number
11:08:17.0 (138101947)|VALIDATION_FORMULA|PRIORVALUE( I_O__c ) = AutoIO__c
&&
 I_O__c != AutoIO__c|AutoIO__c=234955 , I_O__c=234955
11:08:17.0 (138107478)|VALIDATION_PASS
11:08:17.0 (138110350)|VALIDATION_RULE|03d80000000TZ79|Rep_no_change_total_after_contract_sent
11:08:17.0 (138269689)|VALIDATION_FORMULA|ISCHANGED(Opportunity_Total__c ) && 
$UserRole.Name = 'B2B Tech Rep' &&     
(
ISPICKVAL(StageName , 'Contract Sent') &#124;&#124;
ISPICKVAL(StageName , 'Close Within (1) Week') &#124;&#124;
ISPICKVAL(StageName , 'Closed Won') &#124;&#124;
ISPICKVAL(StageName , 'Closed Lost') &#124;&#124;
ISPICKVAL(StageName , 'Void/Cancel')
)|StageName=Advanced Negotiations , $UserRole.Name=System Admin , Opportunity_Total__c=null
11:08:17.0 (138279929)|VALIDATION_PASS
11:08:17.0 (138282683)|VALIDATION_RULE|03d80000000TUZK|ValueInPickList
11:08:17.0 (138419726)|VALIDATION_FORMULA|NOT(CONTAINS("Business to Business:Careers:Education:Financial Services:Home Services:Medical and Health:Travel:Advertising", TEXT(Category__c)))|Category__c=null
11:08:17.0 (138427087)|VALIDATION_PASS
11:08:17.0 (138429779)|VALIDATION_RULE|03d80000000Tc5i|B2BTech_Closed_Lost_Description_Required
11:08:17.0 (138598236)|VALIDATION_FORMULA|AND( ISPICKVAL(Account.Sub_category__c,'Business to Business - Tech'),
 Closed_Lost_Description__c ='',  OR(ISPICKVAL(StageName, 'Closed Lost')) )|Closed_Lost_Description__c=null , StageName=Advanced Negotiations , Account.Sub_category__c=null
11:08:17.0 (138606373)|VALIDATION_PASS
11:08:17.0 (138609219)|VALIDATION_RULE|03d80000000Tc5Y|B2BTech_Reason_Lost_Required
11:08:17.0 (138783050)|VALIDATION_FORMULA|AND( ISPICKVAL(Account.Sub_category__c,'Business to Business - Tech'),
 ISPICKVAL(Reason_Lost__c,''),  OR(ISPICKVAL(StageName, 'Closed Lost'),ISPICKVAL(StageName,'Void/Cancel')) )|Reason_Lost__c=null , StageName=Advanced Negotiations , Account.Sub_category__c=null
11:08:17.0 (138793120)|VALIDATION_PASS
11:08:17.0 (138797149)|VALIDATION_RULE|03d80000000TUci|Deal_Type_Total
11:08:17.0 (139156264)|VALIDATION_FORMULA|AND
(  Probability >= 0.50,
   RecordTypeId != '01280000000QEuM',
   RecordTypeId != '01280000000Bp05',
   RecordTypeId != '01280000000Bp03',
   RecordTypeId != '01280000000Bp06',
   RecordTypeId != '01280000000Bp07',
   RecordType.Name != 'EDU_BUDGET',
   ISPICKVAL (Account.Sub_category__c , 'Business to Business - Tech'),
   NOT(ISPICKVAL(Account.Originating_System__c, 'ITBE')),
   (
      NULLVALUE(Deal_Type_Click__c, 0) +
      NULLVALUE(Deal_Type_CPA__c, 0) +
      NULLVALUE(Deal_Type_Display__c, 0) +
      NULLVALUE(Deal_Type_eSeminar_percent__c, 0) +
      NULLVALUE(Deal_Type_other_percent__c, 0) +
      NULLVALUE(Deal_Type_Lead__c, 0)
   ) != 1
)|Deal_Type_CPA__c=null , Deal_Type_other_percent__c=null , RecordTypeId=01280000000Hqet , Deal_Type_Display__c=null , Probability=10.0 , Account.Originating_System__c=<Not Migrated> , RecordType.Name=EDU Budget , Deal_Type_Lead__c=null , Deal_Type_Click__c=null , Account.Sub_category__c=null , Deal_Type_eSeminar_percent__c=null
11:08:17.0 (139178030)|VALIDATION_PASS
11:08:17.0 (139180862)|VALIDATION_RULE|03d80000000TdkB|InvoiceNotesMax240Chars
11:08:17.0 (139246906)|VALIDATION_FORMULA|LEN(Invoice_Notes__c)  > 240|Invoice_Notes__c=null
11:08:17.0 (139252236)|VALIDATION_PASS
11:08:17.0 (139254856)|VALIDATION_RULE|03d80000000Aptd|StageNameIsNotNone
11:08:17.0 (139300766)|VALIDATION_FORMULA|ISPICKVAL(StageName , '--None--')|StageName=Advanced Negotiations
11:08:17.0 (139305707)|VALIDATION_PASS
11:08:17.0 (139313558)|CODE_UNIT_FINISHED|Validation:Opportunity:00622000002jJP3
11:08:17.0 (200133293)|CODE_UNIT_STARTED|[EXTERNAL]|Workflow:Opportunity
11:08:17.0 (227360016)|CODE_UNIT_FINISHED|Workflow:Opportunity
11:08:17.0 (238675011)|CODE_UNIT_FINISHED|VF Controller Save
11:08:17.241 (241425173)|SYSTEM_MODE_ENTER|true
11:08:17.241 (241638407)|SYSTEM_MODE_ENTER|true
11:08:17.0 (242121504)|SYSTEM_MODE_ENTER|true
11:08:17.269 (269720864)|SYSTEM_MODE_ENTER|true
11:08:17.269 (269929739)|SYSTEM_MODE_ENTER|true
11:08:17.0 (339122653)|VF_SERIALIZE_VIEWSTATE_BEGIN|066220000000ReR
11:08:17.0 (342512976)|VF_SERIALIZE_VIEWSTATE_END
11:08:17.0 (346352402)|CODE_UNIT_FINISHED|VF: /apex/Opportunity_YoY_Actuals
11:08:17.0 (347540377)|EXECUTION_FINISHED

 
I need to display multipicklist using HTML tags in VF page(standard controller on Account)
Multipicklist should show some list of contacts belonging to that account.

I already have a big VF page where I want to replace apex:selectlist with html select tag because apex:selectList is not mobile compatible.

Below is my code, it is not returning Contacts on multipicklist (LHS):

<apex:page standardController="Account" extensions="MultiSelectPicklist_HTML" sidebar="false" lightningStylesheets="{!$User.UIThemeDisplayed == 'Theme4t'}">
    <apex:form id="frm">
        <apex:pagemessages id="pgmsg"/>
        <apex:pageBlock mode="edit" id="PB" >
 
           <apex:pageBlockSection columns="2" id="pbs1">
            Client Attendee<div style="color:red;font-size:20px;" > * </div>                    
            <apex:actionRegion id="ar">
                <apex:panelGrid columns="4" id="grid1" >
                    <select name="sel1" multiple="multiple" style="width:150px;height:100px;" size="5" value="{!leftselected}">    
                        <apex:repeat value="{!unselectedvalues}" var="con" id="theRepeat1">
                            <apex:selectOption itemValue="{!con.Id}" itemLabel="{!con.Name}" />
                        </apex:repeat>                           

                    </select>
                    <apex:panelGroup >
                        <br/>                                    
                        <apex:commandButton value=">>" action="{!selectclick}" reRender="grid1"/> <br/><br/>
                        <apex:commandButton value="<<" action="{!unselectclick}" reRender="grid1"/>
                    </apex:panelGroup>
                   <select name="sel2" multiple="multiple" style="width:150px;height:100px;" size="5" value="{!rightselected}">    
                        <apex:repeat value="{!selectedvalues}" var="con" id="theRepeat2">
                            <apex:selectOption itemValue="{!con.Id}" itemLabel="{!con.Name}" />
                        </apex:repeat>
                    </select>                               
                </apex:panelGrid>

            </apex:actionRegion> 
        </apex:pageBlockSection>
    </apex:pageBlock>
</apex:form> 
</apex:page>



..........


public class MultiSelectPicklist_HTML {
    
    Public List<string> leftselected{get;set;} 
    public SelectOption[] unselectedvalues {get;set;}
    Public List<string> rightselected{get;set;} 
    public SelectOption[] SelectedValues {get;set;}
    Private String currentAccountId;
    
  public MultiSelectPicklist_HTML(ApexPages.StandardController controller) {
        
Account Acc = new Account();
        string aid =  System.currentPageReference().getParameters().get('id');
        currentAccountId = String.valueOf(aid).substring(0, 15);
        System.debug(currentAccountId+' '+aid);
        List<Contact> conList_Acc = new List<Contact>();
        //custom custom multi picklist
        leftselected = new List<String>();       
        rightselected = new List<String>();
        selectedvalues=new List<SelectOption>(); 
        unselectedvalues=new List<SelectOption>();   
        
        conList_Acc =[Select id,name,Salutation,AccountId,Title from Contact where accountid =:currentAccountId order by Name];
            System.debug(conList_Acc); 
            if(conList_Acc.Size()>0){
                unselectedvalues.clear();
                for(Contact c : conList_Acc){
                    System.debug(String.valueOf(c.AccountId).substring(0, 15));
                    System.debug(currentAccountId);
                    if(String.valueOf(c.AccountId).substring(0, 15) == currentAccountId){                            
                        unselectedvalues.add(new SelectOption(c.Id,c.Name));
                    }
                }
            }       
            System.debug(unselectedvalues);
    }
    
    public PageReference selectclick(){
        List<SelectOption>  templeft = new List<SelectOption>();
        system.debug('selectedvalues--');
        for(Selectoption s : unselectedvalues)
        {            
            if(leftselected.contains(s.getvalue()))
            {
                SelectedValues.add (new SelectOption(s.getvalue(),s.getlabel()));                
            }
            else
            {
                templeft.add (new SelectOption(s.getvalue(),s.getlabel()));
            }            
        }
        unselectedvalues = templeft;        
        return null;        
    }
    
    public PageReference unselectclick(){        
        List<SelectOption>  tempRight = new List<SelectOption>();
        system.debug('selectedvalues--');
        for(Selectoption s : selectedvalues)
        {            
            if(rightselected.contains(s.getvalue()))
            {
                unSelectedValues.add (new SelectOption(s.getvalue(),s.getlabel()));                
            }
            else
            {
                tempRight.add (new SelectOption(s.getvalue(),s.getlabel()));
            }            
        }
        selectedvalues = tempRight;        
        return null;
    }
}


Please help me in figuring out the issue .Please advise.
Hello, what is the best way to see if my newly created LWC is working as expected? I am trying to get around creating a lightning app everytime.  In Aura we had an option to create an aura app, Is there anyway I can see the changes locally without pushing the changes to Salesforce org? Thanks for all the help!

Hi,

I have one custom object (gpt__DupesPreventor_Setting__c) & it has one picklist field which contains all sObjects in our org (gpt__Enable_Object__c).

I made one custom Visualforce Page & i want to show this picklist values based on javascript onclick button.

 

When i select a one sObject from this PickList then it enable (& Emidiatly show "Disable " button in front of these selected sObject).

 

When i click on this "Disable" button, then these perticular records gets "Disable".

 

Hopes someone from this community, coz i already wasted my two days to reasrech on this specific task.

 

Anyone Help greatly appreciate.

 

Thnaks.

SalesforceDeveloper.

I got this message, how can I fixt it?

We can't save this record because the “Opportunity - Set contracted checkbox at Close/Won” process failed. Give your Salesforce admin these details. This error occurred when the flow tried to update records: FIELD_CUSTOM_VALIDATION_EXCEPTION: You cannot update a Closed opportunity. Please reach out to Sales Operations. (Message 6). You can look up ExceptionCode values in the SOAP API Developer Guide. Error ID: 947061604-44277 (-183323947)

I converted my lightning:combobox into slds combobox to use data attributes, now, dropdown is not showing. Please help me.

And also, how to put the selected item into input textbox?

<aura:attribute name="myObject" type="List"/>
<aura:attribute name="myCustomSettings" type="MyCustomSettings__c[]"/>

<aura:iteration items="{!v.myCustomSettings}" var="obj" indexVar="index">
	<tr class="slds-hint-parent">
		<td role="gridcell" data-label="Object">
			<div class="slds-form-element slds-form-element__control">
				<div class="slds-combobox_container">
					<div aura:id="open" class="slds-combobox slds-dropdown-trigger slds-dropdown-trigger_click" aria-expanded="true" aria-haspopup="listbox" role="combobox">
						<div class="slds-combobox__form-element slds-input-has-icon slds-input-has-icon_right" role="none">
							<input type="text" class="cellField slds-input slds-combobox__input" role="textbox" autocomplete="off" readonly="true"
									aura:id="allObjects"
									placeholder="-Select-"
									data-id="{!'index-' + index + 1}"
									data-value="{!index + 1}"
									value="{!obj.Object__c}"
									onfocus="{!focus}"/>
							<span class="slds-icon_container slds-icon-utility-down slds-input__icon slds-input__icon_right">
								<lightning:icon class="slds-icon slds-icon-text-default slds-icon_xx-small" iconName="utility:down" size="xx-small" variant="brand" />
							</span>
						</div>
						<div aura:id="options" class="slds-dropdown slds-dropdown_length-5 slds-dropdown_fluid" role="listbox">
							<ul class="slds-listbox slds-listbox_vertical" role="presentation">
								<aura:iteration items="{!v.myObject}" var="myLst" indexVar="i">
									<li aura:id="selectObj" role="presentation" class="slds-listbox__item" onclick="{!c.itemSelected}" data-id="{!'index-' + i + 1}" data-value="{!i + 1}">
										<div id="{!i + 1 + '-item'}" aura:id="is-selected" class="slds-media slds-listbox__option slds-listbox__option_plain slds-media_small" role="option">
											<span class="slds-media__figure slds-listbox__option-icon"></span>
											<span class="slds-media__body">
												<span class="slds-truncate" title="{!myLst.label}">{!myLst.label}</span>
											</span>
										</div>
									</li>
								</aura:iteration>
							</ul>
						</div>
					</div>
				</div>
			</div>
		</td>
	<tr>
<aura:iteration/>
 
focus : function (component, event, helper) {
	var open = component.find("open");
	$A.util.toggleClass(open, 'slds-is-open');
},
 
itemSelected : function(component, event, helper) {
        var selectedItem = event.currentTarget;
        var id = selectedItem.dataset.id;
        var elements = component.find('selectObj');
        for (var i = 0; i < elements.length; i++) {
            var val = elements[i].getElement().getAttribute('data-id');
            if(val == id) {
                console.log(val);
                //put the selected item to input textbox
            }
        }
    },
Hi All,
I am new to Salesforce Lightning, Please help me to do this requirement.
I tried by using  '$A.get( 'e.force:createRecord' )' this standard event but its not working.
Thanks in advance...
I want to change the color of the Call logo based on what is in the 'type field' for example IF the Type' states "Task - Call' I would the Logged a call Icon to be green and if the type states "Task - left message" I want the Icon to be red. 

Please bear in mind I am not a developer so please can we try and give me step by step guide on how this can be achieved if possible? 
THANK YOU SO MUCH! 

User-added image