• jordi vos
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 15
    Replies
Hello all,

Is anyone elkse having problems while developing on cs18?
Salesforce in the browser works fine, but all interactions from eclipse end up in timeouts.
This happens for all projects(multiple customers) that connect to cs18.

This isn't the first time this happens. It should be the 4th time or so now(in the past 2 months).

trust.salesforce.com doesn't show any errors..

Regards,

Jordi
Hello,

I've created visualforce page in our sandbox environment. It's shows tje open opportunities for a user.
The idea is to show this on the user page.

To manage this I've create a sub tab (under create - > apps subtab app).
Everything is working fine and I'd like to deploy this to production.
However, the whole subtab app section is not showing up under create -> apps.

We're running enterprise and winter 2014 is active.
Any idea how this is possible?

Regards,

Jordi

Hello all,


We are in the process of making an manages app for a customer of ours.
One of the last steps was making the package managed.

 What I did: reated an unmanaged package
Uploaded the package
Deployed the pacakge in another dev. org
Did all the tests to check if the app works okay
Created a namespace on my first dev. org
added the package to the namespace.

 When I tried to upload this managed pacakage, I got the following error:

 An internal server error has occurred

An error has occurred while processing your request. The salesforce.com support team has been notified of the problem. If you believe you have additional information that may be of help in reproducing or correcting the error, please contact Salesforce Support. Please indicate the URL of the page you were requesting, any error id shown on this page as well as any other related information. We apologize for the inconvenience.

Thank you again for your patience and assistance. And thanks for using salesforce.com!

Error ID: 539275792-3950 (644874273)

 
When I tried to run all tests again on the dev. org, all of them failed. Stating that one class had to be compile again.
Looking at the class, I had no idea what was going wrong.

 The error: error: Compile Error: The left operand 'Timesheet_Line__c.Timesheet__c' cannot have more than one level of relationships at line 30 column 58

 So basicly, a query that worked properly, suddenly doesn't work anymore stating that I go to deep using relationships?

 I found on google that there can be a lot of issues with the namespace an code, but in this case, looking at the error, that doesn't seem to be the case.

 Any suggestions?

 The query to gives the error: SELECT Project_Group__c subTaskId FROM Timesheet_Line__c WHERE Timesheet_User__c =: timesheetUserId AND Timesheet_Line__c.Timesheet__c IN (SELECT Id FROM Timesheet__c WHERE Week_Commencing__c =: WeekCommencingDate) GROUP BY Project_Group__c

Regards,

 Jordi

Hello all,

Is anyone elkse having problems while developing on cs18?
Salesforce in the browser works fine, but all interactions from eclipse end up in timeouts.
This happens for all projects(multiple customers) that connect to cs18.

This isn't the first time this happens. It should be the 4th time or so now(in the past 2 months).

trust.salesforce.com doesn't show any errors..

Regards,

Jordi
Hello,

I've created visualforce page in our sandbox environment. It's shows tje open opportunities for a user.
The idea is to show this on the user page.

To manage this I've create a sub tab (under create - > apps subtab app).
Everything is working fine and I'd like to deploy this to production.
However, the whole subtab app section is not showing up under create -> apps.

We're running enterprise and winter 2014 is active.
Any idea how this is possible?

Regards,

Jordi

Hello,

 

I want to display the following xml response in a vf page

 

<?xml version="1.0" encoding="utf-8"?>
<weatherdata>
  <location>
    <name>Hyderabad</name>
    <type/>
    <country>IN</country>
    <timezone/>
    <location altitude="0" latitude="17.37528" longitude="78.474442" geobase="geonames" geobaseid="0"/>
  </location>
  <credit/>
  <meta>
    <lastupdate>2013-09-27T05:10:00</lastupdate>
    <calctime>0.0148</calctime>
    <nextupdate>2013-09-27T08:10:00</nextupdate>
  </meta>
  <sun rise="2013-09-27T00:35:45" set="2013-09-27T12:38:05"/>
  <forecast>
    <time day="2013-09-27">
      <symbol number="501" name="moderate rain" var="10d"/>
      <precipitation value="5.5" type="rain"/>
      <windDirection deg="274" code="W" name="West"/>
      <windSpeed mps="4.36" name="Gentle Breeze"/>
      <temperature day="32.04" min="23.12" max="33.35" night="23.12" eve="33.35" morn="28"/>
      <pressure unit="hPa" value="961.68"/>
      <humidity value="73" unit="%"/>
      <clouds value="sky is clear" all="8" unit="%"/>
    </time>
    <time day="2013-09-28">
      <symbol number="800" name="sky is clear" var="01n"/>
      <precipitation/>
      <windDirection deg="296" code="WNW" name="West-northwest"/>
      <windSpeed mps="3.8" name="Gentle Breeze"/>
      <temperature day="23.72" min="23.72" max="30.26" night="24.37" eve="30.26" morn="23.72"/>
      <pressure unit="hPa" value="960.8"/>
      <humidity value="92" unit="%"/>
      <clouds value="sky is clear" all="0" unit="%"/>
    </time>
    <time day="2013-09-29">
      <symbol number="800" name="sky is clear" var="01d"/>
      <precipitation/>
      <windDirection deg="288" code="WNW" name="West-northwest"/>
      <windSpeed mps="4.21" name="Gentle Breeze"/>
      <temperature day="27.32" min="23.76" max="31.25" night="24.6" eve="30.27" morn="23.76"/>
      <pressure unit="hPa" value="960.04"/>
      <humidity value="78" unit="%"/>
      <clouds value="sky is clear" all="0" unit="%"/>
    </time>
    <time day="2013-09-30">
      <symbol number="803" name="broken clouds" var="04n"/>
      <precipitation/>
      <windDirection deg="267" code="W" name="West"/>
      <windSpeed mps="4.46" name="Gentle Breeze"/>
      <temperature day="22.68" min="22.68" max="28.61" night="24.53" eve="28.61" morn="22.68"/>
      <pressure unit="hPa" value="957.04"/>
      <humidity value="92" unit="%"/>
      <clouds value="broken clouds" all="56" unit="%"/>
    </time>
    <time day="2013-10-01">
      <symbol number="501" name="moderate rain" var="10d"/>
      <precipitation value="7.45" type="rain"/>
      <windDirection deg="302" code="WNW" name="West-northwest"/>
      <windSpeed mps="5.01" name="Gentle Breeze"/>
      <temperature day="26.6" min="21.68" max="27.03" night="27.03" eve="26.6" morn="21.68"/>
      <pressure unit="hPa" value="960.13"/>
      <humidity value="0" unit="%"/>
      <clouds value="few clouds" all="14" unit="%"/>
    </time>
    <time day="2013-10-02">
      <symbol number="501" name="moderate rain" var="10d"/>
      <precipitation value="4.68" type="rain"/>
      <windDirection deg="284" code="WNW" name="West-northwest"/>
      <windSpeed mps="6.47" name="Moderate breeze"/>
      <temperature day="27.03" min="23.29" max="27.7" night="23.29" eve="27.7" morn="27.03"/>
      <pressure unit="hPa" value="959.65"/>
      <humidity value="0" unit="%"/>
      <clouds value="few clouds" all="18" unit="%"/>
    </time>
    <time day="2013-10-03">
      <symbol number="501" name="moderate rain" var="10d"/>
      <precipitation value="3.25" type="rain"/>
      <windDirection deg="283" code="WNW" name="West-northwest"/>
      <windSpeed mps="7.78" name="Moderate breeze"/>
      <temperature day="26.75" min="22.33" max="27.19" night="24.95" eve="27.19" morn="22.33"/>
      <pressure unit="hPa" value="958.26"/>
      <humidity value="0" unit="%"/>
      <clouds value="few clouds" all="17" unit="%"/>
    </time>
  </forecast>
</weatherdata>

 

 Hi,

 

Please find the below trigger and test class. As of now the code coverage is only 46% and i have passed all the parameters(mandatory) field values. Plz advice.

 

trigger statusupdate on Candidate_Mapping__c (before insert, before update)
{

public string strConvertedDate {get; set;}

if(Trigger.isUpdate)
{
// Candidate_Mapping__c ac = Trigger.new[0];
for(Candidate_Mapping__c ac : Trigger.new)
{
system.debug('ac:'+ ac);

candidate_mapping__c ac1 = Trigger.oldMap.get(ac.ID);

Map<Id,Candidate_Mapping__c> newContactMap = Trigger.newMap;
Map<Id,Candidate_Mapping__c> oldContactMap = Trigger.oldMap;

system.debug('newContactMap:' + newContactMap );
system.debug('oldContactMap:' + newContactMap );

if (ac.LR_Status__c == 'Approved' && ac.LR_Status__c != ac1.LR_Status__c )
{
// ac.LR_Email__c = ac.LR_Email_ID__c;

ac.status1__c = 'LR Approved';
ac.Manager_Email_ID__c = ac.Req_Owner_Email__c;
ac.LR_Status_Date__c = DateTime.now().format('MM-dd-yyyy hh:mm a z', 'America/Los_Angeles');
}

if (ac.LR_Status__c == 'Rejected'&& ac.LR_Status__c != ac1.LR_Status__c)
{
// ac.LR_Email__c = ac.LR_Email_ID__c;
ac.status1__c = 'LR Rejected';
ac.Manager_Email_ID__c = ac.Req_Owner_Email__c;
ac.LR_Status_Date__c = DateTime.now().format('MM-dd-yyyy hh:mm a z', 'America/Los_Angeles');
}



if (ac.MR_Status__c == 'Approved' && ac.MR_Status__c != ac1.MR_Status__c)
{
//
for(Id contactId:newContactMap.keySet())
{
//Loop through the map
Candidate_Mapping__c myNewContact = newContactMap.get(contactId);
Candidate_Mapping__c myOldContact = oldContactMap.get(contactId);
if (myNewContact.MR_Status__c <> myOldContact.MR_Status__c)
{
ac.MR_Status1__c = 'Approved';
ac.MR_Status_Date__c = DateTime.now().format('MM-dd-yyyy hh:mm a z', 'America/Los_Angeles');

}
else
{
ac.MR_Status1__c = 'None';
}
}
//
//ac.MR_Status1__c = 'Approved';
ac.status1__c = 'Approved';
ac.Manager_Email_ID__c = ac.Req_Owner_Email__c;
ac.MR_Status_Date__c = DateTime.now().format('MM-dd-yyyy hh:mm a z', 'America/Los_Angeles');
}

if (ac.MR_Status__c == 'Rejected' && ac.MR_Status__c != ac1.MR_Status__c)
{
ac.Manager_Email_ID__c = ac.Req_Owner_Email__c;
ac.status1__c = 'Rejected';
ac.MR_Status_Date__c = DateTime.now().format('MM-dd-yyyy hh:mm a z', 'America/Los_Angeles');
}

if (ac.Submitted_to_Client__c == 'Yes' && ac.Submitted_to_Client__c != ac1.Submitted_to_Client__c)
{
ac.status1__c = 'Submitted to Client';
ac.Priority__c = 'a';
ac.Submitted_to_Client_Date__c= DateTime.now().format('MM-dd-yyyy hh:mm a z', 'America/Los_Angeles');
}

if (ac.Submitted_to_Client__c == 'No'&& ac.Submitted_to_Client__c != ac1.Submitted_to_Client__c)
{
ac.status1__c = 'Not Submitted to Client';
ac.Priority__c = 'a';
ac.Submitted_to_Client_Date__c= DateTime.now().format('MM-dd-yyyy hh:mm a z', 'America/Los_Angeles');
}

if (ac.Interview_Scheduled__c == 'Yes'&& ac.Interview_Scheduled__c != ac1.Interview_Scheduled__c )
{
ac.status1__c = 'Interview Requested';
ac.Priority__c = 'b';
ac.Interview_Scheduled_Date__c= DateTime.now().format('MM-dd-yyyy hh:mm a z', 'America/Los_Angeles');
}

if (ac.Interview_Scheduled__c == 'No' && ac.Interview_Scheduled__c != ac1.Interview_Scheduled__c )
{
ac.status1__c = 'Not Shortlisted For Interview';
ac.Priority__c = 'b';
ac.Interview_Scheduled_Date__c= DateTime.now().format('MM-dd-yyyy hh:mm a z', 'America/Los_Angeles');
}

if (ac.Interview_Accepted__c == 'Yes' && ac.Interview_Accepted__c != ac1.Interview_Accepted__c)
{
ac.status1__c = 'Interview Accepted';
ac.Priority__c = 'c';
ac.Interview_Accepted_Date__c= DateTime.now().format('MM-dd-yyyy hh:mm a z', 'America/Los_Angeles');
}

if (ac.Interview_Accepted__c == 'No' && ac.Interview_Accepted__c != ac1.Interview_Accepted__c)
{
ac.status1__c = 'Candidate Not Available';
ac.Priority__c = 'c';
ac.Interview_Accepted_Date__c= DateTime.now().format('MM-dd-yyyy hh:mm a z', 'America/Los_Angeles');
}

if (ac.Client_Interviewed__c == 'Yes'&& ac.Client_Interviewed__c != ac1.Client_Interviewed__c)
{
ac.status1__c = 'Client Interviewed';
ac.Priority__c = 'd';
ac.Client_Interview_Date__c= DateTime.now().format('MM-dd-yyyy hh:mm a z', 'America/Los_Angeles');
}

if (ac.Client_Interviewed__c == 'No' && ac.Client_Interviewed__c != ac1.Client_Interviewed__c)
{
ac.status1__c = 'Client Did Not Interview';
ac.Priority__c = 'd';
ac.Client_Interview_Date__c= DateTime.now().format('MM-dd-yyyy hh:mm a z', 'America/Los_Angeles');
}

if (ac.Client_Offered__c == 'Yes' && ac.Client_Offered__c != ac1.Client_Offered__c)
{
ac.status1__c = 'Client Offered';
ac.Priority__c = 'e';
ac.Client_Offer_Date__c= DateTime.now().format('MM-dd-yyyy hh:mm a z', 'America/Los_Angeles');
}

if (ac.Client_Offered__c == 'No' && ac.Client_Offered__c != ac1.Client_Offered__c)
{
ac.status1__c = 'Interviewed and rejected';
ac.Priority__c = 'e';
ac.Client_Offer_Date__c= DateTime.now().format('MM-dd-yyyy hh:mm a z', 'America/Los_Angeles');
}

if (ac.Candidate_started__c == 'Yes' && ac.Candidate_started__c != ac1.Candidate_started__c)
{
ac.status1__c = 'Candidate started';
ac.Priority__c = 'f';
ac.started_date__c= DateTime.now().format('MM-dd-yyyy hh:mm a z', 'America/Los_Angeles');
}

if (ac.Candidate_started__c == 'No' && ac.Candidate_started__c != ac1.Candidate_started__c )
{
ac.status1__c = 'Candidate did not start';
ac.Priority__c = 'f';
ac.started_date__c= DateTime.now().format('MM-dd-yyyy hh:mm a z', 'America/Los_Angeles');
}

system.debug('ac:'+ ac);
system.debug('Status:' + ac.status1__c);
system.debug('Priority:' + ac.Priority__c);
system.debug('Manager Email:' + ac.Manager_Email_ID__c);
system.debug('LR_Email__c :' + ac.LR_Email__c);
system.debug('R_Email__c :' + ac.R_Email__c );
system.debug('MR_Status1__c:' + ac.MR_Status1__c );

}
}

if(Trigger.isInsert)
{
//Candidate_Mapping__c ac = Trigger.new[0];
for(Candidate_Mapping__c ac : Trigger.new)
{
system.debug('ac:'+ ac);

//Map<Id,Candidate_Mapping__c> newContactMap = Trigger.newMap;
//Map<Id,Candidate_Mapping__c> oldContactMap = Trigger.oldMap;


system.debug('LRStatus:' + ac.LR_Status__c);
system.debug('MRStatus:' + ac.MR_Status__c);

if(ac.Status1__c == 'Applied')
{
// ac.R_Email__c = ac.R_email_id__c;
ac.Requirement_Owner_Email__c = ac.Req_Owner_Email__c;
// ac.Manager_Email_ID__c = ac.LR_Email_ID__c;
}

if (ac.LR_Status__c == 'Approved')
{
// ac.LR_Email__c = ac.LR_Email_ID__c;
ac.status1__c = 'LR Approved';
ac.Manager_Email_ID__c = ac.Req_Owner_Email__c;
ac.LR_Status_Date__c = DateTime.now().format('MM-dd-yyyy hh:mm a z', 'America/Los_Angeles');
}

if (ac.LR_Status__c == 'Rejected')
{

// ac.LR_Email__c = ac.LR_Email_ID__c;
ac.status1__c = 'LR Rejected';
ac.Manager_Email_ID__c = ac.Req_Owner_Email__c;
ac.LR_Status_Date__c = DateTime.now().format('MM-dd-yyyy hh:mm a z', 'America/Los_Angeles');
}


if (ac.MR_Status__c == 'Approved')
{
ac.MR_Status1__c = 'Approved';
ac.status1__c = 'Approved';
ac.Manager_Email_ID__c = ac.Req_Owner_Email__c;
ac.MR_Status_Date__c = DateTime.now().format('MM-dd-yyyy hh:mm a z', 'America/Los_Angeles');
}

if (ac.MR_Status__c == 'Rejected')
{
ac.Manager_Email_ID__c = ac.Req_Owner_Email__c;
ac.status1__c = 'Rejected';
ac.MR_Status_Date__c = DateTime.now().format('MM-dd-yyyy hh:mm a z', 'America/Los_Angeles');
}

system.debug('ac:'+ ac);
system.debug('Status:' + ac.status1__c);
system.debug('Priority:' + ac.Priority__c);
system.debug('Manager Email:' + ac.Manager_Email_ID__c);
system.debug('LR_Email__c :' + ac.LR_Email__c);
system.debug('R_Email__c :' + ac.R_Email__c );
system.debug('MR_Status1__c:' + ac.MR_Status1__c );

}

 


}


}

 

 

Test class: 

 

@isTest(seealldata=true)
private class TestTriggerStatusUpdate
{
static testMethod void myUnitTest()
{
Candidate_Mapping__c coa =new Candidate_Mapping__c();
coa.status1__c = 'Applied';
coa.Employer_s_Authorization__c = 'test';
coa.LR_Comments__c = 'test by lr';
coa.MR_Comments__c = 'test by MR';
coa.Requirement_Owner_Email__c = 'testOwner@preludesys.com';
coa.Manager_Email_ID__c = 'testOwner1@preludesys.com';
coa.R_Comments__c = '';
coa.LR_Status__c = 'Rejected';
coa.MR_Status__c = 'Rejected';
coa.LR_Status_Date__c = DateTime.now().format('MM-dd-yyyy hh:mm a z', 'America/Los_Angeles');
coa.Submitted_to_Client__c = 'No';
coa.Submitted_to_Client_Date__c= DateTime.now().format('MM-dd-yyyy hh:mm a z', 'America/Los_Angeles');
coa.Interview_Scheduled__c = 'No';
coa.Interview_Scheduled_Date__c= DateTime.now().format('MM-dd-yyyy hh:mm a z', 'America/Los_Angeles');
coa.Interview_Accepted__c = 'No';
coa.Interview_Accepted_Date__c= DateTime.now().format('MM-dd-yyyy hh:mm a z', 'America/Los_Angeles');
coa.Client_Interviewed__c = 'No';
coa.Client_Interview_Date__c= DateTime.now().format('MM-dd-yyyy hh:mm a z', 'America/Los_Angeles');
coa.Client_Offered__c = 'No';
coa.Client_Offer_Date__c= DateTime.now().format('MM-dd-yyyy hh:mm a z', 'America/Los_Angeles');
coa.Candidate_started__c = 'No';
coa.Comments__c = '';
coa.started_date__c= DateTime.now().format('MM-dd-yyyy hh:mm a z', 'America/Los_Angeles');
coa.MR_Status1__c = 'None' ;
coa.LR_Email__c = 'test@prel.com';
// coa.status1__c = 'Rejected';
//coa.Manager_Email_ID__c = ac.Req_Owner_Email__c;

Candidate__c cc1=new Candidate__c();
cc1.Name='test';
cc1.Last_name__c='testone';
cc1.Current_city__c='chennai';
cc1.Current_state__c='Maine';
cc1.Gender__c='Male';
cc1.Employer_Name__c='ttt';
cc1.Email__c='test@gmail.com';
cc1.interview_contact_phone__c='Mobile Phone';
cc1.Contract_type__c='Corp to Corp';
cc1.visa_type__c='H1 B';
cc1.cost__c =100;
cc1.mobile_phone_no__c='9890043500';
cc1.employer_contact_email__c='test@gmail.com';
cc1.Employer_Contact_Name_Name__c='tt';
cc1.Employer_Mobile_No__c='9988009876';
cc1.Employer_Name__c = 'jos';
cc1.Employer_Work_Phone_No__c = '(425) 264-6771';
cc1.Followup_Date__c =date.today();
insert cc1;
coa.Candidate__c=cc1.id;
system.debug('candid:'+cc1.id);

Requirement__c rc1=new Requirement__c();
rc1.Name='SampathReq';
rc1.Job_Title__c='.net';
//rc1.Client__c ='abc company';
rc1.Duration__c='6';
rc1.No_Of_Resumes__c=2;
rc1.Min_Cost__c=100;
rc1.Max_Cost__c=200;
rc1.Rate__c=200;
rc1.Rate_Basis__c='Hourly';
rc1.Status__c='open';
rc1.Position_Type__c='Contract';
rc1.State__c='CA';
rc1.City__c='CA';
rc1.Est_Start_Date__c=date.today();
rc1.won__c = true;
//rc1.won_text__c ='yes';
insert rc1;
coa.Requirement__c=rc1.id;


insert coa;

}
static testMethod void myUnitTest1()
{

Candidate_Mapping__c coa =new Candidate_Mapping__c();
coa.status1__c = 'Applied';
coa.Employer_s_Authorization__c = 'test';
coa.LR_Comments__c = 'test by lr';
coa.MR_Comments__c = 'test by MR';
coa.Requirement_Owner_Email__c = 'testOwner@preludesys.com';
coa.Manager_Email_ID__c = 'testOwner1@preludesys.com';
coa.R_Comments__c = '';
coa.LR_Status__c = 'Approved';
coa.MR_Status__c = 'Approved';
coa.LR_Status_Date__c = DateTime.now().format('MM-dd-yyyy hh:mm a z', 'America/Los_Angeles');
coa.MR_Status_Date__c = DateTime.now().format('MM-dd-yyyy hh:mm a z', 'America/Los_Angeles');
coa.Submitted_to_Client__c = 'Yes';
coa.Submitted_to_Client_Date__c= DateTime.now().format('MM-dd-yyyy hh:mm a z', 'America/Los_Angeles');
coa.Interview_Scheduled__c = 'Yes';
coa.Interview_Scheduled_Date__c= DateTime.now().format('MM-dd-yyyy hh:mm a z', 'America/Los_Angeles');
coa.Interview_Accepted__c = 'Yes';
coa.Interview_Accepted_Date__c= DateTime.now().format('MM-dd-yyyy hh:mm a z', 'America/Los_Angeles');
coa.Client_Interviewed__c = 'Yes';
coa.Client_Interview_Date__c= DateTime.now().format('MM-dd-yyyy hh:mm a z', 'America/Los_Angeles');
// coa.status1__c = 'Client Interviewed';
coa.Client_Offered__c = 'Yes';
coa.Client_Offer_Date__c= DateTime.now().format('MM-dd-yyyy hh:mm a z', 'America/Los_Angeles');
// coa.status1__c = 'Client Offered';
coa.Candidate_started__c = 'Yes';
coa.Comments__c = '';
coa.MR_Status1__c = 'Approved' ;
coa.started_date__c= DateTime.now().format('MM-dd-yyyy hh:mm a z', 'America/Los_Angeles');

Candidate__c cc1=new Candidate__c();
cc1.Name='test';
cc1.Last_name__c='testone';
cc1.Current_city__c='chennai';
cc1.Current_state__c='Maine';
cc1.Gender__c='Male';
cc1.Employer_Name__c='ttt';
cc1.Email__c='test@gmail.com';
cc1.interview_contact_phone__c='Mobile Phone';
cc1.Contract_type__c='Corp to Corp';
cc1.visa_type__c='H1 B';
cc1.cost__c =100;
cc1.mobile_phone_no__c='9890043500';
cc1.employer_contact_email__c='test@gmail.com';
cc1.Employer_Contact_Name_Name__c='tt';
cc1.Employer_Mobile_No__c='9988009876';
cc1.Employer_Name__c = 'jos';
cc1.Employer_Work_Phone_No__c = '(425) 264-6771';
cc1.Followup_Date__c =date.today();
insert cc1;
coa.Candidate__c=cc1.id;
system.debug('candid:'+cc1.id);

Requirement__c rc1=new Requirement__c();
rc1.Name='SampathReq';
rc1.Job_Title__c='.net';
//rc1.Client__c ='abc company';
rc1.Duration__c='6';
rc1.No_Of_Resumes__c=2;
rc1.Min_Cost__c=100;
rc1.Max_Cost__c=200;
rc1.Rate__c=200;
rc1.Rate_Basis__c='Hourly';
rc1.Status__c='open';
rc1.Position_Type__c='Contract';
rc1.State__c='CA';
rc1.City__c='CA';
rc1.Est_Start_Date__c=date.today();
rc1.won__c = true;
//rc1.won_text__c ='yes';
insert rc1;
coa.Requirement__c=rc1.id;

User user = [Select Id from User limit 1] ; //where Email= 'gopalmr140313@gmail.com'];

EmailTemplate et = [Select Id, Subject, HtmlValue, Body from EmailTemplate where Name = 'Candidate Approval Email with link EZRE'];
List<ContentVersion> contentList = new List<ContentVersion>();

ContentWorkspace library = [SELECT id FROM ContentWorkspace LIMIT 1];
System.Debug('library.id:'+ library.id);
/* contentList = [Select Id, ContentDocumentId,VersionData from ContentVersion where FirstPublishLocationId = :library.id];
Blob strVersionData;
for(ContentVersion cversion :contentList)
{
strVersionData = cversion.VersionData;
System.Debug('strVersionData&colon;'+ strVersionData);
} */
ContentVersion contentVersionObj = new ContentVersion();
//contentVersionObj.ContentURL = 'http://www.google.com';
contentVersionObj.title = 'Google';//contentVersionObj.Enablement_Area__c = 'Acct Mgmt';
contentVersionObj.FirstPublishLocationId = library.id;
contentVersionObj.Candidate_Id__c = cc1.Id;
contentVersionObj.VersionData = Blob.valueOf('Ayangar') ;
contentVersionObj.PathOnclient = 'http://www.google.com';
contentVersionObj.Title ='Management Approach';
// contentVersionObj.ContentDocumentId = cv1.ContentDocumentId;

insert contentVersionObj;
System.Debug('ContentVersionObj:'+ contentVersionObj);

Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
Messaging.EmailFileAttachment efa = new Messaging.EmailFileAttachment();
efa.setFileName('Sasikumar.Word');
efa.setBody(Blob.ValueOf(et.Body));
//efa.setBody(Blob.valueOf('Ayangar'));
//efa.setContentType('.word'); //
System.Debug('efa:' +efa);
String[] toAddresses = new string[]{'dummy@yahoo.com'};
mail.setTargetObjectId(user.Id);
mail.setToAddresses(toAddresses);
//mail.setplaintextBody('plainbody');

mail.setSenderDisplayName('Charan Tej');

mail.setTemplateId(et.Id);
// mail.setWhatId(c.Id);
mail.setFileAttachments(new Messaging.EmailFileAttachment[] {efa});
mail.saveAsActivity = false;
// Sends the email
Messaging.SendEmailResult [] r = Messaging.sendEmail(new Messaging.SingleEmailMessage[] {mail});
//


insert coa;

Candidate_Mapping__c coa1 = [Select Id,Status1__c, LR_Status__c, MR_Status__c, MR_Status1__c from Candidate_Mapping__c where Candidate__c =: cc1.Id and Requirement__c =: rc1.id limit 1];
coa1.Status1__c = 'Candidate started';
// coa.LR_Status__c = 'Approved';
// coa.MR_Status__c = 'Rejected';
//coa1.Status1__c = 'LR Rejected';
update coa1;



}
}

 

 

 

 

 

 

 

  • September 24, 2013
  • Like
  • 0

I need to refresh my Production environment on a fortnightly basis from a full copy sandbox.  My org has 2 full copy sandboxes. In one all the changes will be done and thoroughly tested. These changes will be then migrated to the second full copy sandbox, as and when the testing gets completed. Then, on a fortnightly basis , second full copy sandbox shoud refresh the production environment. Can this functionality be achieved ? If yes, then how ?

 

Need you help....

Can a record be inserted from a RemoteAction method?

The records type does not match the controller type.

 

Thanks.

  • September 11, 2013
  • Like
  • 0

Hello all,


We are in the process of making an manages app for a customer of ours.
One of the last steps was making the package managed.

 What I did: reated an unmanaged package
Uploaded the package
Deployed the pacakge in another dev. org
Did all the tests to check if the app works okay
Created a namespace on my first dev. org
added the package to the namespace.

 When I tried to upload this managed pacakage, I got the following error:

 An internal server error has occurred

An error has occurred while processing your request. The salesforce.com support team has been notified of the problem. If you believe you have additional information that may be of help in reproducing or correcting the error, please contact Salesforce Support. Please indicate the URL of the page you were requesting, any error id shown on this page as well as any other related information. We apologize for the inconvenience.

Thank you again for your patience and assistance. And thanks for using salesforce.com!

Error ID: 539275792-3950 (644874273)

 
When I tried to run all tests again on the dev. org, all of them failed. Stating that one class had to be compile again.
Looking at the class, I had no idea what was going wrong.

 The error: error: Compile Error: The left operand 'Timesheet_Line__c.Timesheet__c' cannot have more than one level of relationships at line 30 column 58

 So basicly, a query that worked properly, suddenly doesn't work anymore stating that I go to deep using relationships?

 I found on google that there can be a lot of issues with the namespace an code, but in this case, looking at the error, that doesn't seem to be the case.

 Any suggestions?

 The query to gives the error: SELECT Project_Group__c subTaskId FROM Timesheet_Line__c WHERE Timesheet_User__c =: timesheetUserId AND Timesheet_Line__c.Timesheet__c IN (SELECT Id FROM Timesheet__c WHERE Week_Commencing__c =: WeekCommencingDate) GROUP BY Project_Group__c

Regards,

 Jordi