You need to sign in to do that
Don't have an account?
Ken sfdc1
Convert the workflow field update to trigger as the field is changed to text encrypted data type noy supporting in workflow
Can anyone help me to create a small trigger on Patient Profile object:
Condition Created and every time edited.
AND(ISPICKVAL($User.AEGR_User_Country__c,"Brazil"),
OR(ISPICKVAL(AEGR_Product__c , "Lomitapide"),
ISPICKVAL(AEGR_Product__c , "Metreleptin"),
ISPICKVAL(AEGR_Product__c , "")),ISPICKVAL( AEGR_Status__c,"Identified" ))
Object : Patient Profile
Field to Update Patient Profile: Patient ID
Formula value:
IF(ISPICKVAL(AEGR_Product__c , "Lomitapide"),
AEGR_Patient_Initials__c & "-" & "LOM-BR" & "-" & TRIM(RIGHT( Name , 4)),
IF(ISPICKVAL(AEGR_Product__c , "Metreleptin"),
AEGR_Patient_Initials__c & "-" & "MET-BR" & "-" & TRIM(RIGHT( Name , 4)),
IF(ISPICKVAL(AEGR_Product__c ,""),"",
"")))
Condition Created and every time edited.
AND(ISPICKVAL($User.AEGR_User_Country__c,"Brazil"),
OR(ISPICKVAL(AEGR_Product__c , "Lomitapide"),
ISPICKVAL(AEGR_Product__c , "Metreleptin"),
ISPICKVAL(AEGR_Product__c , "")),ISPICKVAL( AEGR_Status__c,"Identified" ))
Object : Patient Profile
Field to Update Patient Profile: Patient ID
Formula value:
IF(ISPICKVAL(AEGR_Product__c , "Lomitapide"),
AEGR_Patient_Initials__c & "-" & "LOM-BR" & "-" & TRIM(RIGHT( Name , 4)),
IF(ISPICKVAL(AEGR_Product__c , "Metreleptin"),
AEGR_Patient_Initials__c & "-" & "MET-BR" & "-" & TRIM(RIGHT( Name , 4)),
IF(ISPICKVAL(AEGR_Product__c ,""),"",
"")))
sfdcsushil
Sample code given above