Merhabalar,
İzmir ve çevresinde yaşayan grup üyeleriyle bir tanışma ve periyodik görüşme oluşturmak için bir Meetup yapmayı çok isterim. Birkaç kişi başlayıp aktif bir community kurmak için tanışalım mı?
Merhabalar,
İzmir ve çevresinde yaşayan grup üyeleriyle bir tanışma ve periyodik görüşme oluşturmak için bir Meetup yapmayı çok isterim. Birkaç kişi başlayıp aktif bir community kurmak için tanışalım mı?
my Trigger class code
trigger LeadTrigger on Lead (/*before insert,*/ after insert, after update) {
if(Trigger.isAfter && (Trigger.isInsert || Trigger.isUpdate)){
LeadTriggerHandler.createApplicationAfterLeadConverted(Trigger.new);
}
/* if(Trigger.isAfter && Trigger.isInsert){
for(Lead led: Trigger.new){
Contact newCnt=new Contact(Name= led.Student1_Name__c);
insert newCnt;
}
}*/
}
my trigger handler class
public class LeadTriggerHandler {
public static void createApplicationAfterLeadConverted(List<Lead> newLead){
List<hed__Application__c> AppList=/*[SELECT Id, FROM Application WHERE LeadId__c=:newLead[0].id];//*/new List<hed__Application__c>();
for(Lead Ld : newLead){
if(Ld.Status=='Qualified') /*(Ld.IsCorverted=true)*/{
hed__Application__c newApp = new hed__Application__c();
newApp.hed__Applicant__c=Ld.ConvertedContactId;
newApp.hed__Applying_To__c=Ld.ConvertedAccountId;
//OwnerId=Ld.OwnerId
AppList.add(newApp);
}
}
insert(AppList);
}
}
Guide me if you can thanks in advance.
The issue with your code is that you are not querying the AppList to see if a Lead was converted to an Application. Without querying the AppList and finding if a Lead was converted to an Application, the code will attempt to create a new Application for every Lead that is qualified or converted.
To fix this, you should query the AppList for every Lead in the newLead list and if a Lead was already converted to an Application, it should not be added to the AppList.
The corrected code should look like this:
public class LeadTriggerHandler {
public static void createApplicationAfterLeadConverted(List<Lead> newLead){
List<hed__Application__c> AppList=new List<hed__Application__c>();
for(Lead Ld : newLead){
// Query the AppList to see if the Lead was already converted
List<hed__Application__c> apps = [SELECT Id, FROM Application WHERE LeadId__c=:Ld.id];
if(apps.size() == 0 && Ld.Status=='Qualified'){ /*(Ld.IsCorverted=true)*/
In the future please post these types of messages as Post instead of Question.
As this has been posted as a Question the system has flagged this as an Unanswered Question and is expecting a Best Answer.
We couldn't find a button named 'Google_Info' on the 'Contact Layout' page layout.
How can I solved it ? Thank you
Merhaba bu sorunu çözemedim Page Detail Type: Detail Page Link olarak ekleyebiliyorum
Detail Page Button olarak ekledigimde Error veriyor ?
link: https://www.google.com/search?q={!Contact.Name}
Delete the button. And again create the new one with same label name.
In salesforce I have a client requirement to clone UAT sandbox (partial copy) to DEV sandbox (developer / developer pro). As far as I know it is not possible. Can you suggest any workarounds?
@Salesforce Community Macedonia@Turkish Salesforce Community@English Salesforce Community at Japan
@Karthik E standard salesforce clone feature can only do cloning between similar sandbox types.. like Partial to Partial || Full copy to Full copy.
In this case, i presume we need to take approach of migrating metadata via package deployment or other means
I need to prepare the org before Spring release. The step I need to do is;
1. After you enable this update for testing, verify that the custom text from your label attributes renders correctly on your Visualforce pages.
2.Locate and make a list of double-escaped labels.
If label attribute text doesn’t render as expected on a Visualforce page, the attribute may be double-escaped.
Review your code to see if you escaped the label attribute before enabling this release update. If needed, see Visualforce Developer Guide: Unescaped Output and Formulas in Visualforce Pages for a list of functions that are commonly used for escaping strings.
Do not remove any manual escaping yet. For now, only create a list of all the Visualforce pages that incorrectly render text from double-escaped label attributes.
I am stuck at step#2. Has anyone worked this update recently? #Salesforce Developer I'd like to ask how I can locate the double-escaped label attributes.
You can check out this link
Thank you
Verileri alanın içinde alfabetik sırayla koyabilir miyim? / Can I put the data inside the field in alphabetical order? #Salesforce Developer
@Ali Can Kara Do we have a trigger implemented for account if yes then we can use that to sort the data. Or else implement a flow and call this invocable apex, pass the account id as parameter and populate an output parameter with the sorted description.
Below is the basic sorting logic which you can implement:
String str='B,A,C';// test data
List<String> lstOfString = str.split(',');
lstOfString.sort();
string sortedDescString = string.join(lstOfString,',');// Hold the sorted description
System.debug(sortedDescString);// testing the output
Hope this helps
public static void working(){
list<Account> insetingAccList = new list<Account>();
list<Account> Acclist = [select id,name from Account limit 5];
Account accObj = new Account();
for(Account acc : Acclist){
accObj = new Account();
accObj.name = '5 Account'+acc.name;
insetingAccList.add(accObj);
}
insert insetingAccList;
set<id> AccountIds = new set<id>();
for(Account acc: insetingAccList){
AccountIds.add(acc.id);
}
list<contact> conlist = new list<contact>();
list<contact> conlist2 =[select id,name from Contact limit 5];
contact ObjCon = new Contact();
for(Contact cnt : conlist2){
ObjCon = new Contact();
ObjCon.FirstName = cnt.Firstname;
ObjCon.LastName = cnt.LastName;
ObjCon.AccountId = ''; ///BURAYI NASIL DOLDURACAĞIZ ???
conlist.add(ObjCon);
} insert conlist;
}
bu 5 contact ı nasıl insert olan 5 accounta sırayla ekleyebilirim?
Asagidaki istedigini yapar. kodun uzerine eklemeler yaptim.
Ilk kisimda yarattiklarini SOQL ile liste icine alip, contact lara accountId ile baglamalisin.
sayet isini gordu ise best answer olarak isaretler misin?
public static void working(){
list<Account> insetingAccList = new list<Account>();
list<Account> Acclist = [select id,name from Account limit 5];
Account accObj = new Account();
for(Account acc : Acclist){
accObj = new Account();
accObj.name = '5 Account'+acc.name;
insetingAccList.add(accObj);
}
insert insetingAccList;
set<id> AccountIds = new set<id>();
for(Account acc: insetingAccList){
AccountIds.add(acc.id);
}
list<contact> conlist = new list<contact>();
list<contact> conlist2 =[select id,name from Contact limit 5];
contact ObjCon = new Contact();
list<Account> accSOQL = [select id,name from Account where name like '5 Account%' limit 5];
integer i=0;
for(Contact cnt : conlist2){
ObjCon = new Contact();
ObjCon.AccountId= accSOQL[i].Id;
ObjCon.FirstName = cnt.Firstname;
ObjCon.LastName = cnt.LastName;
conlist.add(ObjCon);
i++;
} insert conlist;
}
Merhaba arkadaslar,
Soyle bir req uzerine calisiyorum. Bir yerde tikandim. Opportunity ve Case arasinda bir automation var Flow uzerinde. Opportunity deki bir field i read only yapmak istiyorum, flow bu field i update yaptiktan sonra. User lar manual olarak degisiklik yapiyorlar. Bunu engellemek istiyorum. Opportunity validation rule m su sekilde NOT(ISNULL(PRIORVALUE(Update__c))). Guzel calisiyor flow update ettikten sonra user edit yapamiyor AMA soyle bir sorun var. Diger field lerde yaptigim update i de kabul etmiyor yani record save olmuyor. Bu sekilde olmamasi lazim. Flow uzerinde read only yapilabiliyor mu? Field level sec den ya da page layout dan read only yapamam. Onun disinda oneriniz var mi? Tesekkurler
Yalnizca bir veya birkac fieldin degismesini kontrol edeceksen :
ISCHANGED(fieldName)
bu fonksiyonu kullanmalisin. onceki ve sonraki degeri karsilastirmaktan daha kolay saniyorum.
Merhaba arkadaslar,
Flow Administrator Superbadge'de ilk challenge da istendigi gibi flow u update edip duzgun calismasini sagladim. Case object te erisime gerek kalmadan UI uzerinden case olusturabiliyorum. Ayrica profillerin Case object ine erisimine, manage flow ve run flows seceneklerine de baktim. Hersey olmasi gerektigi gibi gorunuyor fakat asagidaki error mesajini aliyorum.
"Challenge Not yet complete... here's what's wrong: The flow does not allow users without access to the Case object to create a case."
Problemin nerede olabilecegi konusunda bir fikri olan var mi acaba?
Tesekkurler,