-
ChatterFeed
-
86Best Answers
-
0Likes Received
-
2Likes Given
-
1Questions
-
334Replies
Validation Rule prevent picklist change if priorvalue isnt specific values
AND ( $Profile.Name = "Freelance Writer", ISCHANGED(Status__c), NOT(ISPICKVAL(Status__c,"Assigned")), NOT(ISPICKVAL(Status__c,"Sent for Revisions by Editor")), NOT(ISPICKVAL(Status__c,"Sent for Revisions by Client")))But its not quite right - seems it restricts the user from making change to Status__c even if Status__c is set to one of the acceptable values. Do I somehow need to use PRIORVALUE for this?
- Eric Pohlabel
- March 16, 2017
- Like
- 0
- Continue reading or reply
Formula based off a date field plus picklist value
I need some help with a formula.
I need to create a "Client Due Date" field. This formula should be based off (the Submission date field) Submission_Date__c PLUS a number that is selected from the picklist value from the Processing Days (Processing_Days__c) field which includes the values: 8.9,10,11,12,13,14,15
Could someone please help me out on this one?
Thanks
Tori
- Tori Sansom 9
- March 13, 2017
- Like
- 0
- Continue reading or reply
- Adeline Moore
- March 07, 2017
- Like
- 0
- Continue reading or reply
System.QueryException: Record Currently Unavailable
Here is the exact exception:
'System.QueryException: Record Currently Unavailable: The record you are attempting to edit, or one of its related records, is currently being modified by another user. Please try again.'
Class.Utility.DoCaseInsertion: line 98, column 1
I've done a lot of research on the 'UNABLE_TO_LOCK_ROW' exception and 'Record Currently Unavailable' exception and I can't seem to find a great solution to this issue.
What I've tried to accomplish is a loop to attempt the insert 10 times, but I'm still getting the 'Record Currently Unavailable' exception. Does anyone else have a suggestion for this?
Below is the code:
Public static void DoCaseInsertion(case myCase) { try { insert myCase; } catch (System.DmlException ex) { boolean repeat = true; integer cnt = 0; while (repeat && cnt < 10) { try { repeat = false; List<Contact> contactList = [select id from Contact where id =: myCase.ContactId for update]; // Added for related contact to overcome the 'UNABLE_TO_LOCK_ROW issues' List<Account> accountList = [select id from Account where id =: myCase.AccountId for update]; // Added for related account to overcome the 'UNABLE_TO_LOCK_ROW issues' insert myCase; } catch (System.DmlException e) { repeat = true; cnt++; } } } }
- JO_Dev
- February 03, 2017
- Like
- 0
- Continue reading or reply
formula text and if condition: Syntax error
I would need help with this formula. I get a message: Syntax error. Any idea, please?
IF ( PotentialCOMAPABudget__c < 200.000,"Bajo",
IF ( PotentialCOMAPABudget__c > 200.000 < 1.000.000, "Medio",
IF ( PotentialCOMAPABudget__c > 1.000.000, "Alto",
IF ( PotentialCOMAPABudget__c > 5.000.000, "Key Account", null
)
)
)
)
- AAI
- February 03, 2017
- Like
- 0
- Continue reading or reply
I need a formula Please.
Everything I try gives me an error:
Owner:Queue.Id ISCHANGED(field)
Can Someone help me create the right formula Please
Adeline
- Adeline Moore
- February 02, 2017
- Like
- 0
- Continue reading or reply
Help with Test Script -
@isTest
public class EndoraDocumentAttachment {
//Method
static testMethod void InsertAttachment() {
Opportunity b = new opportunity();
b.RecordType.developername = 'Capital';
b.name = 'TEST';
b.Quote_Contact__c = '0033B000007Rz8X';
b.StageName = 'Attention';
b.CloseDate = (System.Today().addDays(1));
b.Account_Dept__c = 'GI/Endoscopy';
insert b;
Attachment attach = new Attachment();
attach.Name='Unit Test Attachment';
Blob bodyBlob=Blob.valueOf('Unit Test Attachment Body');
attach.body=bodyBlob;
attach.parentId=b.id;
insert attach;
List<Attachment> attachments=[select id, name from Attachment where parent.id=:b.id];
System.assertEquals(1, attachments.size());
attach = [SELECT Id, name from Attachment where parent.id=:b.id];
delete attach;
b.Attachment__c = False;
update b;
}
}
Errors: System.NullPointerException: Attempt to de-reference a null object
Stack Trace: Class.EndoraDocumentAttachment.InsertAttachment: line 8, column 1
- Becky Miller 15
- January 31, 2017
- Like
- 0
- Continue reading or reply
restricting values of picklist to certain users belonging to same profile but without modifying in record types
I have object "account" which have 5 record types, there are around 10 profiles in my org.
For object "account" there are few picklist.
For one of the profile, presently 5 pricklist are available out of 8.
For certain users of this profile i want only 3 prickist to be avaiable.
How can i i acieve my usecase ?
thanks for suggestion!
- Ab
- January 30, 2017
- Like
- 0
- Continue reading or reply
Setting up an Email Alert thru a Worklflow
Hi Guys,
Im fairly new and looking to setup some things.
I want to configure an Email Alert when a Picklist field has been sitting on a value for more than a number of specified days.
For example, i have a picklist field called "stage". i want the record owner to be notified thru email when the stage is at the "quoting" value for more than 2 days.
Reading here i know i have to set up a workflow, im trying to make a formula but i dont find a way to come up with the right syntax.
Here is what i come up with so far:
Stage(TEXT(Quoting)) && TODAY - DATEVALUE(LastModifiedDate)>= 2
Please HELP
- Hermes Gomez
- January 27, 2017
- Like
- 0
- Continue reading or reply
Implementation of Trigger.new and Trigger.old
trigger emailCheck on Employee__c (before update)
{
Map<Id,Employee__c> o = new Map<Id,Employee__c>();
o = trigger.oldMap;
for(Employee__c n : trigger.new)
{
Employee__c old = new Employee__c();
old = o.get(n.Id);
if(n.Email__c != old.Email__c)
{
n.Email__c.addError('Email cannot be changed');
}
}
}
Thanks and Regard
Rohit kumar singh
- Rohit kumar singh 1
- January 27, 2017
- Like
- 0
- Continue reading or reply
Workflow formula check Stage change
IF( ISCHANGED(StageName) AND ( NOT(ISPICKVAL(StageName, "Value 1")), NOT(ISPICKVAL(StageName, "Value 2")), NOT(ISPICKVAL(StageName, "Value 3")), NOT(ISPICKVAL(StageName, "Value 4")) ))
- DaveGC
- January 26, 2017
- Like
- 0
- Continue reading or reply
Validation rule at object level to check if the entered text value contains any one of the picklist field value present on that object
Thanks and Regards,
Shiva RV
- Shiva Rajendran
- January 26, 2017
- Like
- 0
- Continue reading or reply
Validation Rule to Require Attachment when Opp Reaches Probability 100%
I need to create a trigger or validation rule that requires a user to attach a document/insertion order to an opportunity when it is changed to 100% or closed won.
Please advise.
- Saad Ahmad 33
- January 25, 2017
- Like
- 0
- Continue reading or reply
Trigger development - Please Help
Thank you,
Trigger trigger Read on Web_Links__c (before update){ StatusRead.Read(Trigger.new); } Class public class StatusRead { public static void Read(List<Web_Links__c> WI){ Web_Links__c WL = [SELECT status__c FROM Web_Links__c]; if(WL.Owner_ID__c == WL.Last_user_to_view_record__c){ WL.status__c = 'Read'; update WL; } } }
- Ryan Greene
- January 25, 2017
- Like
- 0
- Continue reading or reply
Update Account after Email Message
is it possoble to update the Account Type after an Email Message is sent ? It tried the process builder, but it did not work. The Email is related to the Account. Thanks for your help guys ! ;)
- Sandra Wicket
- January 24, 2017
- Like
- 0
- Continue reading or reply
Hi Guys, I Have a requiement.
- Shridhar H A
- January 23, 2017
- Like
- 0
- Continue reading or reply
Basic Question on Update fields
I'hv a basic question on Updating fileds using APEX Code - rather I want to clear my concepts . The requirement is very simple. For Account Object , Update all Countries to United States of America where country is like US or USA . Now, I'm able to do it by writing below code
Public Class Acc_Country_Name_Change
{
Public Pagereference Name_update()
{
List<Account> Act = [SELECT name,BillingCountry FROM Account where BillingCountry in ( 'US','USA')];
for(Account a : act)
{
a.BillingCountry ='united states of america';
}
update act;
return null;
}
}
Now , I'hv two questions on this . Please help me to clear my concept.
1> in the For loop , its like FOR ( sObject : List ) - so why both are not List ? is it because in FOR Loop , only one row get processed at a time ? Or something else?
2> Inside the FOR loop , we are writing a.BillingCountry ='united states of america' , but in update its like Update act . Why so?
Can someone please help me to clarify my doubts? I know they are very basic , But I'm kind of confused.
Thanks,
Tanoy
- Tamojita Guhasarkar
- January 21, 2017
- Like
- 0
- Continue reading or reply
Trigger to copy email from contact to account
First of all, I am just the administrator, not a developer and not a coder. However today I am wearing all the hats. I am hoping someone would be kind enough to help me with the following. I am not sure of even where to start, except that I should do this by a trigger. However I know nothing of how to actually accomplish this. I am hoping that someone could provide the code necessary as I am not savvy enough to write any of it myself. Being a non-profit, we do not have the budget to enlist a professional for this and the task has fallen to me to handle.
Short story - Due to a third party integration, we found that we needed an email address on the account page. However, with the one-to-one model, we are essentially unable to access the true Account record for an individual. What I would like to accomplish is this: a trigger that will copy the email address from our Contact object into our email field on the Account object. This would happen when the field is changed in any way.
I hope that I've provided enough information, but if not I will gladly elaborate where needed. Thanks in advance everyone.
- KSorenson
- January 20, 2017
- Like
- 0
- Continue reading or reply
Assistance with FeedItem Apex Trigger
We have the trigger below that if an attachment is deleted from Chatter Feed, certain profiles will recieve the error message. I need assistance in updating the trigger to only fire on a certain object (Documents_Manager__c). Currently the trigger is firing on all objects. The trigger is also currently blocking the System Administrator profile for testing testing purposes but we would like to add serveral profiles to the block list as well. Thank you in advance!
trigger ChatterDeleteBlocker on FeedItem (After Delete) { User u = [SELECT id,ProfileId,Profile.Name FROM User WHERE id = :UserInfo.getUserId()]; for(FeedItem fi : trigger.old) if(fi.type == 'ContentPost' && u.Profile.Name == 'System Administrator') fi.addError('You do not have the permissions to delete files from chatter feed'); }
- XIO
- January 20, 2017
- Like
- 0
- Continue reading or reply
How to hide/disable the back button that appears on the top left corner, when navigating from one component to another in lightning ?
Any trick on how to achieve this ?
- Akhil Anil
- October 05, 2015
- Like
- 0
- Continue reading or reply
formula to auto populate lookup based off picklist
Opportunity picklist fields:
a1. Market
b1. Vertical
c1. Segment
Threshold fields:
a2. Market (Custom Field)
b2. Record Type
c2. Segment (Standard Name Field)
Conceptual plan:
When a1,b1,c1 are selected, update lookup to Threshold with Threshold record that matches a2,b2,c2 to a1,b1,c1
I am thinking on using process builder to set the criteria which covers {a1,b1,c1 are selected} I am stuck finding a way to create a formula that pulls the record based on matching the Opportunity picklist values.
Thanks in advance!
- Jon S
- April 25, 2017
- Like
- 0
- Continue reading or reply
Is Rich text area supported in ischanged() in validation rule?
- Jay Kanchana
- March 28, 2017
- Like
- 0
- Continue reading or reply
Validation Rule with either/or required, depending on picklist value
With the validation rule that I have written below, it's forcing the user to choose either checkbox REGARDLESS of the value in the picklist field. If you can help, that would be really great...
AND(
Modify_Existing_Report__c = FALSE,
Create_New_Report__c = FALSE,
OR(
ISPICKVAL (SF_Request_Type__c, "Report: New/Modify (Complete Section I)"),
RecordTypeId = '012a0000000AWNv'))
- Denise Meinershagen
- March 24, 2017
- Like
- 0
- Continue reading or reply
How to create a trigger (fires every 24 hours) that fires a process created on the process builder?
Can someone walk me through how build such a trigger in Apex?
Thanks,
Fares Alsyoufi.
- Fares Alsyoufi
- March 23, 2017
- Like
- 0
- Continue reading or reply
Bypass/workaround for Length of Formula Field
I have a requirment to bulid a formula which would tweek the values selected from some picklist values. The issue is the length of my formula is '44000' and i hold sfdc allow only 3900 char in formula. If i split the formula also i may have to create nearly 10 formula field and then concatinate them. Is there any workaround for this please suggest.
Thanks!
- Vipin K 10
- March 21, 2017
- Like
- 0
- Continue reading or reply
Validation rule exception for dependent pick list values on Opportunity Stage
- Glenn Soden 9
- March 20, 2017
- Like
- 0
- Continue reading or reply
How to populate a text field based on two picklist fields?
- Varun Annadata
- March 20, 2017
- Like
- 0
- Continue reading or reply
Make picklist field Required based on other Picklist Field Value
I have 2 custom picklist fields, Eg : abc__c(New, Open, Inprogress) and xyz__c(High, Medium, Low, Average)
If the value of picklist abc__c is 'New' , xyz__c should not be 'Required' and for all rest of values on abc__c , xyz__c should be Required
Need an validation rule for this..
Thanks!!
- Vipin K 10
- March 20, 2017
- Like
- 0
- Continue reading or reply
Adding a lightning component created via App Builder to VF Page ?
My question is , is there a way to a component created via Lightning App Builder to a VF Page ?
Thank you all
- Ronen Slifkin
- March 16, 2017
- Like
- 0
- Continue reading or reply
Validation Rule prevent picklist change if priorvalue isnt specific values
AND ( $Profile.Name = "Freelance Writer", ISCHANGED(Status__c), NOT(ISPICKVAL(Status__c,"Assigned")), NOT(ISPICKVAL(Status__c,"Sent for Revisions by Editor")), NOT(ISPICKVAL(Status__c,"Sent for Revisions by Client")))But its not quite right - seems it restricts the user from making change to Status__c even if Status__c is set to one of the acceptable values. Do I somehow need to use PRIORVALUE for this?
- Eric Pohlabel
- March 16, 2017
- Like
- 0
- Continue reading or reply
Process Flow Error
Hi
We are currently having issues in our environment where we've gone and created 2 Process Builders pulling from Task and then updating on the Contact.
Error element myRule_1_A1 (FlowRecordUpdate).
The flow tried to update these records: 0032A00002VB8EmQAL. This error occurred: ALL_OR_NONE_OPERATION_ROLLED_BACK: Record rolled back because not all records were valid and the request was using AllOrNone header. For details, see API Exceptions.
More so, we are having issues with the flows when lead conversion happens.
Error: System.DmlException: Update failed. First exception on row 0 with id 00T23000005q7a7EAA; first error: CANNOT_EXECUTE_FLOW_TRIGGER, The record couldn’t be saved because it failed to trigger a flow. A flow trigger failed to execute the flow with version ID 301230000000VKM. Flow error messages: <b>An unhandled fault has occurred in this flow</b><br>An unhandled fault has occurred while processing the flow. Please contact your system administrator for more information. Contact your administrator for help.: [] Class.leadconvert.BulkLeadConvert.updateLeadTasks: line 1279, column 1 Class.leadconvert.BulkLeadConvert.convertLead: line 127, column 1
We've concluded that we get these errors when the Lead has more than 10 or 20 tasks related. Those tasks in particular are the ones that trigger our Process Builder.
We tried to diagnose the issue in Sandbox as well. Based on posts I've read it's possible that we are hitting limitations
Does anyone have any suggestions aside from creating an Apex Trigger to do this?
- Candice Chu 19
- March 14, 2017
- Like
- 0
- Continue reading or reply
Locker Service - any recommended approach to resolve existing component issues ?
Need some advice re Locker Service. As locker service will be auto enabled in Summer ’17 release, has anyone activated the LockerService critical update and test in sandbox to verify the correct behaviour of the components? If so, would be great to know what kind of issues faces and any recommended approach, best practice to resolve those? .
Thanks in advance.
Regards
-Riti
- Ritidipa Mahanta
- March 13, 2017
- Like
- 0
- Continue reading or reply
Formula based off a date field plus picklist value
I need some help with a formula.
I need to create a "Client Due Date" field. This formula should be based off (the Submission date field) Submission_Date__c PLUS a number that is selected from the picklist value from the Processing Days (Processing_Days__c) field which includes the values: 8.9,10,11,12,13,14,15
Could someone please help me out on this one?
Thanks
Tori
- Tori Sansom 9
- March 13, 2017
- Like
- 0
- Continue reading or reply
- Adeline Moore
- March 07, 2017
- Like
- 0
- Continue reading or reply
How to write validation rule on website field in account object for avoding duplicates ?
Now I m using Professional edition . I need to avoide duplcate company websites in Account object. For this one how to write validation rule on this field ?
- force shahid
- March 06, 2017
- Like
- 0
- Continue reading or reply
How do I pass a base64 string to a apex string in controller?
ex.
{ "first name" : "Rob, "mypdfdoc" : "AAASDECgtNhr==" }
when I pass the file to JavaScript it encodes it to base64 .
when I pass it back to a string type in my controller it shows [file type object]
not AAASDEC...
Any ideas why it is not showing it as a base64 string, instead displays [file type object] in the debug log?
Basically I want to take the base64 string and use put to assign to a map
thank you
- gomennasai123@n.org
- March 05, 2017
- Like
- 0
- Continue reading or reply
Validating multiple number formats in one validation rule
I am trying to validate the phone number on the contact according to multiple formats. I want users to be able to enter phone numbers that match one of three formats, one starting with "+" , another starting with "00" and finaly one starting with "(".
I can create all of the these as single validation rules, but when I try to combine two or more, I am struggling wiht the logic even if the syntax of the formula is correct.
Any suggestions?
- Pedro Muller Lopes
- March 02, 2017
- Like
- 0
- Continue reading or reply
SOQL for querying all contacts with no ralated list
My requirement is that I need to quey all those records from the custom object which do not have a lookup to Contact.
Please help.
Thanks.
- bs881026
- February 28, 2017
- Like
- 0
- Continue reading or reply
Too many picklist values for IF and ISPICKVAL ??
IF(ISPICKVAL(Service_Type_del__c, "One-time"),
ABS((Cost__c * Probability) / 1),
IF(ISPICKVAL(Service_Type_del__c, "Yearly"),
ABS((Cost__c * Probability) / 1),
IF(ISPICKVAL(Service_Type_del__c, "Twice Yearly"),
ABS((Cost__c * Probability) / 2),
IF(ISPICKVAL(Service_Type_del__c, "Quarterly"),
ABS((Cost__c * Probability) / 4),
IF(ISPICKVAL(Service_Type_del__c, "Monthly"),
ABS((Cost__c * Probability) / 12),
IF(ISPICKVAL(Service_Type_del__c, "Twice Monthly"),
ABS((Cost__c * Probability) / 12),
IF(ISPICKVAL(Service_Type_del__c, "Weekly"),
ABS((Cost__c * Probability) / 12),
IF(ISPICKVAL(Service_Type_del__c, "Twice Weekly"),
ABS((Cost__c * Probability) / 12),
IF(ISPICKVAL(Service_Type_del__c, "Daily"),
ABS((Cost__c * Probability) / 12),
0
)))))))))
- Sheena Querido
- February 11, 2017
- Like
- 0
- Continue reading or reply
How to implement left and right swipe functionality using lightening framework?
- Ashutosh Awasthi
- November 16, 2015
- Like
- 1
- Continue reading or reply
Solution for copying Description(Long text Area datatype) field contents to Custom field
I had gone through some problems working withDescription field so now I got a solution to work with "Long Text Area DataType", if you want to count() the records or other filtering things with Description.
I made a custom field "Notes__c"(Text Area) in contact object and using Trigger i copied the contents of Description field to Notes__c.
here is the code:
trigger CopydescToNotes on Contact (before insert,before update) {
for(Contact c : Trigger.new)
if(c.Description!=null)
c.Notes__c=c.Description;
}
Thanks
Shephali
- Shephali Swarnkar
- October 07, 2015
- Like
- 2
- Continue reading or reply