• Flight Plan
  • NEWBIE
  • 60 Points
  • Member since 2011

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 16
    Questions
  • 13
    Replies

Hello,

 

I have managed to display images on Site.com sites keeping the source of the images as Salesforce.com. I am passing the URL of the image stored in  Salesforce.com to the text field or rich text area and can very well fetch the same with the help of repeater element in Site.com.  But, when I try to fetch the image from a formula field on my SFDC object, the image do not show up and I only see the URL. Please refer this URL for more clarity:

 

https://sitepreview.ap1.force.com/?previewAuth=13rFMpCAjZgek51aapihocyN1p2v85cevGjwDZt2RR6ey2UksudNKpt4zf7iqk_8gSxjW_w%3D%3DA

 

I must be missing something, please suggest what it is. :)

 

Any pointers are much appreciated.

 

Thanks,

Ketan

 

Certificate is not showing when it is imported from "Import From Keystore" ?
Does process builder workflow action Apex support API call out ?
I want to move my current implemetation to use process builder so that will get result at runtime (no queuing).
Use case :
I have apex trigger which communicate with external system (using Future method).
Does Process Builder commit record when it met the criteria ?
Actually I am planing to call the external system and get the result real time. If I used future method its taking its own good time.

Any help on this would be appricaited.
Thanks
-FP
 
As per Summer release 15, if someone calling this method will be treated as call out, Does it means that it has timeout of 2 minutes ?
What if customer using getContentAsPDF() method to generate the PDF , Did they get any impact (If they are generating large PDF's)?

Hello,

 

I have a scenario to display data in tree structure for that am using approach of map on visudalforce page.

The map structure look like

Map<A,Map<B,List<C>>> mymap = new Map<A,Map<B,List<C>>>();

 

Where A,B,C are wrapper classes in which I have implemented the equal and hashcode method.

 

Am able to generate the map data properly in Apex controlller and when iterating it on VF page it giving the mentioned error.

 

On VF page code look like

<apex:repeat value="{!mymap}" var="m">

     {!m.name}

   <apex:repeat value="{!mymap[m]}" var="p">

                 {!p.name}

     <apex:repeat value="{!mymap[m][p]}" var="q">

                  {!q.Name}

     </apex:repeat>

    </apex:repeat>

    </apex:repeat>

 

Please let me know if I did any thing wrong which causing this error.

Thanks in advance.

 

 

Hi All,

 

Actually am using Ajax toolkit to make a webservice call in Saleforce from Home page component.

Can any body tell me how to get the sessionid in HTML area ?

 

Thanks in Advance !!!!

Hi ,

 

I am receving this error when I am executing the test class and It was showing at

response = http.send(request);

Anyone tell me the exact cause of the issue or I am missing something.

 

I am using MultiStaticResourceCalloutMock in my test classes to test the callouts.

 

Thanks

-FP

Hi All,

An unusual use case , I am using Salesforce knowledge article for case management i.e.. Case solving.
where support user able to search related articles using Salesforce Standard layout for a specific case.
Actually I want to track the activity/operation that support user performs on Article Management tab.
Operation like
1. "Go" button click
2. Attach existing article to case
3. Save new article
4. Save new article as draft
5. Publish new article
6. Edit existing article

Whenever the above listed  operations are triggered I want to call/initiate a third party services using either Javascript or Apex callout to execute some business rules.

As I know its a standard Salesforce layout and didn't find any way to capture such events.

Also we know that we can add custom button / visualforce page to the standard Salesforce layout.

 

So I need your help / Any work around / suggestion on this use case would be highly appriciated.

Thanks in advance.

Hi All,

I have a JSON response in this format ,


{"response":[{
        "field1" : "Developer",
        "field2":{"type":"Entery Level"},
        "field3":{"dynamicdata":{"Objectfield":{"Objectfield":"abc"}}}
        },
        {
        "field1" : "Developer",
        "field2":{"certification":"501 certified"},
        "field3":{"language":"Apex"}}
        },
        {
        "field1" : "Developer",
        "field2":{"hasBlog":"true"},
        "field3":{"Grade":{"A":{"marks":10}}}
        },
        {
        "field1" : "Developer",
        "field2":{"isContributor":"true"},
        "field3":{"Rank":{"A":{"marks":10}}}
        }
        ]
}


Using JSONParser parser = JSON.createParser(response.getBody());  to parse it.
I am able to get the proper values for field1. However, for fields "field2" & "field3" getting values like "{" as it is refering object.But parser class doesnt contain any method to get the Object.
As this fields hold JSON with no specified format.And I want to map this fields value to class field as a String like ApexClass.field3 = '{"Grade":{"A":{"marks":10}}}'.

In this scenario, I cannt use deserializeuntype as it only deals with primitive data types and I have a Apex class to map this JSON response.

The code looks like

JSONParser parser = JSON.createParser(response.getBody());
while (parser.nextToken() != null) {
                if (parser.getCurrentToken() == JSONToken.START_ARRAY) {
                    while (parser.nextToken() != null ) {
                        if(parser.getCurrentToken() == JSONToken.START_OBJECT) {
                            while (parser.nextToken() != null){
                              if(parser.getCurrentToken() == JSONToken.FIELD_NAME){
                                 String fieldName = parser.getText();
                                  parser.nextToken();
                                 String fieldvalue = parser.getText();
                                 System.debug('fieldName : '+fieldName + '    fieldValue  :'+fieldvalue);
                                 // After comparision assigning value to apex class fields and adding to a list.
                                
                               }
                            }
                        }
                      }
                   }
               }
 }

 
 If I am missing anything so please correct me .Also please suggest if there would be any better approach to handle this scenario.
 
 Thanks
 FP -

Hi All,


I am using JSON.deserialize(JSONResponse, Sample.class) method for parsing

Below is the sample

public class Sample{

    public String a {get;set;}
    public String b {get;set;}
    public String c {get;set;}
    public String d {get;set;}
    public Sample1 test {get;set;}
    
    
    
    
    public Sample1{ // in response, for this class dont know about the fields. in each and every response the fields are changing.
    }
    
    
}


How to handle such response using JSON.deserialize  and store it in Apex class variable?

Response :- 1
{
     "a": "Sometext",
      "b": "Sometext",
       "c": "Sometext",
        "d": "Sometext",
      "test": {
        "Data1": {
          "score": 2
        },
        "Data2": {
          "score1": 1
        },
        "Data3": {
          "score1": 2
        }
      }
 
 }
 
 Response :- 2
 {
     "a": "Sometext",
      "b": "Sometext",
       "c": "Sometext",
        "d": "Sometext",
      "test": {
        "Data50": {
          "score12": 2
        }       
      }
}

Any pointer's on this would be highly appricate.
Thanks in Advance.

 

 

Hi,

 

I am integrating external system with Salesforce.As external application exposed REST API.

So what would be the best practice to store the end points of this external systems in salesforce.

 

The approach I knows is

1 . Create a Interface and put all end point as interface variable i.e static final

2. Store all end point in custom setting

 

Anyone has a good idea on the above scenario or other approach please share with me.

 

Thanks in adavance

Happy Holiday

Hi All,

 

I have a use case in which user with different locale can access the VF page.

On this VF page I have some number calculation using JavaScript this number field are directly bind with SF object fields.

So whenever user with different locale access this page the bind number field display format is changed and result in improper calculation.

 

For example, a number that we would write in the US as "1,250,500.75" would be written differently in different countries: "1.250.500,75" in Germany, "1 250 500,75" in France, and "1'250'500.75" in Switzerland, and "125,0500.75" in Japan.

 

Any thoughts or workaround would be appreciated

 

Thanks in advance.

 

 

 

 

Hi All,

 

In site.com , I have added the social plugin buttons for facebook,twitter and Google+.

This buttons display properly in FF,Chrome but in IE7, IE8  is not showing.

 

In some work arounds people  suggeted that use xmlns:fb='http://www.facebook.com/2008/fbml'

in html tag.

 

Has anybody try this / How to add this in site.com template ?

 

Any help on this would works

 

Thanks

FP

 

 

 

Hi All,

 

 

How we can display the image/document (PDF/XLS) that we have uploaded in salesforce Attachment / Document object in site.com (it should be available publically)?

 

 

 

Any pointers on this would help.

 

Hi All,

 

Actually I am generating the WORD document from VF page by setting contentType="application/msword".

As I am able to generate the word document.

 

Now I want to add header n footer  in the generate word document .

How to do that  using VF page?

Any help would be appreciated.

 

Thanks in advance.

 

Is there any other technique except email and webservice based approaches to integrate any application with Salesforce?

As I know for integration purpose webservices are used.

 

Please share your views on this.

 

Thanks !!!!!!!!!!!

 

 

Background :

                           I am using command line data loader for import, upsert  and archiving the data in sandbox and production ORG.

                           The process-conf.xml is properly defined (for sandbox and Prod env )and created the .bat files for all the above mentioned operations.

                             

                           When I ran all this functionality in sandbox and production ORG from Window XP environment its working fine.However when I tried it using Window 7 environment  on production it  gives me following error ....

 

java.lang.RuntimeException: com.salesforce.dataloader.exception.ParameterLoadExc

eption: Error loading parameter: sfdc.password of type: java.lang.String

        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.jav

a:136)

        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.jav

a:74)

        at com.salesforce.dataloader.process.ProcessRunner.main(ProcessRunner.ja

va:226)

Caused by: com.salesforce.dataloader.exception.ParameterLoadException: Error loa

ding parameter: sfdc.password of type: java.lang.String

        at com.salesforce.dataloader.config.Config.decryptProperty(Config.java:6

75)

        at com.salesforce.dataloader.config.Config.postLoad(Config.java:620)

        at com.salesforce.dataloader.config.Config.loadParameterOverrides(Config

.java:646)

        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.jav

a:94)

        ... 2 more

Caused by: javax.crypto.BadPaddingException: Given final block not properly padd

ed

        at com.sun.crypto.provider.SunJCE_h.b(DashoA12275)

        at com.sun.crypto.provider.SunJCE_h.b(DashoA12275)

        at com.sun.crypto.provider.DESCipher.engineDoFinal(DashoA12275)

        at javax.crypto.Cipher.doFinal(DashoA12275)

        at com.salesforce.dataloader.security.EncryptionUtil.decryptString(Encry

ptionUtil.java:197)

        at com.salesforce.dataloader.config.Config.decryptProperty(Config.java:6

68)

        ... 5 more

 

 

Any help on this would be helpful.

 

-Thanks

 

 

Does process builder workflow action Apex support API call out ?
I want to move my current implemetation to use process builder so that will get result at runtime (no queuing).
Use case :
I have apex trigger which communicate with external system (using Future method).
Does Process Builder commit record when it met the criteria ?
Actually I am planing to call the external system and get the result real time. If I used future method its taking its own good time.

Any help on this would be appricaited.
Thanks
-FP
 

Hi,

 

I have this method:

    public void testListMetadata() {
        try {
            ListMetadataQuery query = new ListMetadataQuery();
            query.setType("Package");
            double asOfVersion = 26.0;
            // Assuming that the SOAP binding has already been established.
            FileProperties[] lmr = sfd.getMetaConnection().listMetadata(
                    new ListMetadataQuery[]{query}, asOfVersion);
            if (lmr != null) {
                for (FileProperties n : lmr) {
                    System.out.println("Component fullName: " + n.getFullName());
                    System.out.println("Component type: " + n.getType());
                }
            }
        } catch (ConnectionException ce) {
            ce.printStackTrace();
        }
    }

 I assume it should return for me list of the installed packages.

Is it correct assumption?

 

But I have an error:

com.sforce.ws.SoapFaultException: UNKNOWN_EXCEPTION: An unexpected error occurred. Please include this ErrorId if you contact support: 1379208547-383 (1089039615)
	at com.sforce.ws.transport.SoapConnection.createException(SoapConnection.java:205)
	at com.sforce.ws.transport.SoapConnection.receive(SoapConnection.java:149)
	at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:98)
	at com.sforce.soap.metadata.MetadataConnection.listMetadata(MetadataConnection.java:160)


I've debugged inside and saw that at transport level I have http error 500 Internal Server Error

 

 How to solve it?

Where to create ticket for SF team to investigate this issue?

 My requirement is to call a REST API  which gives an XML Response. 

I have to parse that XML and display on VF Page. Is there any example how can I go about it. 

Hi All,

 

I have a use case in which user with different locale can access the VF page.

On this VF page I have some number calculation using JavaScript this number field are directly bind with SF object fields.

So whenever user with different locale access this page the bind number field display format is changed and result in improper calculation.

 

For example, a number that we would write in the US as "1,250,500.75" would be written differently in different countries: "1.250.500,75" in Germany, "1 250 500,75" in France, and "1'250'500.75" in Switzerland, and "125,0500.75" in Japan.

 

Any thoughts or workaround would be appreciated

 

Thanks in advance.

 

 

 

 

Hi,

 

I want to dynamically dispay text based on url parameter. I want to fetch the url parameter in custom code element and display text based on url paramater value. The issue is i don't know how to access url paramter in custom code. 

Is this even possible?Can someone help me with this?

How can we integrate Salesforce Content object with Site.com ?

 

 

  • August 25, 2012
  • Like
  • 0

Hello,

 

I have managed to display images on Site.com sites keeping the source of the images as Salesforce.com. I am passing the URL of the image stored in  Salesforce.com to the text field or rich text area and can very well fetch the same with the help of repeater element in Site.com.  But, when I try to fetch the image from a formula field on my SFDC object, the image do not show up and I only see the URL. Please refer this URL for more clarity:

 

https://sitepreview.ap1.force.com/?previewAuth=13rFMpCAjZgek51aapihocyN1p2v85cevGjwDZt2RR6ey2UksudNKpt4zf7iqk_8gSxjW_w%3D%3DA

 

I must be missing something, please suggest what it is. :)

 

Any pointers are much appreciated.

 

Thanks,

Ketan

 

Hi All,

 

 

How we can display the image/document (PDF/XLS) that we have uploaded in salesforce Attachment / Document object in site.com (it should be available publically)?

 

 

 

Any pointers on this would help.

 

this is the trigger i have written and i am getting error for 100 records as dml statements error how to rectify the error plz help me how i can rectify the error

trigger WOW_Fulfill_UpdateITQty on Fulfillement__c (before insert,after update) {


for(Fulfillement__c IFM :Trigger.new){
item__c i8=[select id,type__c from item__c where id=:ifm.item__c];

//trigger executes when the type value equals fifo
if(i8.type__c=='fifo')


{
//retrieving the IT where  warehouse and item eqauls to that of fulfilements
Inventory_Transaction__c[] IT = [select   id,
                                        Item__c,
                                        Qty_In__c,
                                       Dev_Bucket_Qty_Remaining__c,
                                        Qty_Out__c,
                                        warehouse__c
                                             from Inventory_Transaction__c 
                                             where Item__c =:IFM.Item__c AND 
                                             Warehouse__c =:IFM.warehouse__c 
                                             
                                             Order By Date__c asc];
      //AND Dev_Bucket_Qty_Remaining__c != 0
      //if there are no records then error 
        if(it.size()==0)
    {
    
    IFM.addError('Record is not available');
    }
    else
    {
  //taking sum of al the bucket qty in IT                                           
Integer count =[select Count() from Inventory_Transaction__c where Item__c =:IFM.Item__c AND 
                                             Warehouse__c =:IFM.warehouse__c ];

Decimal TOTALQTY = IFM.Qty_Out__c;
Integer i=0;
List<AggregateResult> tq=[select SUM(Dev_Bucket_Qty_Remaining__c)som1 from Inventory_Transaction__c where Item__c =:IFM.Item__c AND 
                                             Warehouse__c =:IFM.warehouse__c ];
Double doubledata =(Double)tq[0].get('som1');
integer trq =integer.valueof(doubledata);
system.debug( 'Integer value ' + trq);

if(TOTALQTY>0)
{

 if(trq>=TOTALQTY)
  {
   if(TOTALQTY>=IT[i].Dev_Bucket_Qty_Remaining__c)
   {
    Decimal j=0;
    j=TOTALQTY-IT[i].Dev_Bucket_Qty_Remaining__c;
    if(IT[i].Qty_Out__c!=null)
    {
     IT[i].Qty_Out__c=IT[i].Qty_Out__c+IT[i].Dev_Bucket_Qty_Remaining__c;
    }
    else
    {
     IT[i].Qty_Out__c=IT[i].Dev_Bucket_Qty_Remaining__c;
    }
    TOTALQTY=j;
    IT[i].Dev_Bucket_Qty_Remaining__c=0;
    upsert IT[i];
    
    //Creating fulfilement history for the updatedIT
    Fulfillement_History__c ih=new Fulfillement_History__c();
    ih.Inventory_Transaction__c=it[i].id;
  
    ih.Fulfillement__c=ifm.id;
    ih.Qty_Out__c=it[i].Qty_Out__c;
    insert ih;
    //incrementing i
    for(i=1;i<count;i++)
    {
     if(TOTALQTY>0)
     {
      if(TOTALQTY>=IT[i].Dev_Bucket_Qty_Remaining__c)
      {
       Decimal k=0;
       k=TOTALQTY-IT[i].Dev_Bucket_Qty_Remaining__c;
       if(IT[i].Qty_Out__c!=null)
        {
         IT[i].Qty_Out__c=IT[i].Qty_Out__c+IT[i].Dev_Bucket_Qty_Remaining__c;
        }
    else
       {
        IT[i].Qty_Out__c=IT[i].Dev_Bucket_Qty_Remaining__c;
       }
       
      TOTALQTY=k;
      
      IT[i].Dev_Bucket_Qty_Remaining__c=0;
      upsert IT[i];
      Fulfillement_History__c ih1=new Fulfillement_History__c();
    ih1.Inventory_Transaction__c=it[i].id;
   
    ih1.Fulfillement__c=ifm.id;
    ih1.Qty_Out__c=it[i].Qty_Out__c;
    insert ih1;
     }
    else
    {
      Decimal l=0;
      l=IT[i].Dev_Bucket_Qty_Remaining__c-TOTALQTY;
      if(IT[i].Qty_Out__c!=null)
        {
         IT[i].Qty_Out__c=IT[i].Qty_Out__c+TOTALQTY;
        }
    else
       {
        IT[i].Qty_Out__c=TOTALQTY;
       }
     IT[i].Dev_Bucket_Qty_Remaining__c=l;
     TOTALQTY=0;
     upsert IT[i];
     Fulfillement_History__c ih2=new Fulfillement_History__c();
    ih2.Inventory_Transaction__c=it[i].id;
    
    ih2.Fulfillement__c=ifm.id;
    ih2.Qty_Out__c=it[i].Qty_Out__c;
    insert ih2;
    }
   }
  }
 }
  else if(IT[i].Dev_Bucket_Qty_Remaining__c>=TOTALQTY)
  {
   Decimal m=0;
   m=IT[i].Dev_Bucket_Qty_Remaining__c-TOTALQTY;
   if(IT[i].Qty_Out__c!=null)
        {
         IT[i].Qty_Out__c=IT[i].Qty_Out__c+TOTALQTY;
        }
    else
       {
        IT[i].Qty_Out__c=TOTALQTY;
       }
     IT[i].Dev_Bucket_Qty_Remaining__c=m;
     TOTALQTY=0;
     upsert IT[i];
     Fulfillement_History__c ih3=new Fulfillement_History__c();
    ih3.Inventory_Transaction__c=it[i].id;
    
    ih3.Fulfillement__c=ifm.id;
    ih3.Qty_Out__c=it[i].Qty_Out__c;
    insert ih3;
     
    }
   }
   //error message when the quantity is more than given
   else
   {
    IFM.Invoice_Line_Item__c.addError('Quantity is more than the required Remaining Quantity for Invoice line Item ');
   }
  }
   else
   {
    IFM.addError('Quantity is more than the required Remaining Quantity');
   }
  }
  }
  
  
  //trigger executes when the type value equals serial number
  
  
 
  
}
}

 

 

Background :

                           I am using command line data loader for import, upsert  and archiving the data in sandbox and production ORG.

                           The process-conf.xml is properly defined (for sandbox and Prod env )and created the .bat files for all the above mentioned operations.

                             

                           When I ran all this functionality in sandbox and production ORG from Window XP environment its working fine.However when I tried it using Window 7 environment  on production it  gives me following error ....

 

java.lang.RuntimeException: com.salesforce.dataloader.exception.ParameterLoadExc

eption: Error loading parameter: sfdc.password of type: java.lang.String

        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.jav

a:136)

        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.jav

a:74)

        at com.salesforce.dataloader.process.ProcessRunner.main(ProcessRunner.ja

va:226)

Caused by: com.salesforce.dataloader.exception.ParameterLoadException: Error loa

ding parameter: sfdc.password of type: java.lang.String

        at com.salesforce.dataloader.config.Config.decryptProperty(Config.java:6

75)

        at com.salesforce.dataloader.config.Config.postLoad(Config.java:620)

        at com.salesforce.dataloader.config.Config.loadParameterOverrides(Config

.java:646)

        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.jav

a:94)

        ... 2 more

Caused by: javax.crypto.BadPaddingException: Given final block not properly padd

ed

        at com.sun.crypto.provider.SunJCE_h.b(DashoA12275)

        at com.sun.crypto.provider.SunJCE_h.b(DashoA12275)

        at com.sun.crypto.provider.DESCipher.engineDoFinal(DashoA12275)

        at javax.crypto.Cipher.doFinal(DashoA12275)

        at com.salesforce.dataloader.security.EncryptionUtil.decryptString(Encry

ptionUtil.java:197)

        at com.salesforce.dataloader.config.Config.decryptProperty(Config.java:6

68)

        ... 5 more

 

 

Any help on this would be helpful.

 

-Thanks