• Jayant Jadhav
  • NEWBIE
  • 215 Points
  • Member since 2014

  • Chatter
    Feed
  • 7
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 49
    Replies

Hello Guys,

I have a XML request i need to HIT tally Server, How do I achieve this?
<ENVELOPE>
<HEADER>
<TALLYREQUEST>Export Data</TALLYREQUEST>
</HEADER>
<BODY>
<EXPORTDATA>
<REQUESTDESC>
<REPORTNAME>List of Accounts</REPORTNAME>
<STATICVARIABLES>
<SVEXPORTFORMAT>$$SysName:XML</SVEXPORTFORMAT>
<ACCOUNTTYPE>All Inventory Masters</ACCOUNTTYPE>
</STATICVARIABLES>
</REQUESTDESC>
</EXPORTDATA>
</BODY>
</ENVELOPE>


The Request is also I get in XML? 
Please guide me on how to achieve this functionality.
Thanks in Advance.

Hello,

There are hard voded text on my visualforce page.
like
<apex:outputText value="Validity" />
I want to put "Validity" in a property file and use the property file.
I want to put all text in visualforce page, that can be modified.

How can i do it in salesfforce

 
My test code is only covering 36% of my Apex trigger and I'm stuck on how to get it up...Can someone please point me in the right direction?

TRIGGER:
trigger TempFieldsToCampaignAndEvent on Contact (after insert) {

        List<CampaignMember> membersToAdd = new List<CampaignMember>();
        List<Event> NewEvents = new List<Event>();
    
            for (Contact c: Trigger.new) {
                     if(c.TempCampaign__c != null) {
                        CampaignMember cm = new CampaignMember(CampaignId=c.TempCampaign__c, ContactId=c.Id, Status=c.TempCampaignStatus__c);
                        membersToAdd.add(cm);
                    }
                    system.debug(c.TempEventDescription__c);
                    if(c.TempEventDescription__c != null){
                        Event e         = new Event();
                        e.StartDateTime       = c.TempEventTime__c;
                        e.ActivityDateTime    = c.TempEventTime__c;
                        e.Subject           = c.TempEventSubject__c;
                        e.WhatId              = c.TempCampaign__c;
                        e.Description       = c.TempEventDescription__c;
                        e.WhoId             = c.Id;
                        e.OwnerId           = '0051a000000hmuN';
                        e.DurationInMinutes           = 0;
                        NewEvents.add(e);
                        }           
                    }
    database.insert (membersToAdd, false);
    insert NewEvents;    
    }

TEST CLASS
@IsTest
public class AAAllTest {

    public testMethod static void contactInsertion() {

        // Consider setting some address fields as required by copyAddressFields
        Contact c = new Contact(lastname='testing', firstname='apex');
        insert c;

        //Make some assertions based on the results of the copyAddressFields call
    }

    public testMethod static void contactInsertionFails() {

        // Set some fields that will cause an Exception in copyAddressFields
        Contact c = new Contact(lastname='testing', firstname='apex');
        insert c;

        //Make some assertions that errors were added to the Contact
    }

    public testMethod static void bulkifedInsertion() {

        Contact[] contactsToCreate = new Contact[]{};

        for(Integer x=0; x<200;x++){
            Contact ct = new Contact(lastname='testing',firstname='apex');
            contactsToCreate.add(ct);
        }
         Test.startTest();
            insert contactsToCreate;
            Test.stopTest();
    }

    public testMethod static void CampaignInsertion() {

        // Consider setting some address fields as required by copyAddressFields
        Campaign m = new Campaign(Name='Test Campaign');
        insert m;

        //Make some assertions based on the results of the copyAddressFields call
    }
 public testMethod static void EventInsertion() {

        // Consider setting some address fields as required by copyAddressFields
        date ctd = Date.today(); // will set the todays date
        Event e = new Event(Subject='Test', StartDateTime=ctd, EndDateTime=ctd, WhoId='0031700000AU6P9', DurationInMinutes=0);
        insert e;
        }

     public testMethod static void CampaignMembers() {

            // Consider setting some address fields as required by copyAddressFields
            date ctd = Date.today(); // will set the todays date
            CampaignMember cm = new CampaignMember(CampaignId='70117000001ARcU', ContactId='0031700000AU6P4', Status='Responded');
            database.insert (cm, false);



        //Make some assertions based on the results of the copyAddressFields call
    }


       
    
}
Hi,

I have never done an integration before. Building my first interface to a business application running on-premise with a MS SQL Server database. This app contains data that I need to bring into my salesforce app.

I am looking to build an interface/integration such that data is retrieved on a schedule from the MS SQL db and have it updated onto my Salesforce app.

Can someone point me to a go-to place where I can figure this out?

Thanks,
BillBay
Hello guys

I have code that automatically generates leads from my email. Now what I need is something that can inform the sender that their query is being processed. Now I have created a tigger to send the response but it doesnt seem to work. Is there something I am missing?
 
trigger EmailToLeadResponseTrigger on Lead (after insert) {
	final String template = 'SalesLeadCreatedWebInquiries';
    Id templateId;
    
    try {
    templateId = [SELECT id FROM EmailTemplate WHERE Name = :template].id;
    } catch (QueryException e) {
    //...handle exception if no template is retrieved, or create condition to set email body in code
    }
    List<Messaging.SingleEmailMessage> messages = new List<Messaging.SingleEmailMessage>();
    //Send a single mail to contact each created lead
    for (Lead l : [SELECT Name, Lead.Email FROM Lead WHERE Id in :Trigger.new]) {
        Messaging.SingleEmailMessage message = new Messaging.SingleEmailMessage();
        
        message.setTemplateId(templateId);
        message.setTargetObjectId(l.Id);
        message.setWhatId(l.Id);
        message.setToAddresses(new String[] {l.Email});
        messages.add(message);
    }
    
}

 
Hi all, hoping someone can help.

I won't bore you with the ins and out of the code, but basically, I have a query string I am dynamically populating from an SObject and seeing if it is true.

The code snippet is below:
 
private static Boolean shouldShowInInbox(String queryString, SObject sObjectToCheck, Set<String> fieldsToCheck){
        for(String fieldToCheck : fieldsToCheck){
            String fieldValueOnObject = String.valueOf(sObjectToCheck.get(fieldToCheck));
            queryString = queryString.replaceAll(fieldToCheck, String.isBlank(String.valueOf(fieldValueOnObject)) ? '' : String.valueOf(fieldValueOnObject));
        }
        System.debug(queryString);
        System.debug(Boolean.valueOf(queryString));
        return Boolean.valueOf(Boolean.valueOf(queryString));
    }



It is returning me these two debugs and I have no idea why!

qforcesupport@quintessentially.com == qforcesupport@quintessentially.com
false





So it is stating that the two values are not the same....

Please someone help!
 
Hi everyone,

I need to export a report data with one scheduled job and apex code. When I've the csv data I need to send a HTTP Request. 

The problem is the report data size is 30Mb aprox...

How do you do it? What is it the better way?

Thanks!