• Carolina W 2
  • NEWBIE
  • 89 Points
  • Member since 2021

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 20
    Questions
  • 23
    Replies
I want to create a formula that sends out a specific email alert after a case has been re-opened - I want it to go something like this.

ISPICKVAL([Case].Status, "Open"),

ISPICKVAL(PRIORVALUE([Case].Status), "Resolved (User Confirmed)"),
OR
ISPICKVAL(PRIORVALUE([Case].Status), "Resolved (CS Confirmed)"),
OR
ISPICKVAL(PRIORVALUE([Case].Status), "Resolved (User Unconfirmed)"),
OR
ISPICKVAL(PRIORVALUE([Case].Status), "Closed"),

But Im having trouble in the placements of OR and the relevant syntax. Can anyone help the proper format of the code above?

Thank you!
I'm trying to send a data of a response in the function callModal(this.addressRespose) in my LWC, but the response is a Proxy container with format like 
Proxy {}[[Handler]]: En[[Target]]: Array(0)[[IsRevoked]]: false
On opening the [[Target]], and after on expanding the originalTarget , my data is shown.
How do I get this data to send properly to the function in LWC ?
I tried 
let objUncovered = JSON.parse(JSON.stringify(objWhichIsCoveredWithProxy));
 but it only works in the console.log().

Resuming:
this.addressRespose is sending like a proxy to "c-modal-lwc" and I don't know how can I access the original data in  "c-modal-lwc".
import { LightningElement, api, track} from 'lwc';
import { OmniscriptActionCommonUtil } from "vlocity_cmt/omniscriptActionUtils";
import { getNamespaceDotNotation } from "vlocity_cmt/omniscriptInternalUtils";
import { OmniscriptBaseMixin } from 'vlocity_cmt/omniscriptBaseMixin';

export default class buttonlwc extends OmniscriptBaseMixin(LightningElement) {
    
    @api streetnr;
    @api postalcode;

    _ns = getNamespaceDotNotation();
    _actionUtilClass;

    connectedCallback() {
        this._actionUtil = new OmniscriptActionCommonUtil();
    }

    handleClick() {
        this.callModal();
        
    }

async callModal() {
    this.addressRespose = await getAddressDetails();
    this.template.querySelector("c-modal-lwc").callModal(this.addressRespose);
  }

  async getAddressDetails() {
    this.paramsGetAddress = {
      streetNr: this.streetnr,
      postalCode: this.postalcode,
    };

    let params = {
      input: JSON.stringify(this.paramsGetAddress),
      sClassName: `${this._ns}IntegrationProcedureService`,
      sMethodName: "GetAddress",
      options: "{}",
    };

    try {
      const response = await this._actionUtil.executeAction(params,null,this,null,null);
      return response;
    } catch (error) {
      console.error(error, "ERROR");
    }
  }

 

In Step 1 on an Omniscript, I have two text elements: "neighborhood" and "city".
There is also the "Search" button made in LWC. I need it to be disabled only if the fields "neighborhood" OR "city" are empty, but I'm not getting it... Can anyone help me? Here's what I tried to do initially:

Omniscript
User-added image

Preview
User-added image

searchButtonLWC.html
<template><div><lightning-button
            variant="destructive" 
            label="Search"
            onclick={handleClick}
            disabled={disableButton}
            class="slds-m-vertical_medium"></lightning-button></div></template>

​searchButtonLWC.js
import { LightningElement, api} from 'lwc';
import { OmniscriptActionCommonUtil } from "vlocity_cmt/omniscriptActionUtils";
import { getNamespaceDotNotation } from "vlocity_cmt/omniscriptInternalUtils";
import { OmniscriptBaseMixin } from 'vlocity_cmt/omniscriptBaseMixin';
 
export default class searchButtonLWC extends OmniscriptBaseMixin(LightningElement) {
 
    @api neighborhood;
    @api city;
   
    _ns = getNamespaceDotNotation();
    _actionUtilClass;
 
    connectedCallback() {
        this._actionUtil = new OmniscriptActionCommonUtil();
    }
 
    handleClick() {
    }   
 
    get requiredFieldsFilled(){
        return (this.neighborhood && this.city);
    }
 
    disableButton(){
        return !(this.requiredFieldsFilled());
    }
 
}


 
I am begging at Salesforce. I'm having the exception "Unable to connect to the server (transaction aborted: timeout)."

So I tried to configure 
{ buffer: true, escape: true, timeout: 120000 }
 as recommended on this link (https://developer.salesforce.com/docs/atlas.en-us.222.0.pages.meta/pages/pages_js_remoting_configuring_request.htm?search_text=component). But I have no idea where I have to put it. I read something about VisualForce, but i don't know where can I see the code to edit.
Could someone show me the way where I can find the code to enter the { buffer: true, escape: true, timeout: 120000 } ? Is it in the Developer Console?
I have a Remote Action inside a Type Ahead Block. This Remote Action calls an Apex Method that return the options to the Type Ahead Block.
When the users types, it is taking too much time to find the results. The results are not instantaneous, as usually. What could be happen?

Is there any documentation on using Type Ahead Block with Remote Action (Apex class)? I only found this (https://docs.vlocity.com/en/Adding-a-Type-Ahead-Block.html), but it does not explain much about the Remote Actions.

Hi!
Could anyone tell me why I can't display a Type Ahead Block that is within 2 Blocks? How do I get it displayed in this condition?
The example in the picture, TypeAhead3 is not being displayed. I would like to understand why.

Ps: TypeAhead3 and TypeAhead4 are the same and do not have any custom settings.

 

User-added image

 

I have to transform this method using another method of type Selector. Is it possible to make only one query in this case, respecting each criterion or will I have to create 4 selector's methods? I'm asking this because in each query the != is in a different position.

public static List<Product2> getProduct(String color, String brand,  String model){
        
        if (brand == null || brand == ''){
            return [SELECT Color__c, Name,Id, Photo__c, ProductCode FROM Product2 WHERE Brand__c != null AND Model__c != null AND Color__c != null];
        }else{
            if (model == null || model == ''){
                return [SELECT Color__c,Name,Id, Photo__c, ProductCode FROM Product2 WHERE Brand__c = :brand AND Model__c != null AND Color__c != null];
            } else{
                if (color == null || color == ''){
                    return [SELECT Color__c,Name,Id, Photo__c, ProductCode FROM Product2 WHERE Brand__c = :brand AND Model__c = :model AND Color__c != null];
                } else{
                    return [SELECT Color__c,Name,Id, Photo__c, ProductCode FROM Product2 WHERE Brand__c = :brand AND Model__c = :model AND Color__c = :color];    
                }
            }
        }
    }
I'm trying to edit these reports, but I can't click on them like in the pic. Besides that, I can't see them in the tab "Reports"or Setups...
Is it private to some user even though I am an administrator?

P.s: "Number" is a custom field in Account.

User-added image
I'm trying the create a Roll Up Summary Field that use the TeamMemberRole, but I can't see the name of the Object in the options (see the pic).
Somebody told me that I have to create a field type Master Detail Relationship to do it...But is there another way to do it without creating a useless field?

User-added image

Hi!
In the case of the image, the user Alanna Clark updated an account and my trigger runned and posted the FeedItem.

But I want to change the sender ("Alanna Clark")  for another the user called "INTERFACE" when the trigger runs. What do I have to do? 

//Feed Post
FeedItem post = new FeedItem();
post.Body = 'Msg body';
post.ParentId = acc.Id ;
insert post;
 

User-added image

Hi!

I have a field in "Account Team Member" called "MemberEnrollment__c" that have to get the value of "Enrollment__c" (field in "User")


How can I do it? I've tried by formula but I doesn't work...
DataLoader is not loading the column correctly.
I'm trying to update Task...But I get the error "Id not specified in an update call"
What do I have to do in this case?
User-added image
When I want to add a member, "Opportunity Access" is automatically filled like "Private". How can I change it and filled automatically like "Read Only"?

User-added image

I want to insert UserId of the SObject AccountTeamMember  in a formula field, but I'm not able to put this field...
How can I do it?

User-added image
 

We can see that I don't have the option to put UserId in the formula. 

I want that the user only can edit an opportunity field when he create the opportunity. 
After that, the field have to be only read.
I'm trying to allow only the Account's Owner and Account Team Members "001" to create opportunities. But I'm getting "The AccountTeamMember field does not exist".
How can I solve it?
 
OR($User.Id <> Account.Owner.Id, 
VLOOKUP(AccountTeamMember.TeamMemberRole, AccountTeamMember.UserId,$User.Id)<> "001")
How can I do it?
P.s: I'm talking about the Sobject AccountTeamMember.
I want to call a Before Update Trigger only when my Flow is running.
I created a checkbox field called "Run_code__c". The standard value is false.
My code:
for(Account acc:trigger.new){
   if(acc.run_code__c){ //Do stuff } 
   else { acc.addError('MsgError'); }

But how can I change run_code__c to "true" in the flow if the trigger will block it?
There is another way to solve it?
My goal is to run the Trigger Before Upadate only when my Flow is running.
Hi! 
I want to avoid this For loop inside another For... Is there any way?
 
public class ManagerAccountTeamMember {

  public static Boolean isFirstTimeBEFORE = true;

  public static void myMethod (List<AccountTeamMember> TeamMembers) {

    for( AccountTeamMember accTeamMember: TeamMembers){
        if(accTeamMember.TeamMemberRole == '001'){
           isFirstTimeBEFORE = false;
           accTeamMember.Code__c = '001';
         } 

         if(isFirstTimeBEFORE) {
            isFirstTimeBEFORE = false;

            Map<String,AccountTeamMember> accId_X_TeamMember = new Map<String,AccountTeamMember>();

             for(AccountTeamMember TeamMember : TeamMembers) {
                     accId_X_TeamMember.put(TeamMember.AccountId,TeamMember);
             }
    
             List<Account> accounts = [SELECT Id,RecordTypeId,OwnerId FROM Account WHERE Id IN: accId_X_TeamMember.keySet()];

             for(Account account : accounts) {
                 if(acc.OwnerId != UserInfo.getUserId()) {
accId_X_TeamMember.get(account.Id).addError('Msg');
                  }
              }
        }
   }
 }    
}

 

Hi! How can I fix this error?

 System.AsyncException: Future method cannot be called from a future or batch method

I guess this happen because my future method is an update and the Trigger is called in looping. So I created the boolean runTrigger to not run the trigger when it's false, but I don't know how to do it exactly.

P.s: It need to be a future method

Class

public class AccountUpdate {
    public static boolean runTrigger = true; //I create this variable to stop the looping, but I don't know where I have to put 'runTrigger = False;'
    
    //This future Mehod update the Account Name 
    @Future
	 public static void doAutomaticExternIntegration(List<Id> ids) {
         
         List<Account> accountsFound = [SELECT ID, Name FROM Account WHERE Id IN :ids];
        
        List<Account> accountToUpdate = new List<Account>();
         
          for (Account acc: accountsFound){
              
              acc.Name = 'ABCD';
              
              accountToUpdate.add(acc);
          }
         
         update accountToUpdate;
     }
     
    //This class runs the Future Method above
    public static void runFutureMethod (List<Account> accs){
        
       if(!runTrigger){
            return;
       }else{
           
    	List<Id> accountIds = new List<Id>();
			for(Account acc : accs){
				AccountIds.add(acc.Id);
			}
           
       	doAutomaticExternIntegration(accountIds);
      }
    }
}
Trigger
trigger AccountTrigger on Account (after update) {
    
    AccountUpdate.runFutureMethod(trigger.new);
}

 
Hello!
Is possible to make only one trigger for Oportunities inserts or Accounts updates?
For example:
trigger MyTrigger on Account (after update) OR Opportunity (after insert)
(I know this example is impossible, it's only an idea that what I want to)
How could I solve this?
 
I have been trying to add extra "allowed to edit" profiles to the rule whichalready  works fine for just sys admin to have this right.
I cannot seem to get the right formula (tried many formats)  to achieve a working version of this:
AND(
OR (
$User.ProfileId != "00ed0000000vQrA" ,
$User.ProfileId != "00e69000002MqRI" ,
$User.ProfileId != "00e1r000001RTKA" ,
$User.ProfileId != "00e69000001uDdW" ,
ISCHANGED(StageName),
TEXT(StageName) = "Closed Won"))

I looked at Permission sets, doesnt seem to offer this exact use.
I copied other examples to adapt- no success. Any help much appreciated please.

In Step 1 on an Omniscript, I have two text elements: "neighborhood" and "city".
There is also the "Search" button made in LWC. I need it to be disabled only if the fields "neighborhood" OR "city" are empty, but I'm not getting it... Can anyone help me? Here's what I tried to do initially:

Omniscript
User-added image

Preview
User-added image

searchButtonLWC.html
<template><div><lightning-button
            variant="destructive" 
            label="Search"
            onclick={handleClick}
            disabled={disableButton}
            class="slds-m-vertical_medium"></lightning-button></div></template>

​searchButtonLWC.js
import { LightningElement, api} from 'lwc';
import { OmniscriptActionCommonUtil } from "vlocity_cmt/omniscriptActionUtils";
import { getNamespaceDotNotation } from "vlocity_cmt/omniscriptInternalUtils";
import { OmniscriptBaseMixin } from 'vlocity_cmt/omniscriptBaseMixin';
 
export default class searchButtonLWC extends OmniscriptBaseMixin(LightningElement) {
 
    @api neighborhood;
    @api city;
   
    _ns = getNamespaceDotNotation();
    _actionUtilClass;
 
    connectedCallback() {
        this._actionUtil = new OmniscriptActionCommonUtil();
    }
 
    handleClick() {
    }   
 
    get requiredFieldsFilled(){
        return (this.neighborhood && this.city);
    }
 
    disableButton(){
        return !(this.requiredFieldsFilled());
    }
 
}


 
I have opportunities with line items/products that have a "start date" field in one month and a "close date" field in another. If I know the total number of days where the products are active and the averaged amount for each day - how do I calculate the amount per month? 

Ex. Opp A with Product B
Start Date: Jan 30
End Date: Feb 4
Total Days: 5 (2 in Jan, 3 in Feb)
Average Amount per Day: $10

How do I separate out the $20 for Jan and the $30 in Feb from the same opportunity? Ideally I'd like to run a report and see the opp amounts calculated for each month...
hello, community! I'm a newbie and I really need some help.
the Order object has values in the status field: "New", "Activated", "In Progress", "Received", "Finished", "Canceled".
The Order object has a field: Account Name, Order Owner, Order Start Date, Status, Opportunity, Ship To Contact, Order End Date, SLA Offers Date.

You cannot change a closed Order with the Finished status
I've tried using this formula, but it doesn't work:

AND(
ISPICKVAL(Status, "Finished"),

OR(
IS CHANGED(Status),
ISCHANGED( Account Id ),
ISCHANGED( OwnerId ),
ISCHANGED( Effective Date ),
ISCHANGED( OpportunityId ),
ISCHANGED( Ship To Contact Id ),
ISCHANGED( EndDate ),
ISCHANGED( SLA_Offers_Date__c )
)
)
I want to create a formula that sends out a specific email alert after a case has been re-opened - I want it to go something like this.

ISPICKVAL([Case].Status, "Open"),

ISPICKVAL(PRIORVALUE([Case].Status), "Resolved (User Confirmed)"),
OR
ISPICKVAL(PRIORVALUE([Case].Status), "Resolved (CS Confirmed)"),
OR
ISPICKVAL(PRIORVALUE([Case].Status), "Resolved (User Unconfirmed)"),
OR
ISPICKVAL(PRIORVALUE([Case].Status), "Closed"),

But Im having trouble in the placements of OR and the relevant syntax. Can anyone help the proper format of the code above?

Thank you!

Hi,

I have to two loop values in one loop how it is possible?

Ex:

List<Account> accList = [SELECT Id, Name FROM Account LIMIT 10];
List<Account> accList2 = [SELECT Id, Name FROM Account LIMIT 9 OFFSET 1];

for(){
String s = accList.name  + accList2.Name;
}

i want to pass in for loop one by one how it will be possible please help me.

Thanks,
Dhilip Dussa

Hi!
Could anyone tell me why I can't display a Type Ahead Block that is within 2 Blocks? How do I get it displayed in this condition?
The example in the picture, TypeAhead3 is not being displayed. I would like to understand why.

Ps: TypeAhead3 and TypeAhead4 are the same and do not have any custom settings.

 

User-added image

 

I'm trying the create a Roll Up Summary Field that use the TeamMemberRole, but I can't see the name of the Object in the options (see the pic).
Somebody told me that I have to create a field type Master Detail Relationship to do it...But is there another way to do it without creating a useless field?

User-added image

I want to insert UserId of the SObject AccountTeamMember  in a formula field, but I'm not able to put this field...
How can I do it?

User-added image
 

We can see that I don't have the option to put UserId in the formula. 

I want that the user only can edit an opportunity field when he create the opportunity. 
After that, the field have to be only read.
I'm trying to allow only the Account's Owner and Account Team Members "001" to create opportunities. But I'm getting "The AccountTeamMember field does not exist".
How can I solve it?
 
OR($User.Id <> Account.Owner.Id, 
VLOOKUP(AccountTeamMember.TeamMemberRole, AccountTeamMember.UserId,$User.Id)<> "001")
How can I do it?
P.s: I'm talking about the Sobject AccountTeamMember.
I want to call a Before Update Trigger only when my Flow is running.
I created a checkbox field called "Run_code__c". The standard value is false.
My code:
for(Account acc:trigger.new){
   if(acc.run_code__c){ //Do stuff } 
   else { acc.addError('MsgError'); }

But how can I change run_code__c to "true" in the flow if the trigger will block it?
There is another way to solve it?
My goal is to run the Trigger Before Upadate only when my Flow is running.
Hi! 
I want to avoid this For loop inside another For... Is there any way?
 
public class ManagerAccountTeamMember {

  public static Boolean isFirstTimeBEFORE = true;

  public static void myMethod (List<AccountTeamMember> TeamMembers) {

    for( AccountTeamMember accTeamMember: TeamMembers){
        if(accTeamMember.TeamMemberRole == '001'){
           isFirstTimeBEFORE = false;
           accTeamMember.Code__c = '001';
         } 

         if(isFirstTimeBEFORE) {
            isFirstTimeBEFORE = false;

            Map<String,AccountTeamMember> accId_X_TeamMember = new Map<String,AccountTeamMember>();

             for(AccountTeamMember TeamMember : TeamMembers) {
                     accId_X_TeamMember.put(TeamMember.AccountId,TeamMember);
             }
    
             List<Account> accounts = [SELECT Id,RecordTypeId,OwnerId FROM Account WHERE Id IN: accId_X_TeamMember.keySet()];

             for(Account account : accounts) {
                 if(acc.OwnerId != UserInfo.getUserId()) {
accId_X_TeamMember.get(account.Id).addError('Msg');
                  }
              }
        }
   }
 }    
}

 
Hi,
I am new to coding and just need some help with inserting my selected fields values from my record (the record the lightning component is on) into my selected records. I have selected the fields I'm just unsure how to write the code to add them into my selected records.

APEX:
@AuraEnabled
    public static void updateRecord(List <String> lstRecordId, String oppRecordId) {
        
        List<Opportunity> lstUpdate = new List<Opportunity>();
        
        for(Opportunity Opp : [SELECT Id, Name, Check_In_Date__c, Check_Out_Date__c, Total_Amount__c, Deposit_Amount__c, SyncedQuoteId 
                               FROM Opportunity 
                               WHERE Id IN : lstRecordId]){
        lstUpdate.add(Opp);
        }
        
        if(lstUpdate.size() > 0){
            update lstUpdate;
            
        }

 
Hello,
When executing a flow, I am getting a flow error on an opportunity record lookup. All the criteria are met but I'm still getting an error "Failed to find record". Can you please help us understand why this would be happening? 

User-added image

Thanks. 
Hello
I am working on a flow and one of the things it needs to do is query PriceBookEntry. For some reason the fast lookup is not finding any records, but when I test the same query with soql executed on workbench the record is found. I'm a bit stumped on what to do next. So hopfully someone out there has some ideas. 

Here is excerpt from the debug email that shows what the fast lookup is doing:
FAST LOOKUP: Get_Standard_PBE_PP
Find all PricebookEntry records where:
Platform__c Equals {!Pureprofile} (Pureprofile)
Pricebook2Id Equals {!varQuote.Pricebook2Id} (01s90000004YFPxAAO)
CurrencyIsoCode Equals {!varQuote.CurrencyIsoCode} (AUD)
Incidence_Rate__c Equals {!formulaIncidenceRate} (10.00)
Length_of_Interview__c Equals {!Length_of_Interview2} (20)
Assign those records to {!sovPBEM}.
Save these field values in the variable: Id
Result
Failed to find records.

And here is the soql that actually finds the record
SELECT 
    Id, 
    name, 
    currencyisocode 
FROM PricebookEntry 
where 
    Length_of_Interview__c = 20 and 
    Incidence_Rate__c = 10.00 and 
    Platform__c = 'Pureprofile' and 
    Pricebook2id = '01s90000004YFPxAAO' and 
    CurrencyIsoCode = 'AUD'

 

Hi Folks,

I have requirement in my project.
 

Force we can set a debug logs for 24 hours after 24 hours if we want capture the debug logs we need to set manually. But now I don't want make this manually it should be set automatically daily with batch Jobs and I want to take the back up of all the logs for 24 hours. 

Can you please help me how can I achieve this.

 

Vamshi.