Questions tagged [function]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
30 views

Sitemap - Flooring Function & listener on WP-Forms form isn't working

Issue: Form submit isn't capturing MCP data On our flooring page https://www.silvaris.com/products/flooring/ there must be a bug in the function and/or listener. Can you please help? Listener: { ...
Ryan Fox's user avatar
0 votes
1 answer
68 views

Formula Field Syntax Error

in my custom Activities report type, I need to show which object the activitiy is related to, e.g. lead, account. Contact or lead activities have an ID in the field WhoId, account, opportunities and ...
MarkB's user avatar
  • 27
0 votes
1 answer
4k views

Convert text to number in flow [closed]

I am working on flow for Incident object. Target field: There is a field SomeField__c in the Incident object. The field type is number. Source field: There is lookup to Contact with field Name__c in ...
वरुण's user avatar
-1 votes
1 answer
283 views

The formula expression is invalid: Incorrect number of parameters for function 'IF()'. Expected 3, received 2

Receiving an error when trying to save the below formula. The requirement is that if the first variable is empty, to retrieve the value for the second variable. IF({!var_EmailAddress_1} = "",...
user115088's user avatar
0 votes
1 answer
880 views

Cannot change or access class member variables from callback function

In the below code, the function dragstarted() is D3 JS function that gets called everytime a graph node is clicked (which gets called fine). However, it is not possible to change 'clicked' or call '...
darthcoderUS's user avatar
0 votes
2 answers
462 views

Issue with returning a URL from wire method in LWC

In the below method, the getApprovalOrders returns the appURL which then calls this.handleLoad(obj.Id); to get the approval request Id to return the URL ${baseURL}/detail/${this.approvalId}. The issue ...
Krishnamurthy's user avatar
0 votes
1 answer
243 views

JavaScript setHours is setting less hours than specified by parameter

function removeDaysToDate(date, hours){ var res = new Date(date); console.log('res ->' + res); console.log('hours ->' + hours); ...
CPS's user avatar
  • 335
1 vote
1 answer
38 views

Dynamic component

I have a configuration in which I dynamically create a checkbox component. The checkbox works. I now want to perform an action when the checkbox changes. I have the following code. My onCheck ...
Michele Kleinhomer's user avatar
0 votes
1 answer
240 views

Judge an apex object is a class type not a specific class type

We can use instanceof keyword to verify an object is a specify object type, like Id, String, Integer, Datetime... Object str = 'aaa'; System.debug(str instanceof String) // true public class ...
Gary Chen's user avatar
0 votes
1 answer
52 views

How can I call other methods from the current method?

I am trying to do this, but nothing works ... I am a beginner. //helper js getDataFromDB : function(component){ let action = component.get('c.getListContacts'); action.setCallback(this, ...
unique user's user avatar
0 votes
0 answers
68 views

cannot see enable evergreen function development in salesforce dev hub

We want to Enable Evergreen Function Development in the salesforce dev hub, But not able to find the enable option Please assist.
Spande's user avatar
  • 61
3 votes
1 answer
7k views

LWC: @wire inside method (function)

I need to run this @wire on a click event. I thought on creating, inside the LWC class, a method to call it, but it didn't work. how can I call the WIRE service inside a function with parameter? ...
jeanm's user avatar
  • 155
1 vote
1 answer
661 views

How to pass map values on client side from component to controller

I currently have a child component to which I pass some map values from a parent component to an attribute in the child component on the client side. I used an example which gets map values from ...
Thomas's user avatar
  • 2,294
0 votes
2 answers
16k views

Writing and Calling functions in LWC

this might be a stupid question, so if it is please feel free to troll in the comments. I have a sample code here that has a simple function in it. My question is: once you have written a function (e....
thinker's user avatar
  • 1,402
2 votes
0 answers
295 views

SSJS: Function returns value without return

I hope someone can help me to understand the following behaviour: <script runat=server> Platform.Load("Core", "1.1.1"); function test(args) { for (var i = 0; i < args.length;...
shd.lux's user avatar
  • 466
0 votes
2 answers
320 views

How to check value of inputfile in apex repeat on save with javascript

I have a visualforce page where I give the option to save 2 files based on an apex repeat. I check when a file is added on change if the filesize does not surpass 5mb and alert the user if needed. On ...
Thomas's user avatar
  • 2,294
3 votes
1 answer
3k views

Importing Function from LWC js File returns 'Is Not Function'

Trying to figure out how to share JS functions with another component. I have followed the documentation on the LWC here Here is the functions.js file reusableLWCFunctions.js const myfunction = (...
thinker's user avatar
  • 1,402
1 vote
1 answer
1k views

SQL - How to filter the max value

I am in the middle of creating an SQL in SFMC. I have three attributes in the source Data Extension: GlobalID, CategoryDescription MAX (yes, the name is weird, but it is not the point...). What I ...
Juraj Resko's user avatar
1 vote
0 answers
141 views

Report Formulas - Divide Summary Field by Number of Users

I am trying to find the Average Number of Hours each user logs per week (by Billable vs Non-Billable Hours). I have attached a screenshot. I want the sum of the hours (20.34) divided by the number of ...
Brian C's user avatar
  • 11
0 votes
1 answer
2k views

How to call a method in a lightning component in same helper

I have a delay function in a lighting component helper from which I want to call another function I get the error [this.displayToast is not a function] how do I achieve this? Delay function: ...
Thomas's user avatar
  • 2,294
1 vote
1 answer
809 views

[APEX]: Way to iterate over method parameters

I have a method that accepts 4 parameters. I want to do the same action for every parameter if it's not null. Is there a way to iterate over all parameters rather than building if blocks? So for ...
Arthlete's user avatar
  • 4,857