• New_Developer
  • NEWBIE
  • 105 Points
  • Member since 2011

  • Chatter
    Feed
  • 4
    Best Answers
  • 3
    Likes Received
  • 0
    Likes Given
  • 89
    Questions
  • 117
    Replies
Hi,

What iam trying to acheive here is the affiliated tracking. we have different affiliates and there is button on each of their websites which will redirect to a force.com site visualforce page of our company. They all have a input hidden filed which stores the affiliate code. I need to be able to capture that code when its redirected to the force.com site and store it on a field in salesforce. What is the best way to acheive it. Any help is greatly appreciated.

Thanks
Hi,

Iam trying to schedule a apex job that runs for every 30 mins from 6PM to 11 PM. Here is the scheduler iam trying to use

ScheduledClass obj= new ScheduledClass();
String sch = '0 0,30 18,19,20,21,22,23 ? * MON-FRI';
System.schedule('My Job', sch, obj);

But iam getting the below error

System.StringException: Seconds and minutes must be specified as integers: 0 15,30,45 18,19,20,21,22,23 ? * MON-FRI

Is there any way we could scehdule a job which could run for every 30 mins starting from  6 PM and ending at 11.30 PM??

Thanks
So i am looking to compare a picklist value to a name field where i take the value of the picklist and see if the name field contains that value. The formula works but however it only returns "match" when the name field is blank which is incorrect. Does anyone see what i am doing wrong.

IF(ISPICKVAL( Site__r.Support_Package__c , "Support") && CONTAINS("Support", Product__r.Name), "Match",
IF(ISPICKVAL( Site__r.Support_Package__c , "Enhanced") && CONTAINS("Enhanced", Product__r.Name), "Match",
IF(ISPICKVAL( Site__r.Support_Package__c , "Premium") && CONTAINS("Premium", Product__r.Name), "Match", "Different")))

Thanks.....
Hi,

I have a batch class which runs and attached like hundreds of text files to the Document object and i have a vf page and controller to get all the data in that documents into one big text file. The size of the file would be around 9MB. But iam getting the Apex heap sze too large error. Is it possible to generate a 9 MB text file from a vf page??

Here is my code

<apex:page standardController="Child__c" extensions="DocumentController" contentType="text/plain/#testfile" cache="false" >
<apex:repeat value="{!lstStringOutput}" var="str">
{!str}
</apex:repeat>
</apex:page>

Conrtoller:
public with sharing class DocumentController {
public List<String> lstStringOutput {get;set;}
Public Static String text;
    public DocumentController(ApexPages.StandardController controller) {

         lstStringOutput = new List<String>();
          Folder folder = [select id from Folder where name='Test file' LIMIT 1];
        
        for(Document doc : [Select id, Description , Body , folderId from Document where folderId = :folder.id ]){
          text= doc.Body.toString();
             lstStringOutput.add(text+'\r');
           } 
}
}
Thanks

I have field called 'Length MT' (number type). I would like to update this field by a value from my another field 'MAIN ASSY HOSE LENGTH' (number type), but if another field 'Hose Accessories' name contain 'None', formula should use '0.00' value.

Is it possible to create above working formula for updating my custom field?
Thank you for any help
Hi,
I have a  custom object Opportunity Service Line Item which has lookup relation to opportunity.
I have a field in Opportunity Service Line Item called 'TCV'.
Each Opportunity Line Item can have multiple Service Line Items.
I want to write a trigger to calculate the sum of TCV for all the Service Line Items and update in Opportunity Object.
Can anyone please provide a sample trigger for this.

Thanks,
Ipsita
I have the below trigger, to update a child if a field on the parent is a specific value. 

I am getting the below error

Error: Compile Error: Invalid field Status__c for SObject ADR__c at line 28 column 1


trigger ADRParentUpdateChild on ADR__c ( after update, after insert) {

List<ADR__c > ParentRecords= [Select id, Next_Step__c, (Select ADR__c, Status__c FROM ADRUser__r) from ADR__c  WHERE id IN :Trigger.newMap.keySet()];

for(ADR__c parent: ParentRecords){
if(parent.Next_Step__c == 'Submit'){
   
parent.Status__c = 'Submit';
   }
   }
   
}
Hi,

Iam trying to implement webservices where i need to post the data from salesforce to external syatem and i wrote an apex class with POST request and i get the below error

The message with To '' cannot be processed at the receiver, due to an AddressFilter mismatch at the EndpointDispatcher.  Check that the sender and receiver's EndpointAddresses agree".

What does the error mean??

Thanks. Any help is appreciated.
Hi All,

I want to send multiple attachments to salesforce using Bulk API.

please tell me what should be the endpoint in this case,what should be my CSV format ,what all headers I'll be including and other stuff if you know which could help me

Thanks in advance!!
Hi,

Iam trying to use http POST request to enter data from salesforce to external system.  My WSDl file contans below soapAction

-<wsdl:operation name="AddCustomerData">
<soap12:operation style="document" soapAction="http://xxxx.org/WebServices/AddCustomerData"/>

Salesforce doesnot support SOAP 1.2 , so does that mean i cannot use the webservices for POSt operation too? The WSDL file i got only has SOAP12 operations. How can make it work so that i can use webservices to POST and GET data.

Thanks
I need to use wenservices to enter data to the external satem. I wrote a triggre and used @future in the Apex class to do this.But iam getting the response as [Status=Bad Request, StatusCode=400]. Not sure how to set the body for POSt request with application/soap+xml content type.  Below is my code. An help is appreciated

HttpRequest req = new HttpRequest();
HttpResponse res = new HttpResponse();
Http http = new Http();

req.setEndpoint('https://testurl');
req.setMethod('POST');

String username = 'test';
String password = 'test';


Blob headerValue = Blob.valueOf(username + ':' + password);
String authorizationHeader = 'BASIC ' + EncodingUtil.base64Encode(headerValue);
req.setHeader('Authorization', authorizationHeader);
req.setTimeout(100000);
req.setHeader('Content-Type', 'application/soap+xml; charset=utf-8');
req.setCompressed(false);
req.setBody('Customer= 500269677900& Name=TestCallout');


try {
    res = http.send(req);
} catch(System.CalloutException e) {
    System.debug('Callout error: '+ e);
}

Thanks

Hi,

I have a requirement where i need to send a data upon creation to an external hub using Webservices. I mean when a record in a custom object is created , the data in the fields should also get stored in the external system. Any ideas on how do this is really appreciated.

Thanks