• JAY_P
  • NEWBIE
  • 64 Points
  • Member since 2015

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 17
    Questions
  • 45
    Replies
I am looking for an integration of the data from our sales contact application to sales forces and the communication history should be available in saleforce dash board. 

May i know the technical feasilbility of this?
i have some record types in task object when i select one particular record type and if i create task under that particular record type one checkbox should be checked in some other custom object.how do i do this please help me anybody.
Hi ,

I have written a javascript button to create a record on salesforce .when the user clicks once on the button the record is created .but he clicks again on the button another record is created.

I just dont want the user to click the button again and create a duplicate record.Is there any other way to disable the button after the user clicks once or else if the record is already created .he needs to be prompted  that  the record is already exixts.
 
{!requireScript("/soap/ajax/26.0/connection.js")} 

var req = new sforce.SObject("Candidate__c"); 
req.Id = "{!Candidate__c.Id}"; 
req.Job_Application__c="True"; 
req.Recruiting_Status__c="Possible Candidate" 
var aResult = sforce.connection.update([req]); 
if (aResult[0].getBoolean("success")) { 
console.log("Candidate Update Successful"); 
} 
var newJob = new sforce.SObject("Job_Application__c"); 
newJob.Candidate__c= "{!Candidate__c.Id}"; 
newJob.Position__c= "{!Candidate__c.PositionId__c}"; 
newJob.Status__c="open"; 

var cResult = sforce.connection.create([newJob]); 
if ( cResult[0].getBoolean( "success" ) ) 
{ 
alert("Candidate Created Sucessfully "); 
window.location.reload(); 
} 

else 
{ 
alert( cResult[0].errors.message); 
}

 
Hi everybody, I've been having a tricky time getting this query to work. I'm trying to get all the data from Contact, and also, the AccountName that the Contact is ascociated with.

This query works great, but doesn't give me the AccountName of course. I'm hoping somebody could shed some light on how to add in the AccountName portion via a relationship query.

Here's my current, working query:

SELECT Contact.Name, Contact.FirstName, Contact.LastName, Contact.Id, Contact.Phone,Contact.Title, Contact.Department, Contact.PhotoUrl, Contact.Email, Contact.MailingCity, Contact.MailingState, Contact.MailingCountry, Contact.MailingPostalCode, Contact.MailingStreet LIMIT 100

Thank you
 
hai guys,
I have one requirments i have two objects one is x and another one is y . x and y have lookup relationship x object contains two fields.
1.primary exp.2.secondary exp. y object contains role field it is a picklist field when role value is primary then increment primary exp the value in the  x object same as when role value is secondary then increment secondary exp value in the x object.
how can i slove this requirment .please help me urgent
I am getting this erro when trying to add the Wave Analytics Manager permiossion set to a user. The permission set contains the Create and Edit Wave Analytics Dashboards, so I am not sure wht the problem is? The profile is System Admin. User license is Salesforce.

"Can't assign permission set Wave Analytics Manager to user Elyse McCulla. The user license doesn't allow the permission: Create and Edit Wave Analytics Dashboards"    
If I create a package in salesforce for my app, an error is shown: 
No test methods found in the Apex code included in the package. At least 75% test coverage is required. 

I have more than 2000 lines of code in visualforce page and its controller. This requirement means that I have to re-write all my code??

Thanks in advance.
Hi All 

I have a list of Tasks which created in a apex class;
Task task1=new Task();
task1.subject;..
...

Task task2=new Task();
task2.subject....
....

etc

myTasklist.add(task1);
myTasklist.add(task2);
......
......

And finally i need to insert all the tasks ( List) ??

How can i do that????

Thanks a lot everyone...
 
I am using Tinderbox as my 3rd party contract proposal management software.

In order to create a document in TB, it has to reference a field from the Lead.  So If I want to send "Blah" Proposal, I will need to have "Blah" in a specified field prior to submitting the request to TB. TB will then select the template based upon the string in the specified field.

I need to clear the text of the field about 5-10 seconds after submitting the request to TB.  I have seen scripts out there that can help me with the delay, so I am not too worried about that, but I need to do something along these lines:

If Field contains text then wait 5 seconds and set the text back to nothing.

Here is what I have so far:
 
trigger ClearTempHook on Lead (before insert, before update) {
	//List<String> LeadNames = new List<String>{};
	for(Lead myLead: Trigger.new){
 		if((myLead.temp_hook__c=='c')){
            temp_hook__c == 'hello';
		}
	}
}

 
I wrote a trigger on the User object on the after inserted and after updated events. The trigger fires on the inset event, but not on the update event. I wrote a test class to verify and the same thing happened. Any ideas as to why? I don't see any solutions on this topic.
Actually I wanted to create a survey from our customer after installation and service, how can I do that?
 

I have two object name is mobile__c and shutdown__c both object have connection to one field bachno_c 
and there are two typs of record mobile1 and mobile2 in the field call module__c 
so for that if record is mobile1 and in shutdown__c we have one field shutdown_type if i put if stop value it will change to start 
for the record mobile2 it will not change anything how to write trigger for that???
 
  • I am trying to find my way to wrap my head around this problem.  I am trying to eliminate 3 of these for AggregateResult loops and just make one since it is getting the same object.  I am a new Salesforce Developer and I am trying to figure out what will be the most efficient way to do this.
  • If anyone has an input on this I'd definitely love to hear it.

AggregateResult[] asgns = [SELECT LP_SAS__c, SUM(Exposure_Amt__c)total FROM CC_ASGN__c WHERE LP_SAS__c IN :sasIds AND Status__c = 'Assigned' GROUP by LP_SAS__c]; 

AggregateResult[] asgnsres = [SELECT LP_SAS__c, SUM(Reserve_Amount__c)total, SUM(Discount_Unearned__c)total1, SUM(Exposure_Amt__c)total2 FROM CC_ASGN__c WHERE LP_SAS__c IN :sasIds GROUP by LP_SAS__c];

AggregateResult[] asgnsbb = [SELECT LP_SAS__c, SUM(Amount_Deducted_from_Reserve__c)total, SUM(Buyback_DE__c)total1, SUM(Exposure_Amt__c)total2 FROM CC_ASGN__c WHERE LP_SAS__c IN :sasIds AND Status__c = 'Buyback' GROUP by LP_SAS__c];

AggregateResult[] asgnswo = [SELECT LP_SAS__c, SUM(Amount_Deducted_from_Reserve__c)total, SUM(Buyback_DE__c)total1, SUM(Exposure_Amt__c)total2 FROM CC_ASGN__c WHERE LP_SAS__c IN :sasIds AND Status__c = 'Write-off' GROUP by LP_SAS__c];
  • Then it goes as follows

for (AggregateResult ar : asgns) {           
            updateSass.add(new LP_SAS__c(Id = (ID)ar.get('LP_SAS__c'), Exposure_Total__c = (Decimal)ar.get('total')));
            system.debug('ar ' + ar);
        }
        
        if (updateSass.Size()>0){
            update updateSass;
        }
        
for (AggregateResult ares : asgnsres) {           
            updateSassres.add(new LP_SAS__c(Id = (ID)ares.get('LP_SAS__c'), Reserve_ASGN__c = (Decimal)ares.get('total'),                                         Unearned_Discount_ASGN__c = (Decimal)ares.get('total1'), Exposure_Total__c = (Decimal)ares.get('total2')));
         
        }
        
        if (updateSassres.Size()>0){
            update updateSassres;
        }
        
for (AggregateResult bb : asgnsbb) {
            updateSassbb.add(new LP_SAS__c(Id = (id)bb.get('LP_SAS__c'), Reserve_Buyback__c = (Decimal)bb.get('total'),                                             Unearned_Discount_Buyback__c = (Decimal)bb.get('total1'), Exposure_Total__c = (Decimal)bb.get('total2')));
        }
        
        if (updateSassbb.Size()>0){
            update updateSassbb;
        }
        
for (AggregateResult wo : asgnswo) {
            updateSasswo.add(new LP_SAS__c(Id = (id)wo.get('LP_SAS__c'), Reserve_Write_off__c = (Decimal)wo.get('total'),                                           Unearned_Discount_Write_off__c = (Decimal)wo.get('total1'), Exposure_Total__c = (Decimal)wo.get('total2')));         
        }
        
        if (updateSasswo.Size()>0){
            update updateSasswo;
        }


 
I have a scenario where too many calculations to be done with large volume of data to load a custom visualforce page report. I have almost avoided unnecessary loop in Apex code. Since it is more than 100k records, calculation is taking long time which is exceeding limit of 10000ms. So it is hitting CPU Limit Exceeded error. Is there a way to increase CPU time?
Hey Developer.
I want to create one validation rule please help me...
i have three object 1.Mobile module type(field type : text and value which i entered is pc789)
2. active start mode which has (picklis-tfield type) value --- disabled,derated,normal operation
3. tamper level which has (picklist -field type) value --- tamperlevel1, tamperlevel2
 so i want to create one validate rule for if mobile module type value is pc789,
                          active start mode value is derated and tamperlevel value is tamperlevel2
it did not allow to add data in system or throw some error 
please help me???
thank you

I must make a http request to Shopify in Salesforce. I used following url format as endpoint url for setEndpoint method

HttpRequest req= new HttpRequest(); 
req.setEndpoint('https://apikey:password@hostname/admin/resource.xml'); 
req.setMethod('GET'); 

I get following log:

CALLOUT_RESPONSE|[18]|System.HttpResponse[Status=Unauthorized, StatusCode=401]

And I get return value from body of HttpResponse:

<?xml version="1.0" encoding="UTF-8"?> <hash> <errors>[API] Invalid API key or access token (unrecognized login or wrong password)</errors> </hash>

Also I have tried to following structure but I haven't been succesful.

Blob headerValue = Blob.valueOf(apikey+ ':' + password);
String authorizationHeader = 'BASIC ' +
EncodingUtil.base64Encode(headerValue);
req.setHeader('Authorization', authorizationHeader);

And also following url works properly in any browser

apikey:password@hostname/admin/resource.xml

What should I do for HttpResponse status code be 200.