Questions tagged [business-logic]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
33 views

Should Pardot Business Unit be either "region specific" or "product specific" or can it be both?

Currently studying Pardot Business Units and was curious if a company ever uses a combination of both region and product specific B.U.'s. Just based off my research it seems that companies either use ...
dinosaur's user avatar
0 votes
0 answers
192 views

Apex - Very basic question about date/time

I have some basic questions about the date/time fields in Salesforce. I know Salesforce stores the date and time fields in GMT format in the object when a record is created or updated and also ...
Balaji Pooruli's user avatar
-2 votes
1 answer
39 views

Help on a method to calculate date ranges [closed]

I want to calculate date ranges based on number of splits (called here nbr) between two dates. My Code works only for nbr equals to 1or 3; getRangesBasedOnNumber (2, Date.newInstance(2022, 04, 01),...
Nooby's user avatar
  • 3
0 votes
1 answer
165 views

Will Method called in for loop with Update statement(dml) will have governerLimit Issue

I have below requirement ,i have called method in for loop ,i want to know 1.Will this cause an Dml governer limit issue? 2.how we can optimize the below code Requirements - Update Primary contact on ...
santu's user avatar
  • 3
0 votes
1 answer
70 views

Not able to check map condition in trigger

I have a requirement where on Update of account I need to check case if contactId is present and if that contacts Account is same as Case accountId then need to update one field. I have written some ...
santu's user avatar
  • 5
0 votes
2 answers
237 views

Better way of searching for values in apex list

I have a list of unique strings say 'one' to 'ten' as below: List<String> values = {'one', 'two', 'three','four','five','six','seven','eight','nine','ten'}; I have a requirement to check if the ...
Suhasini's user avatar
  • 307
0 votes
1 answer
2k views

Validation Rule to find a duplicate value

I need to create a custom field, say REG_NO__c(text) which allows N/A multiple times but should not allow duplicate values from ST001-ST999, I tried to make it as unique(case insensitive), but it also ...
Tom's user avatar
  • 23
1 vote
3 answers
1k views

Is there any way we can identify the insertion/updation of record is happened through UI or not

I have requirement where I have one trigger and its calling handler and in handler i have one method, I need to run that method if I am updating the record through UI in,i dont want to run trigger or ...
sam's user avatar
  • 11
-2 votes
1 answer
1k views

how to compare old and new values for specific fields in trigger

I have requirement where I need to compare few fields in account object, If there is any change in the value of any of the field I need to insert into log object. Those fields can be change later as ...
sandy's user avatar
  • 3
0 votes
1 answer
208 views

Fetching the Opportunities Id from a list of Opportunities name

Fetching the Opportunities Id from a list of Opportunities name. I have an asset list through which i am creating opportunities. However at the end i require a map of which contains the key as ...
Lovish Gupta's user avatar
0 votes
1 answer
36 views

Architecture quest - what is the efficient way to track an opportunity amount being used and reallocate the unused balance [closed]

To all the sf experts out here, trying yo get your inputs for a use case that i’m trying to incorporate. Use case: We have a currency field called “Amount Owed” on opportunity which holds an $ value. ...
SMorse's user avatar
  • 47
0 votes
2 answers
123 views

I have written a logic for deciding which user can change the owner of an Account record. Is there a way to generalize this for other objects?

The logic is as follows: public static void changeOwner(Map<Id, Account> newAccs, Map<Id, Account> oldAccs) { Map<Id, Id> objOwnerMap = new Map<Id, Id>(); for(...
nSv23's user avatar
  • 544
-3 votes
1 answer
28 views

Getting Error while running the class

You have uncommitted changes .. I am running it from anonymous Below is my class, i am not doing any DML ,just hitting api I am hitting the api to get different salesforce instance Status and sending ...
ajay bagdad's user avatar
0 votes
1 answer
1k views

get custom setting fields names in apex class

Requirement-I need to create a map of custom setting in apex class with fields and value like. "Name":"test", "cal__c":"tesq", "industry__c":"...
ajay bagdad's user avatar
0 votes
1 answer
42 views

Need to get count of same contact in 2 account

Requirement- I have 2 accounts (source and target) and i want to get the count of same contact name in target account Ex- Ac1 ==> {con1,con2,con3 con4} AC2 ==> {con1,con2,con4} then count should ...
ajay bagdad's user avatar
1 vote
1 answer
3k views

get second highest salary of employee using soql

I need to calculate second highest or 4th highest salary etc.. what is the way to calculate it. select salary__c from Staff_Details__c order by salary__c desc I am getting the salary in desc order but ...
ajay bagdad's user avatar
0 votes
1 answer
276 views

Apex trigger To throw an error if case is updated with ContactId Which is associated with Account

I have requirement where on Case Update if ContactId in same of accounts contact associated with that case then needs to throw an error. Example; Case 1 AccountId 1 and contactId 1 If case 1(...
tushar's user avatar
  • 1
0 votes
1 answer
42 views

How to check all Case startdate and updated case with high duration from startdate

I have requirement where on new case insertion need to check AccountId and all associated cases with that account. Then need to compare startdate of all cases and whichever is earlier need to ...
Kamath's user avatar
  • 3
0 votes
0 answers
492 views

new instance of object creation for updating a record

Requirement-I have custom object request__C where i am storing sourceAccount ID and TargetAccountID. My requirement is to update the field in request object with max contact in any of the account. ...
akash's user avatar
  • 1
0 votes
1 answer
18 views

not able to update contact based on the requirement-seems bulkification issue

i have requirement where i am passing list of accountuuids to method 1.If contact with same accountname not present then create new contat call as shadow contact 2.if contact with same accountname ...
sanmu's user avatar
  • 1
1 vote
1 answer
1k views

Component Visibility in Flow's Screen with Number data type

I'm trying to set up a filter to manage a component visibility in a flow's screen component. In particular, I want the field to be available to the user for the insert of data only when a particular ...
ARWarrior's user avatar
-1 votes
1 answer
49 views

Can I create an AND and OR filter and apply that to a data extension

I'd like to create a Data Filter that has AND and OR conditions in it, like x AND y AND (a OR b OR c) I'm unable to merge two filters. Is this feasible?
ehacinom's user avatar
  • 119
0 votes
3 answers
913 views

Trigger Switched On/Off using Custom Metadata

I want to switch of trigger to run or not based on custom metadata. Below is the logic I used, but getting null exception if no User record in metadata. I don't want triger to fire when user and ...
Sandy's user avatar
  • 25
0 votes
1 answer
22 views

Configure the FROM of send email on Case

Is it possible to configure the emails that appears on the "FROM" based on the profile or role or some type of criteria of the current user? If it is, how can I do it? thanks in advance
Elias Pinheiro's user avatar
0 votes
1 answer
28 views

Problem with begginer logic

While studying doing some exercises, I created an Account with 1000 Contacts related to this account. My problem is, there the Number_field__c in the Contact Obj. What I need to do is populate the ...
Juliano Szlachta's user avatar
-2 votes
1 answer
3k views

Process Builder - Customize the Logic [closed]

Can I customize the logic of a process builder as below? (4 AND 1) OR 2 OR 3
Jklotzle's user avatar
0 votes
2 answers
578 views

Handle 1 AND (2 OR 3) in Apex Query

In the List View we can see the Filter logic that enable us to handle many condition such and 1 AND (2 OR 3) . But I m not able to figure out how this logic is being handled in apex. For example if ...
unidha's user avatar
  • 2,542
0 votes
2 answers
1k views

Process Builder formula only partially evaluates(Edited version after trying with one of the proposed solutions)

I am working on writing a formula inside process builder "Formula Evaluates to true" and it seems my logic is not working. Suppose I have a following logic: 1 OR 2 OR 3 OR(4 AND 5) Below is my ...
Harjeet Singh's user avatar
0 votes
1 answer
40 views

Need Apex Logic

I have a Leave__c as a custom object. It contains 3 fields: Employee Name (lookup to User), Leave Start Date (Date) and Leave End Date (Date). Example: User "John" is on leave from Start Date "4th Jan ...
Shrey's user avatar
  • 151
0 votes
1 answer
614 views

validating required field dynamically using apex controller

I have a list of field api names of type string belong to particular object. I want to validate whether the field has value or not at the time of saving the record and throw error message exactly at ...
Prasanth Srinivasan's user avatar
2 votes
1 answer
218 views

Translating Workflow-like logic into Apex

In a workflow you can define logic like ( (1 AND 2) OR 3 ) AND 4 I need to build configurable criteria that will do something similar in structure, but with more complex criteria. For example, I'd ...
Sean's user avatar
  • 646
1 vote
1 answer
98 views

Report Folder and Report Name Control (Validation? Workflow? Apex?)

Is there a way to control (to any degree) the naming conventions of Report Folders and Reports? I'm not finding a solution via Google searches or Salesforce resources. Some examples: Block create/...
AMM's user avatar
  • 4,674
1 vote
0 answers
64 views

Sending Email Template FROM: Different Addresses By Same User

Does anyone know of a solution for User "Anthony" being able to PICK from more than ONE EMAIL ADDRESS to be the "FROM:" address when sending a Template (without using an open text box when sending the ...
AMM's user avatar
  • 4,674
0 votes
1 answer
733 views

Number to word logic

My code to convert number to words is as below. Here i am getting output properly but if i have number 5,07,920 it is showing result five hundered and seven thousand nine hundred and twenty. i want ...
p.samruddhi's user avatar
0 votes
1 answer
802 views

Need Help to build a Custom notification read logic for Individual user basis

I'm building a custom Notification section, which provides notification or messages to multiple users on any particular object update, I've created a Custom page where I have added a Alert section or ...
user2809299's user avatar
1 vote
1 answer
48 views

Min Order date within last 24months from list of orders related to Account Object

I have a date field on the Account object and the date field is called "New_Cust_date_for_cellsep_in_last_24mnth__c". Account object has orders related to them. The Orders object is called "...
user avatar
0 votes
1 answer
41 views

Use case of the code [closed]

On exploring collections, I came across the following code: String myName = [select Id, managerName, address__c from User where Id =: userInfo.getUserId()].managerName; I see that myName will ...
MnZ's user avatar
  • 3,152
4 votes
1 answer
542 views

Checking if a certain custom permission is enabled in a Profile

Is there a way to programmatically figure out whether a certain custom permission is enabled in User profile? The problem that I'm trying to solve – is that I need some kind of a flag for a small ...
wintermute's user avatar
1 vote
2 answers
2k views

How to create day/Time counter on specific field update

I have a pick list field in opportunity object name “Opportunity status”. There are two values in this field Hold and Un-Hold. I want, when I do select hold another field name "Hold duration" start ...
Russel baker 1's user avatar
0 votes
1 answer
2k views

How can I create report on Stage velocity as per Sales user

I want to create a report on Stage velocity of opportunity per sales person. Like if a salesperson have 10 Opps in first stage and only 6 forward to second stage then from 6 only 4 forward to third ...
Russel baker 1's user avatar
0 votes
1 answer
148 views

I need to update incremental code in a custom field on accounts so that if user changes the Type then no. should be incremented by 1 [duplicate]

I need to update incremental code in a custom field on accounts. So that, If user changes the Type from Prospect to customer then no. should be incremented by 1. For example: For account1, it will ...
Preeti Khanna's user avatar
0 votes
1 answer
2k views

Create report to get Stage conversion rate of opportunity

I want to create a report on opportunity object to get conversion rate. Like if I have 100 opportunities are in 1 stage and 10 of them will travel all the stage and end with close-won So first stage ...
Russel baker 1's user avatar
2 votes
2 answers
103 views

Why is Force.com aimed at employees? [closed]

I am new to Salesforce and am reviewing it for an organisation who are planning to build a customer-facing application. I notice in several places in the Salesforce marketing material that Force.com ...
DatsunBing's user avatar
0 votes
0 answers
306 views

Can we do forecasting on custom date instead of close date

I am using collaborative forecasting and it's using standard close date for forecast period but I have two close dates, one for sales and second for management so I want to use forecast on custom ...
Russel baker 1's user avatar
1 vote
1 answer
2k views

How do I calculate opportunity stage convestion rate %

I want to conversion rate. Let say 100 opportunities in 1 stage then they 50 opportunities moved to 2 stage so stage conversion rate is 50%. then 25 moved to 2 stage from those 50 opportunities so ...
Russel baker 1's user avatar
4 votes
1 answer
266 views

Using advanced IF in Formula field

I am trying to get the percentage of process completion. I have some checkboxes, and I want to check if each one is checked or not. For every checked box, I will increase some value and then get the ...
hasan.alkhatib's user avatar
6 votes
1 answer
989 views

Salesforce - business logic - best practices

I would be really grateful if anybody could help me clarify, where to deploy business logic. I'm aware of the following possibilities: Write the main parts of the business logic in Apex Apex ...
Florian Kalisch's user avatar
4 votes
2 answers
178 views

Why does this trigger class work when editing individual child records but not when mass loading child records?

February 26 Update: Still hoping someone can help me with this? Are there any takers? February 23 Update: Still have issues. The updated helper class code is below (this is exactly what I have in my ...
Melissa VanDyke's user avatar
2 votes
1 answer
120 views

Need help on apex logic

I'm stuck on retrieving account for particular orders. My final requirement is to build a list with all orders details and the account it belongs to. So here's my story so far... I have 2 new custom ...
MnZ's user avatar
  • 3,152
3 votes
1 answer
509 views

FuelSDK-Python Integration with multiple Business Units - Is this Possible?

In my company's Email Marketing Cloud Account we have multiple accounts (that is business Units). In our earlier integration with SOAP API we were able access the objects in these business units ...
sibenye's user avatar
  • 81