• sonisha s
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 1
    Replies
I have a validation rule written on one of my custom objects, which needs to fire on edit of records on the vf page.
SCENARIO:
--> the validation error msg needs to popup on meeting the below rule on edit of records.
--> also after which if i enter the Complaint_ID__c  and try to change the status to closed and save it isn't happening. neither the error msg is shown nor the upsert happens the record goes back to how it was before the edit.
--> the validation runs but states UPSERT failed on the logs.
this is how the validation looks, 
AND(
OR(Escalation__c ='EM6' ,
AND(Escalation__c ='EM7', Escalate__c =true)),
ISBLANK( Complaint_ID__c )=true,
ISCHANGED(Status__c),
ISPICKVAL(Status__c,'Closed')
)
Requirement:
create a custom lightning component, kanban for any object ,something that looks like the standard opportunity kanban view,
along with which it should have drag and drop option for the kanban cards.
 
trigger EmptyCS on Account(before insert,before update){
for(CustomObj__c obj: CustomObj__c.getAll().Values()){
for(Account a: Trigger.new){
a.put(obj.Name,'');
update a;
}
}
}


Where CustomObj__c is my custom setting object, i need to set the values of the custom setting to blank, can anyone please suggest a solution!

Thanks & Regards