• Sachin Kumar 34
  • NEWBIE
  • 30 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 10
    Questions
  • 5
    Replies
I am having MASTER Detail (Opportunity and CustomerCare)

Now had added a button and set the render as "for creating the pdf", on the opportunity page.

I need to fetch some of the field data from my custom object "CustomerCare" to the table row and column.

I had done with the render as functionality but unable to fetch the data into the table.

Please help me on the same.
 

I had added new button "Create Contract" in opportunity page now i want to set the functionality on this. Once user click on the button, the new contract will create and the field data will be transferred from Opportunity to a new contract. I had used the below script into the button, but getting an error.Opp Fields Need to transferError getting



Button Code:

{!REQUIRESCRIPT('/soap/ajax/33.0/connection.js')}

var contract = new sforce.SObject('Contract');

contract.Net_License__c = '{!Opportunity.Net_License__c }';

contract.Net_Maintenance_Amount__c = '{!Opportunity.Maintenance_Amount__c}';

contract.Net_Consulting_Amount__c = '{!Opportunity.Services_Amount__c }';

contract.Net_Training_Amount__c = '{!Opportunity.Net_Training_Amount__c}';

contract.Deal_Total_cal__c = '{!Opportunity.P_Amount__c}';

contract.OppOpp__c = '{!Opportunity.Opportunity_No__c}';

result = sforce.connection.create([contract]);

if(result[0].success == 'true') { window.location = '/' + result[0].id ; } else { alert('Error');
}

I want to transfer the data from opportunity to contract.
I had created CREATE CONTRACT button at opportunity page.
Now my requirement is that: Once opportunity will create and saved and user click on the CREATE CONTRACT button.
It will create a new contract for the same opportunity and pass all the field data from opportunity to contract.
So how can achieve this task (By Trigger, Classes or VF)
I don't want to show the error message page/url when the record doesn't meet the criteria.

Approval Error URL Page

I want to Hide/de-activate the "Submit for Approval button", if record doesn't meet the criteria.
I had integrated SF to JIRA

In had created CREATE JIRA button into my SF CASE.

Once a case is saved and user click on the CREATE JIRA button, the JIRA ISSUE will create for that case.

Now I want to set some condition, once the JIRA Issue will create for the particular case, the button will de-activate or the person is unable to create the new JIRA Issue from the salesforce
I want to integrate SF with JIRA and vice versa.
For accessing the JIRA we need to use the VPN. So it is possible to connect both ends with the use of the REST / SOAP.
I had tested Servicerocket app, it is working fine, when VPN is in used. 
Please let me know can we use the web services for the same?
Hi I want to transfer some of the field’s data from Contract to CARD (Custom) object fields
 
Contract fields
1) DR Onsite (Formula -> Currency)
2) HR Onsite (Formula -> Currency)
3) DR Offsite (Formula -> Currency)
4) HR Offsite (Formula -> Currency)
 
CARD Fields
1) Onsite DR (Currency)
2) Onsite HR (Currency)
3) Offsite DR (Currency)
4) Offsite HR (Currency)
 
We can create multiple CARD record for one contract, so I want to populate the above field’s data whenever new CARD record will create
 
Eg : For Contract 1 -> Card Record 1  (Want to populate the Contract 1 fields data into the Card Record1)
For Contract 1 -> Card Record 2 (Want to populate the Contract 1 field’s data into the Card Record2)
 
For Contract 2 -> Card Record 1 (Want to populate the Contract 2 field’s data into the Card Record 1)
For Contract 2 -> Card Record 2 (Want to populate the Contract 2 field’s data into the Card Record 1) and so on.
 
What is the trigger and test class for the above problem.
I need to set the 3 different condition into my approval process
If Opportunity : Stage (If stage = Offer/POC or Stage = 5-Contracts)  à Approval is required
If any changes into the closed date         à   Approval is required
If any changes into  the TOTAL (i.e)           à Approval is required 
I had Field Name TOTAL
Currently my TOTAL = 10$
Now in the record, I had changed the TOTAL = 1010$ (If the new new TOTAL value is > 1000$ (i.e. the difference between Old TOTAL (10$) and the New TOTAL (1010$) greater than (>) 1000$) --> the approval process will work.
 
In the same case If TOTAL = 1010$
Now in the same record I had changed the TOTAL = 10$ (If the new TOTAL is 10$ (i.e. the difference between New TOTAL (10$) and the Old TOTAL (1010$) less than (<) 1000$) --> the approval process will work. Remember, I have only one field TOTAL.
For me (1) & (2) is working, unable to set the criteria for the (3) -> For TOTAL condition
 
(Opportunity: StageEQUALS3 - Offer/POC,5 - Contracts) OR (Opportunity: Close DateNOT EQUAL TOTODAY)
Test Class for a Apex Scheduler Class

Hi I have a ApexScheduler Class which need to be test inorder to deploy can anybody suggest me the way to achieve it to get the coverage. I am posting the code below.

Please provide me the @test class.


global class SendEmailToUserClass_New_New Implements Schedulable
        {
                   global void execute(SchedulableContext sc)
                    {
                                sendmail();
                    }
                    public void sendmail()
                    {
                                Messaging.SingleEmailMessage email = new Messaging.SingleEmailMessage();
                                List<User> userList = [select id,email,profile.name from user where profile.name= 'Test1'];
                                string [] toAddress= new string[]{};
                                 for(User u:userList){
                                  toAddress.add(u.email);
                                 }                                   

                                  email.setSubject('Oppt and Accounts');
                                  email.setPlainTextBody('Update your opp and accounts in SF');
                                   email.setToAddresses(toAddress);
                               Messaging.sendEmail(New Messaging.SingleEmailMessage[]{email});
                    }
        }
I want to transfer some of the field data from Contract to Service TimeCard (Custom object) field.

The same field in both the object. Once the contract is created and under that when the service timecard record is generated the (Daily rate and Daily rate offset) data will automatically transfer from Contract to my custom object field.

I had applied the below code.


trigger servicecontract on Contract (after insert) 
{
    
 Set<Id> Ids= new Set<Id>();
    for (Contract member : Trigger.new)
    {
       Ids.add(member.Id);       
    }

 List <Contract> memberList = new List <Contract> ([Select Id, Daily_Rate__c, Daily_Rate_Offsite__c from Contract where Id in :Ids]);    

    for(Contract cont : memberList)

    {
  
       SFDC_Service_Timecard__c member = new SFDC_Service_Timecard__c();
    
        member.Daily_Rate__c = cont.Daily_Rate__c;
        member.Offsite_Daily_Rate__c = cont.Daily_Rate_Offsite__c;
       insert member;
    }
 }
I want to transfer the data from opportunity to contract.
I had created CREATE CONTRACT button at opportunity page.
Now my requirement is that: Once opportunity will create and saved and user click on the CREATE CONTRACT button.
It will create a new contract for the same opportunity and pass all the field data from opportunity to contract.
So how can achieve this task (By Trigger, Classes or VF)
I don't want to show the error message page/url when the record doesn't meet the criteria.

Approval Error URL Page

I want to Hide/de-activate the "Submit for Approval button", if record doesn't meet the criteria.
I had integrated SF to JIRA

In had created CREATE JIRA button into my SF CASE.

Once a case is saved and user click on the CREATE JIRA button, the JIRA ISSUE will create for that case.

Now I want to set some condition, once the JIRA Issue will create for the particular case, the button will de-activate or the person is unable to create the new JIRA Issue from the salesforce
Hi I want to transfer some of the field’s data from Contract to CARD (Custom) object fields
 
Contract fields
1) DR Onsite (Formula -> Currency)
2) HR Onsite (Formula -> Currency)
3) DR Offsite (Formula -> Currency)
4) HR Offsite (Formula -> Currency)
 
CARD Fields
1) Onsite DR (Currency)
2) Onsite HR (Currency)
3) Offsite DR (Currency)
4) Offsite HR (Currency)
 
We can create multiple CARD record for one contract, so I want to populate the above field’s data whenever new CARD record will create
 
Eg : For Contract 1 -> Card Record 1  (Want to populate the Contract 1 fields data into the Card Record1)
For Contract 1 -> Card Record 2 (Want to populate the Contract 1 field’s data into the Card Record2)
 
For Contract 2 -> Card Record 1 (Want to populate the Contract 2 field’s data into the Card Record 1)
For Contract 2 -> Card Record 2 (Want to populate the Contract 2 field’s data into the Card Record 1) and so on.
 
What is the trigger and test class for the above problem.
I need to set the 3 different condition into my approval process
If Opportunity : Stage (If stage = Offer/POC or Stage = 5-Contracts)  à Approval is required
If any changes into the closed date         à   Approval is required
If any changes into  the TOTAL (i.e)           à Approval is required 
I had Field Name TOTAL
Currently my TOTAL = 10$
Now in the record, I had changed the TOTAL = 1010$ (If the new new TOTAL value is > 1000$ (i.e. the difference between Old TOTAL (10$) and the New TOTAL (1010$) greater than (>) 1000$) --> the approval process will work.
 
In the same case If TOTAL = 1010$
Now in the same record I had changed the TOTAL = 10$ (If the new TOTAL is 10$ (i.e. the difference between New TOTAL (10$) and the Old TOTAL (1010$) less than (<) 1000$) --> the approval process will work. Remember, I have only one field TOTAL.
For me (1) & (2) is working, unable to set the criteria for the (3) -> For TOTAL condition
 
(Opportunity: StageEQUALS3 - Offer/POC,5 - Contracts) OR (Opportunity: Close DateNOT EQUAL TOTODAY)