• Arun Kumar 1141
  • SMARTIE
  • 1610 Points
  • Member since 2023

  • Chatter
    Feed
  • 47
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 0
    Questions
  • 572
    Replies
  private Decimal getCarAllowances() {
    Decimal value = 0;

    for (Pay_Element__c payElement : payElements) {
      if (payElement.Is_Addition__c && payElement.Car_Allowance__c) {
      value += payElement.Value__c;
      }
    }
    
    return value;
  }

Logical operator can only be applied to Boolean is the error I receive for this method. 

  private Decimal getCarAllowances() {
    Decimal value = 0;

    for (Pay_Element__c payElement : payElements) {
      if (payElement.Is_Addition__c == payElement.Car_Allowance__c) {
      value += payElement.Value__c;
      }
    }
    
    return value;
  }

Comparison arguments must be compatible types: Boolean, Decimal is the error I receive for this one.

 

Hi,
  I am new in LWC, I have a dynamic table to add and delete rows and adding a product. Besides to delete the row, I would like to delete the corresponding record as well, does anybody has idea?

MY HTML CODE :
<template>
<lightning-card title="Create & Delete Products">
<template for:each={itemList} for:item="item" for:index="index">
<lightning-record-edit-form key={item.id} object-api-name="Product2">
<lightning-messages> </lightning-messages>
<lightning-layout multiple-rows>
<lightning-layout-item size="12" small-device-size="6" medium-device-size="4" large-device-size="2"
padding="around-small">
<lightning-input-field field-name="Name" variant="label-stacked" required>
</lightning-input-field>
</lightning-layout-item>
<lightning-layout-item size="12" small-device-size="6" medium-device-size="4" large-device-size="2"
padding="around-small">
<lightning-input-field field-name="ProductCode" variant="label-stacked" required>
</lightning-input-field>
</lightning-layout-item>
<lightning-layout-item size="12" small-device-size="6" medium-device-size="4" large-device-size="2"
padding="around-small">
<lightning-input-field field-name="Quantity__c" variant="label-stacked" required>
</lightning-input-field>
</lightning-layout-item>
<lightning-layout-item size="12" small-device-size="6" medium-device-size="4" large-device-size="2"
padding="around-small">
<lightning-input-field field-name="Price__c" variant="label-stacked" required>
</lightning-input-field>
</lightning-layout-item>
<lightning-layout-item size="12" small-device-size="6" medium-device-size="4" large-device-size="2"
padding="around-small">
<div class="slds-p-top_medium">
<lightning-icon icon-name="action:new" access-key={item.id} id={index}
alternative-text="Add Row" size="small" title="Add Row" onclick={addRow}>
</lightning-icon>
<lightning-icon icon-name="action:delete" access-key={item.id} id={index}
alternative-text="Delete Row" size="small" title="Delete Row" onclick={removeRow}>
</lightning-icon>
</div>
</lightning-layout-item>
</lightning-layout>
</lightning-record-edit-form>
</template>
</br>
<lightning-layout>
<div class="slds-align_absolute-center">
<lightning-button variant="success" onclick={handleSubmit} name="submit" label="Submit">
</lightning-button>
</div>
</lightning-layout>
</lightning-card>
</template>


MY JS CODE :
import { LightningElement, track } from 'lwc';
import { NavigationMixin } from 'lightning/navigation';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
export default class CreateDeleteProducts extends LightningElement {
keyIndex = 0;
@track itemList = [
{
id: 0
}
];
addRow() {
++this.keyIndex;
var newItem = [{ id: this.keyIndex }];
this.itemList = this.itemList.concat(newItem);
}
removeRow(event) {
if (this.itemList.length >= 2) {
this.itemList = this.itemList.filter(function (element) {
return parseInt(element.id) !== parseInt(event.target.accessKey);
});
}
}
handleSubmit() {
var isVal = true;
this.template.querySelectorAll('lightning-input-field').forEach(element => {
isVal = isVal && element.reportValidity();
});
if (isVal) {
this.template.querySelectorAll('lightning-record-edit-form').forEach(element => {
element.submit();
});
this.dispatchEvent(
new ShowToastEvent({
title: 'Success',
message: 'Products created successfully',
variant: 'success',
}),
);
// Navigate to the Product home page
this[NavigationMixin.Navigate]({
type: 'standard__objectPage',
attributes: {
objectApiName: 'Product2',
actionName: 'home',
},
});
} else {
this.dispatchEvent(
new ShowToastEvent({
title: 'Error creating record',
message: 'Please enter all the required fields',
variant: 'error',
}),
);
}
}
}

Hi,
  I am new in writing LWC. Just wondering how to display related contacts that associated with an account with datatable. ANy example is appreciated.

Thanks,
    Jo
Hello,
In the formula below, I would like the outcome of the Formula to enter the correct image into the Deal Approval Required field. Green, Blue, Yellow, etc. The first part of the formula is working as expected, so Approval Not Required is being entered if amount >7500 is working, but rest of the formula is not working correctly. Any ideas or suggestions would be appreciated. Thanks.  

IF(
    SBQQ__NetAmount__c > 7500, 
    "Approval Not Required",
    IF(
        SBQQ__NetAmount__c <= 7500 && ISBLANK(CPQ_Approval_Level_MAX__c), 
        "Approval Required ",
        CASE(
    CPQ_Approval_Level_MAX__c,
    1, IMAGE('https://jmpsoftware--main2--c.documentforce.com/servlet/servlet.ImageServer?id=0155b000006hl9z&oid=00D8K0000004cJ1&lastMod=1652276904000', "Green"),
    2, IMAGE('https://jmpsoftware--main2--c.documentforce.com/servlet/servlet.ImageServer?id=0158K0000000Xrs&oid=00D8K0000004cJ1&lastMod=1652276872000', 'Blue'),
    3, IMAGE('https://jmpsoftware--main2--c.documentforce.com/servlet/servlet.ImageServer?id=0155b000006hl9y&oid=00D8K0000004cJ1&lastMod=1652276772000', 'Yellow'),
    4, IMAGE('https://jmpsoftware--main2--c.documentforce.com/servlet/servlet.ImageServer?id=0155b000006hlA0&oid=00D8K0000004cJ1&lastMod=1652276863000', 'Red'),
    5, IMAGE('https://jmpsoftware--main2--c.documentforce.com/servlet/servlet.ImageServer?id=0155b000006hl9x&oid=00D8K0000004cJ1&lastMod=1652290642000', 'Black'),
    "N/A"
)
    )
)

Hello Everyone,
I need to pass dynamic data -id to this.template.querySelectorAll("lightning-input-field[data-id= 'accountId']"); 

for (let i = 0; i < this.accounts.length; i++) {
var accountId = this.accounts[i].Id;
 const temp =   this.template.querySelectorAll("lightning-input-field[data-id= 'accountId']");
               console.log('temp',temp[2]);
               temp[2].value = dateToday.toJSON().slice(0, 10);
}
// var accountId is not working here
accountId is not working here but if i pass hard coded id like 
const temp = this.template.querySelectorAll("lightning-input-field[data-id= '0069I000003OWmc']");
 
html 

    <lightning-input-field 
                                                        field-name="Year_Months_To__c"
                                                        variant= "label-hidden"
                                                        data-id={acc.Id} 
                                                        value={yearsMonthsTo}
                                                        onchange={handleDateTo}
                                                        required> 
     </lightning-input-field>

Please help me on the same. Thanks in advance
I am new to LWC and trying to fetch the records in the Lightning Datatable, which is working fine. After that i am trying to insert a record into the same using the record edit form and using refreshApex to display the inserted record immediately.
Can someone help me with the same?
PFA the code snippet for the same
@wire (getAccData,{recordId: '$recordId'})
    getAccTable({data, error}){
        if(data){   
            this.tableData = data;
        }
        else{
            console.log(error);
        }
    }

Here, i am storing the data returned from apex in tableData and then calling the same table data in refreshApex. But it's not working.

handleSave(){
        insertAcc({name : this.name})
        .then((result) => {
          this.result = result;
          return refreshApex(this.tableData);
        })
        .catch((error) => {
          this.error = error;
        });
    }
Hi all, I am trying to create a validation rule to ensure a DATE field is populated if the pick list value of another field is set to certain value.  here is what I have and the error that I am getting:

AND(ISPICKVAL (Stage__c ="Scheduled"),ISBLANK(Scheduled_date__c =""))

Error: Error: Field Stage__c is a picklist field. Picklist fields are only supported in certain functions

 
Hello, I have a question. Can I modify the order of list views, I mean the list views within this box, in Salesforce?sample
Hello, 

I'm building a flow and i need to strip an ID from a response.  Could someone help me with a formula that will take this text...

{"data":425478,"responseId":"154b3a3447a0","timeStamp":"2023-06-21T17:56:13.6865742+00:00","httpStatusCode":201,"isOk":true,"messages":[{"httpStatusCode":201,"messageCode":"CREATED","title":"Item was created","detail":"Call Report 425478 created","isOk":true}],"maxMessageIndex":0,"_v":"AD"}

...and return only the 6 digit ID from after the "data": 

So in the above example i would want 425478 returned only. 

Thanks in advance!  
 
Hi together,
I am trying to build a report of leads or contacts who have responded in form of an email/LI message or answered a cold call, without any follow-ups or activity by my side.

How would you go on on creating this report and which fields to use?
List<Account> accountstoUpdate = new List<Account>();
For(Account thisAccount : [Select id, Status FROM Account LIMIT 50000]){
ThisAccount.Status = ‘Active’;
AccountsToUpdate.add(thisAccount);
}
try{
Database.update(AccountstoUpdate,false);
}catch (Exception e){
System.debug(e.getMessage());
}
If I have UserRole Name , then how to fetch ID for it in Apex. This is not for current user info

I came across an error in which I got in a record triggered flow Too many SOQL Queries). It is a. In which a "get record" element which queries contacts by comparing the ids present in another list and having couple of other conditions which checks whether some fields should not be null. The flow element is not present in any loops. can you please tell me in which other direction i can look to solve this issue
I have a custom button in a custom object and
on clicking the button,
It (Screen Flow) purchases reports from vendor portal based on information available in the record and creates another record in the related object.
Now, I have to display a text message( Reports already been purchased, Do you really want to continue?) to user when they try to click on this button even though there is a report which already has been purchased, Just to prevent unnecessary purchases.
But if they continue on purpose, it should be working as usual and purchase a report.
If that particular related object has more than 0 records, this popup should be displayed. Any ideas on how i can accommodate this in the existing flow? Any help or insights would be appreciated.
  • October 31, 2023
  • Like
  • 0
  private Decimal getCarAllowances() {
    Decimal value = 0;

    for (Pay_Element__c payElement : payElements) {
      if (payElement.Is_Addition__c && payElement.Car_Allowance__c) {
      value += payElement.Value__c;
      }
    }
    
    return value;
  }

Logical operator can only be applied to Boolean is the error I receive for this method. 

  private Decimal getCarAllowances() {
    Decimal value = 0;

    for (Pay_Element__c payElement : payElements) {
      if (payElement.Is_Addition__c == payElement.Car_Allowance__c) {
      value += payElement.Value__c;
      }
    }
    
    return value;
  }

Comparison arguments must be compatible types: Boolean, Decimal is the error I receive for this one.

 
We are trying to use Bulk 2.0 to update Records. I get the above error while doing so. 
Is there a programatic way we can know wether the field is indexed or not. I didnt find anything in describe object call.
Hi Everyone,

I stuck with this error now give me some solution.

ERROR 
System.DmlException: Insert failed. First exception on row 0; first error: FIELD_INTEGRITY_EXCEPTION, field integrity exception: []

Thank you for Help 

This code 
@isTest
public class UpdateOpportunityToTotalValueTest {
    @isTest
    static void testInsertOpportunityLineItems() {
       
        Pricebook2 priceBook = new Pricebook2(Name = 'Test Pricebook');
        insert priceBook;
       
        Pricebook2 standardPB = [SELECT Id FROM Pricebook2 WHERE isStandard=true LIMIT 1];
       
        Product2 product1 = new Product2(
            Name = 'Product1',
            ProductCode = 'P1',
            Description = 'Product Test 1'
        );
        Product2 product2 = new Product2(
            Name = 'Product2',
            ProductCode = 'P2',
            Description = 'Product Test 2'
        );
        insert product1;
        insert product2;
        PricebookEntry standardPrice = new PricebookEntry(
             Pricebook2Id = standardPB.Id,
             Product2Id = product1.Id,
             UnitPrice = 10000,
             IsActive = true,
             UseStandardPrice = true          
        );
        insert standardPrice;
        PricebookEntry priceCustom1 = new PricebookEntry(
            Pricebook2Id = priceBook.Id,
            Product2Id = product1.Id,
            UnitPrice = 100.00,
            UseStandardPrice = false,
            IsActive = true
        );
        insert priceCustom1;
       
        PricebookEntry priceCustom2 = new PricebookEntry(
            Pricebook2Id = priceBook.Id,
            Product2Id = product2.Id,
            UnitPrice = 50.00,
            UseStandardPrice = false,
            IsActive = true
        );
       
        insert priceCustom2;
       
        Opportunity testOpportunity = new Opportunity(
            Name = 'Test Opportunity',
            StageName = 'Closed Won',
            CloseDate = Date.today(),
            TotalValue__c = 0,
            Pricebook2Id = priceBook.Id
        );
        insert testOpportunity;
       
        OpportunityLineItem oline1 = new OpportunityLineItem(
            OpportunityId = testOpportunity.Id,
            PricebookEntryId = priceCustom1.Id,
            Quantity = 2
        );
        OpportunityLineItem oline2 = new OpportunityLineItem(
            OpportunityId = testOpportunity.Id,
            PricebookEntryId = priceCustom2.Id,
            Quantity = 1
        );
        List<OpportunityLineItem> oppLineToUpdate = new List<OpportunityLineItem>{oline1, oline2};
        insert oppLineToUpdate;
        testOpportunity = [SELECT TotalValue__c FROM Opportunity WHERE Id = :testOpportunity.Id];
        System.assertEquals(250.00, testOpportunity.TotalValue__c);
    }
}
 

Hi All,

I am getting error:
"Method does not exist or incorrect signature: void returnAverageSum(List<Opportunity>) from the type PracticeApex" . Kindly help me in resolving above error.

Here is my code

public class PracticeApex{
    public static void retrunAverageSum(List<Opportunity> ol){
        Integer avg=0;
        Integer sum=0;
        Integer size= ol.size();
        for(Opportunity o: ol){
           sum=sum+o.Amount.IntValue();           
        }
        avg=sum/size;
    System.debug(avg);
    }
    }

from Dev Console:

PracticeApex pa=new PracticeApex();
List<Opportunity> opp=[Select Id, Amount from Opportunity];
pa.returnAverageSum(opp);

I'm trying to create a formula checkbox to indicate if a donor qualifies for our "Giving circle" -- the criteria is that they made any recurring gifts that year OR gifted $1000 or more that year.

My field names are definitely correct, and either condition works on its own, but when I try to combine them as an OR formula it just tells me "syntax error". I've tried with and without parentheses. What am I missing here?

Formula return type = checkbox

Formula: (Recurring_Gift_Number_Last_Year__c >= 1)OR(TLCircle_Total_LastYear__c >= 1000)
 
/*Future Method 3: Upon Account record creation if the industry has the value as 'Media' or 'Enery' then populate the Rating as 'Hot'.

- Create Class With Fututre Method
- Call it from an anonymous window
- Create a Test Class*/

 
public class FutureMethodPopulateRatingAsHot {

    @future
    public static void populateRaingAsHot(List<Id> accIds) {
        
        List<Account> accRecords = [SELECT Id, Industry, Rating
                                   FROM Account WHERE (Industry = 'Media'
                                   OR Industry = 'Energy') AND Rating != 'Hot'];
        
        if(!accRecords.isEmpty()) {
            for(Account acc : accRecords) {
                acc.Rating = 'Hot';
            }
        }
        update accRecords;
    }
}
---------------------------------------------------------------------------------------------

For the above future method, the test class I wrote is giving only 66% code coverage.

I tried a lot, but not able to get maximum code coverage. Can somebody please help?

 
@isTest
private class FutureMethodPopulateRatingAsHotTest {
    
    @isTest
    static void populateRaingAsHotTest() {
        
        List<Account> accList = new List<Account>();
        
        for(Integer i=1; i<=100; i++) {
            Account acc = new Account();
            acc.Name= 'Test Name' + i;
            acc.Industry = 'Energy';
            acc.Rating = 'Warm';
            
            accList.add(acc);
            
            Account acc2 = new Account();
            acc2.Name = 'Test Name2 ' + i;
            acc2.Industry = 'Media';
            acc.Rating = 'Warm';
            
            accList.add(acc2);
        }
        Test.startTest();
        insert accList;
        
        List<Id> accIds = new List<Id>();
        
        for(Account acc : accList) {
            if(acc.Industry == 'Energy' || acc.Industry == 'Media') {
                acc.Rating = 'Hot';
                accIds.add(acc.Id);
            }
        }
        update accList;
        
        FutureMethodPopulateRatingAsHot.populateRaingAsHot(accIds);
        Test.stopTest();
        
        List<Account> accRecords = [SELECT Id, Industry, Rating
                                    FROM Account WHERE Id =: accList[0].Id];
        
        System.assertEquals('Hot', accRecords[0].Rating, 'Rating Not Updated');
    }
}

 

Hi,
  I am new in LWC, I have a dynamic table to add and delete rows and adding a product. Besides to delete the row, I would like to delete the corresponding record as well, does anybody has idea?

MY HTML CODE :
<template>
<lightning-card title="Create & Delete Products">
<template for:each={itemList} for:item="item" for:index="index">
<lightning-record-edit-form key={item.id} object-api-name="Product2">
<lightning-messages> </lightning-messages>
<lightning-layout multiple-rows>
<lightning-layout-item size="12" small-device-size="6" medium-device-size="4" large-device-size="2"
padding="around-small">
<lightning-input-field field-name="Name" variant="label-stacked" required>
</lightning-input-field>
</lightning-layout-item>
<lightning-layout-item size="12" small-device-size="6" medium-device-size="4" large-device-size="2"
padding="around-small">
<lightning-input-field field-name="ProductCode" variant="label-stacked" required>
</lightning-input-field>
</lightning-layout-item>
<lightning-layout-item size="12" small-device-size="6" medium-device-size="4" large-device-size="2"
padding="around-small">
<lightning-input-field field-name="Quantity__c" variant="label-stacked" required>
</lightning-input-field>
</lightning-layout-item>
<lightning-layout-item size="12" small-device-size="6" medium-device-size="4" large-device-size="2"
padding="around-small">
<lightning-input-field field-name="Price__c" variant="label-stacked" required>
</lightning-input-field>
</lightning-layout-item>
<lightning-layout-item size="12" small-device-size="6" medium-device-size="4" large-device-size="2"
padding="around-small">
<div class="slds-p-top_medium">
<lightning-icon icon-name="action:new" access-key={item.id} id={index}
alternative-text="Add Row" size="small" title="Add Row" onclick={addRow}>
</lightning-icon>
<lightning-icon icon-name="action:delete" access-key={item.id} id={index}
alternative-text="Delete Row" size="small" title="Delete Row" onclick={removeRow}>
</lightning-icon>
</div>
</lightning-layout-item>
</lightning-layout>
</lightning-record-edit-form>
</template>
</br>
<lightning-layout>
<div class="slds-align_absolute-center">
<lightning-button variant="success" onclick={handleSubmit} name="submit" label="Submit">
</lightning-button>
</div>
</lightning-layout>
</lightning-card>
</template>


MY JS CODE :
import { LightningElement, track } from 'lwc';
import { NavigationMixin } from 'lightning/navigation';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
export default class CreateDeleteProducts extends LightningElement {
keyIndex = 0;
@track itemList = [
{
id: 0
}
];
addRow() {
++this.keyIndex;
var newItem = [{ id: this.keyIndex }];
this.itemList = this.itemList.concat(newItem);
}
removeRow(event) {
if (this.itemList.length >= 2) {
this.itemList = this.itemList.filter(function (element) {
return parseInt(element.id) !== parseInt(event.target.accessKey);
});
}
}
handleSubmit() {
var isVal = true;
this.template.querySelectorAll('lightning-input-field').forEach(element => {
isVal = isVal && element.reportValidity();
});
if (isVal) {
this.template.querySelectorAll('lightning-record-edit-form').forEach(element => {
element.submit();
});
this.dispatchEvent(
new ShowToastEvent({
title: 'Success',
message: 'Products created successfully',
variant: 'success',
}),
);
// Navigate to the Product home page
this[NavigationMixin.Navigate]({
type: 'standard__objectPage',
attributes: {
objectApiName: 'Product2',
actionName: 'home',
},
});
} else {
this.dispatchEvent(
new ShowToastEvent({
title: 'Error creating record',
message: 'Please enter all the required fields',
variant: 'error',
}),
);
}
}
}

I have one date input field and we have some list of records when we enter the date filed. the date is grater than the enter date filed those records only want to show in display list how can we achieve this. In LWC any one can help me in this.
Hi ,

Based on record type need to render lwc.html . how to achieve this scenario.

Thanks
KMK
  • September 26, 2023
  • Like
  • 0
Hi,
  I am new in writing LWC. Just wondering how to display related contacts that associated with an account with datatable. ANy example is appreciated.

Thanks,
    Jo

Hi all,

I am trying to authorize an ogr on VS Code but I could not solve the following problem. 

SFDX: Authorize an Org failed to run

Source: Salesforce CLI integration (extention)

I installed CLI and CLI extention from extentions.

 

Please help. 

Han

Hello,
i am working on cpq we have scenario that there should button on quote.on button click one span sign template should create.in conga sign we have option to upload document but dont want to upload document we need to use quote fields insted of document.how can achieve this.
Hi all.

I have a problem trying to pass the (Account) recordId from the Lightning page to an LWC to an Apex class.

This is a line chart I plan to show in the Account detail page, but I am unable to pass the record Id from the page to LWC to Apex class. The LWC is used in a screen flow. In the Lightning page I pass the record Id.

JS:
import {LightningElement, wire, track, api} from 'lwc';
    import { getRecord } from 'lightning/uiRecordApi';
    import getEstosDatos from '@salesforce/apex/BC_PuntajeActor3valores.getEstosDatos';
    export default class BC_PuntajeActor3valores extends LightningElement {
        @api recordId;
        @track chartConfiguration;
        @track data;
        @wire(getEstosDatos , { recordId: "$recordId"})
        WireGetEstosDatos({error, data}) {
            if (error) {
                this.error = error;
          console.log('error => ' + JSON.stringify(error));
          this.chartConfiguration = undefined;
            } else if (data) {
                    let chartData = []; 
(...)

Apex class:
 
public class BC_PuntajeActor3valores {
    @AuraEnabled(cacheable=true)
    public static List<BC_Puntaje_semanal_actor__c> getEstosDatos(String actorId){
        return BC_PuntajeActor3valores.obtenerDatosGrafico(actorId);
    }
    
    @RemoteAction
    public static List<BC_Puntaje_semanal_actor__c> obtenerDatosRemotos(String actorId){
        return BC_PuntajeActor3valores.obtenerDatosGrafico(actorId);
    }
    
    public static List<BC_Puntaje_semanal_actor__c> obtenerDatosGrafico(String actorId){
        List<BC_Puntaje_semanal_actor__c> estosDatos = new List<BC_Puntaje_semanal_actor__c>();
        idActor=id.valueof(actorId);
        estosDatos = [select id, BC_Fecha__c, BC_Puntaje__c, BC_Orden__c from BC_Puntaje_semanal_actor__c where BC_Actor__c =: idActor order by BC_Orden__c];
        system.debug(estosDatos);
        return estosDatos;
    }
}


Note that if I change the 
@wire
line to
@wire(getEstosDatos , { recordId: "001H..."}) // this is an actual account record Id.
it does the trick (so I understand all the logic works, except that I'm unable to pass the record Id from the page to the LWC to the class).

Any help would be greatly appreciated!

Thx​​​​​​​
i have opened two pop up modal with the help of LWC components and want to close automatically first modal pop up .Can you any one help of this scenario.
This is my first validation rule :
AND(
RecordType.DeveloperName = 'Final_Custom_Config',
$User.Bypass_Validation__c = False,

OR(
IF(
NOT(
OR(
ISPICKVAL(OTP_Protocol_Slot_1__c ,'Yubico OTP w/Yubicloud'),
ISPICKVAL(OTP_Protocol_Slot_1__c ,'OATH/HOTP w/Symantec VIP'),
ISPICKVAL( OTP_Protocol_Slot_1__c , 'None')
)
),
IF(ISBLANK(Public_PGP_Key__c), TRUE, FALSE), FALSE
),

IF(
NOT(
OR(
ISPICKVAL( OTP_Protocol_Slot_2__c ,'Yubico OTP w/Yubicloud'),
ISPICKVAL( OTP_Protocol_Slot_2__c ,'OATH/HOTP w/Symantec VIP'),
ISPICKVAL( OTP_Protocol_Slot_2__c , 'None')
)
),
IF( ISBLANK( Public_PGP_Key__c ) , TRUE , FALSE), FALSE
)
)
)

This is my second validation rule:
and( Batch_Master_Key_BMK_provided__c = true, Public_PGP_Key__c = NULL)


I have to combine the second VR into first in such a way that both VR should work. 
Unable to view Walkthrough Promots in salesforce . getting error as "You can't open the in-app guidance because it isn't available or you don't have access. Contact your Salesforce admin for help."