• Mohit Kashyap 14
  • NEWBIE
  • 10 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 10
    Questions
  • 13
    Replies
I am running approval process and for that I am creating an email template:
I had written the following template:

Please find below the record: {!Test_Exempt__c.Link}

Account Link: {!Account.Link}


I want these two links in the same email but I am not getting it. Only the first link is getting displayed. I want the Account link as well.
Can someone please help ? 
Hi All,
I want to send an email with an Attachment from Notes and Attachment related list.
 
i.e. i have few attachments inside Notes and Attachment related list of a custom Object.. and on a button click i need to send an email with attachment.
Can someone please write a code for me . It will be a great help
So I am using an app exchange package named Record Clone which will clone the opportunity and its related List. So this is working fine. Now my requirement is After cloning the Opportunity stage should be Qualification and there is a checkbox field that should be true
So to achive this I am using Workflow Rule 
My Rule Criteria: If my Formula evaluates to true 
ISCLONE()
Then I am updating the stage as well as the checbox via a Field Update
Workflow Rule Critera

Updating stage and checkbox field

So this workflow rule is not working..Can someone please help me out.
This is my first validation rule :
AND(
RecordType.DeveloperName = 'Final_Custom_Config',
$User.Bypass_Validation__c = False,

OR(
IF(
NOT(
OR(
ISPICKVAL(OTP_Protocol_Slot_1__c ,'Yubico OTP w/Yubicloud'),
ISPICKVAL(OTP_Protocol_Slot_1__c ,'OATH/HOTP w/Symantec VIP'),
ISPICKVAL( OTP_Protocol_Slot_1__c , 'None')
)
),
IF(ISBLANK(Public_PGP_Key__c), TRUE, FALSE), FALSE
),

IF(
NOT(
OR(
ISPICKVAL( OTP_Protocol_Slot_2__c ,'Yubico OTP w/Yubicloud'),
ISPICKVAL( OTP_Protocol_Slot_2__c ,'OATH/HOTP w/Symantec VIP'),
ISPICKVAL( OTP_Protocol_Slot_2__c , 'None')
)
),
IF( ISBLANK( Public_PGP_Key__c ) , TRUE , FALSE), FALSE
)
)
)

This is my second validation rule:
and( Batch_Master_Key_BMK_provided__c = true, Public_PGP_Key__c = NULL)


I have to combine the second VR into first in such a way that both VR should work. 
class:
public class CustomCloning
{  
    public String idOfRec {get;set;}
  
    public CustomCloning()
    {
    }
  
    public void cloneRec()
    {
        List<Business_Scenario_Qualification__c> cons = new List<Business_Scenario_Qualification__c>();
        Opportunity acc = [SELECT ID, Name,StageName, CloseDate  FROM Opportunity WHERE Id = : idOfRec];
        Opportunity accCopy = acc.clone(false,true);
        insert accCopy;
        List<Business_Scenario_Qualification__c > quote = [SELECT Id, Name FROM Business_Scenario_Qualification__c WHERE Opportunity__c = : acc.Id];
        for(Business_Scenario_Qualification__c c : quote)
        {
            Business_Scenario_Qualification__c conCopy = c.clone(false,true);
            conCopy.Opportunity__c = accCopy.Id;
            cons.add(conCopy);
        }
        insert cons;
        
    }
}

Button on Opportunity:
{!REQUIRESCRIPT("/soap/ajax/30.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/30.0/apex.js")}
sforce.apex.execute("customCloning","cloneRec",{{!Opportunity.Id}:{!Opportunity.Id}}"});

It is giving me the error when I click on " Custom Cloning Button "
A problem with the onclick javascript for this button or link was encountered 
Invalid or unexpected token
whenever I am clicking on Submit for Approval button I am getting this Error "owner or user is inactive. Org Id:00D3G0000008apY"
I had checked that User is Active still it is giving me this error.
Suppose in Opportunity we have related list of custom objects and if I clone the opportunity the related list should also be cloned. I had figured out that we can do this with VF. But dont know how to do it. Can someone plzz help?
How to write a trigger on Campaign which will count all Influenced Opportunities and the "amount" fields should calculate the revenue share on all influenced opportunities. 

Can Someone please write the trigger..Its Urgent
We have a custom object "Business Scenario" which is a related list in Opportunity. If the Opportunity is closed won then we have to write the validation rule on the custom object in such a way that users are not able to edit this custom record once created only System Admin can edit this.
I am running approval process and for that I am creating an email template:
I had written the following template:

Please find below the record: {!Test_Exempt__c.Link}

Account Link: {!Account.Link}


I want these two links in the same email but I am not getting it. Only the first link is getting displayed. I want the Account link as well.
Can someone please help ? 
Hi All,
I want to send an email with an Attachment from Notes and Attachment related list.
 
i.e. i have few attachments inside Notes and Attachment related list of a custom Object.. and on a button click i need to send an email with attachment.
Can someone please write a code for me . It will be a great help
class:
public class CustomCloning
{  
    public String idOfRec {get;set;}
  
    public CustomCloning()
    {
    }
  
    public void cloneRec()
    {
        List<Business_Scenario_Qualification__c> cons = new List<Business_Scenario_Qualification__c>();
        Opportunity acc = [SELECT ID, Name,StageName, CloseDate  FROM Opportunity WHERE Id = : idOfRec];
        Opportunity accCopy = acc.clone(false,true);
        insert accCopy;
        List<Business_Scenario_Qualification__c > quote = [SELECT Id, Name FROM Business_Scenario_Qualification__c WHERE Opportunity__c = : acc.Id];
        for(Business_Scenario_Qualification__c c : quote)
        {
            Business_Scenario_Qualification__c conCopy = c.clone(false,true);
            conCopy.Opportunity__c = accCopy.Id;
            cons.add(conCopy);
        }
        insert cons;
        
    }
}

Button on Opportunity:
{!REQUIRESCRIPT("/soap/ajax/30.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/30.0/apex.js")}
sforce.apex.execute("customCloning","cloneRec",{{!Opportunity.Id}:{!Opportunity.Id}}"});

It is giving me the error when I click on " Custom Cloning Button "
A problem with the onclick javascript for this button or link was encountered 
Invalid or unexpected token
whenever I am clicking on Submit for Approval button I am getting this Error "owner or user is inactive. Org Id:00D3G0000008apY"
I had checked that User is Active still it is giving me this error.
Suppose in Opportunity we have related list of custom objects and if I clone the opportunity the related list should also be cloned. I had figured out that we can do this with VF. But dont know how to do it. Can someone plzz help?
We have a custom object "Business Scenario" which is a related list in Opportunity. If the Opportunity is closed won then we have to write the validation rule on the custom object in such a way that users are not able to edit this custom record once created only System Admin can edit this.