• Lalit Karamchandani 27
  • NEWBIE
  • 35 Points
  • Member since 2015
  • Developer


  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 2
    Likes Given
  • 0
    Questions
  • 12
    Replies
what is the with sharing and without sharing in apex ?can any one provide small example with brief description???
Hi,
  we have requirement that we need to add a link  in send email body . Users  send responses upon click this link. when user click this link,system display visualforcepage   and let users to enter data and save them. eventually those data store in salesforce objec.
   my question how can we display visualforce when users click  a link in email body? Please  help me this.

Thanks,
Sree.
 
I am new to process and flow and am having trouble getting it to work.  When I setup a debug lof with Workflow set to Finer, I thought I should be able to see what is happening with the process and flow but I get nothing related to process or flow int he debug log.

Can someone point me in the right direction?
I see examples of manipulating picklist with visualforce tags everywhere.  That is not what is necessary. Does anyone know how to define a pure HTML picklist on a visualforce page with no <apex:/> tags? The task is to use "remoting" which is a new concept to me.  I know how to call functions in a controller like this:
//Salutation Picklist
    public void CollectSalutation ()
    {
        Schema.DescribeFieldResult salutationFieldDescription = Contact.Salutation.getDescribe();
        SalutationOptions = new list<SelectOption>();
        
        for (Schema.Picklistentry picklistEntry : salutationFieldDescription.getPicklistValues())
        {
            SalutationOptions.add(new SelectOption(pickListEntry.getValue(),pickListEntry.getLabel()));
        }
    }
acct.PickListNames__c = document.getElementById('picklistNames').value;

Do I need to wrap these methods in something or create them solely in HTML for Javascript to access.  Any advice from the experts out there would be appreciated.
 
Hi everyone, 

Point and click Admin here. Hoping someone can help me with a visual force template. 

We've got a custom object called Case MS which is a child of Case.

I am trying to create a template that can be sent from the Case that lists all associated Case MS records. Fields needed:
Master_Shipment__c (This field is an External Lookup)
MS_Invoice_Link__c

I tried following the example provided on this link, but got lost. 
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_email_templates_creating.htm

Any help is greatly appreciated! Thank you!!
Hello All,

I am looking for a way where we can create a service account and generate a token from salesforce.com. This token can be readily used for accessing salesforce objects from java application. 

Similar approach like google - https://developers.google.com/identity/protocols/OAuth2ServiceAccount#overview.

Please help.
what is the with sharing and without sharing in apex ?can any one provide small example with brief description???
Hi
I am understading the basics of metadata of fetching account info.
below is the code 
public class selectAllSOQLExampleController
{
    String SobjectApiName = 'Account';
   
    List<Account> accList=new List<Account>();
   
    public String query{get;set;}

    public List<Account> getAccList() 
    {
       Map<String,Schema.SObjectType> schemaMap=Schema.getGlobalDescribe();
          
       Map<String, Schema.SObjectField> fieldMap = schemaMap.get(SobjectApiName).getDescribe().fields.getMap();
     
       String commaSeparatedFields = '';
     
       for(String fieldName : fieldMap.keyset())
       {
            if(commaSeparatedFields == null || commaSeparatedFields == '')
            {
                commaSeparatedFields = fieldName;
            }
            else
            {
                commaSeparatedFields = commaSeparatedFields + ', ' + fieldName;
            }
       }
 
       query = 'select ' + commaSeparatedFields + ' from ' + SobjectApiName + ' Limit 10 ';
   
       accList = Database.query(query);
     
       return accList;
 
    }
}

<apex:page controller="selectAllSOQLExampleController">
  
   <apex:form>
        <apex:pageBlock>
                       
            <apex:pageBlockSection title="Account table" 
                                                     columns="1" 
                                                     collapsible="false">
                                   
                <apex:pageBlockTable value="{!accList}" 
                                                      var="acc">

                    <apex:column value="{!acc.name}"/>
                    <apex:column value="{!acc.phone}"/>
                    <apex:column value="{!acc.rating}"/>
                    <apex:column value="{!acc.industry}"/>
                    <apex:column value="{!acc.accountnumber}"/>
                    
                </apex:pageBlockTable>
 
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>
My requirement is I want to display custom fields also.
Pls help me in tweeking my code.


pooja
Hi,

I have one situation in my code where i need a list or Map of records as well as sum of a fields from them. What is the best way to achieve this? i can think 2 ways
1) Use 1 SOQL query to get the Map of records and 1 aggregate query to get the sum of field OR
2) Use 1 SOQL query only to get the record, the loop through them and get the some of field using some variable

In approach first, i think i will have to use 1 extra query and in 2nd approrach, if number of records are more, i could take longer time. 
I am confused which approach i should use. Any suggestions would be great. 

Thanks,
Hi - I have a need for a formula with multiple OR conditions in a Workflow rule

For example,
IF (Preferred_Language__c does NOT equal English, or Spanish, or French, or Mandarin 
THEN
(update field called Let_Template to English)

Thank you.
 
Hi guys,
i am gettting an error showing that attachment pdf doesnot exit any solution for this. 

PageReference pdf = Page.attachmentPDF;
pdf.getParameters().put('id',(String)account.id); pdf.setRedirect(true);
// Take the PDF content Blob b = pdf.getContent();
// Create the email attachment
Messaging.EmailFileAttachment efa = new Messaging.EmailFileAttachment();
efa.setFileName('attachment.pdf');
efa.setBody(b);

Thanks
Reddy
Hi,I want to send message to facebook by salesforce so what is the first step to do this?
Thank you 
I am new to process and flow and am having trouble getting it to work.  When I setup a debug lof with Workflow set to Finer, I thought I should be able to see what is happening with the process and flow but I get nothing related to process or flow int he debug log.

Can someone point me in the right direction?
Hi everyone, 

Point and click Admin here. Hoping someone can help me with a visual force template. 

We've got a custom object called Case MS which is a child of Case.

I am trying to create a template that can be sent from the Case that lists all associated Case MS records. Fields needed:
Master_Shipment__c (This field is an External Lookup)
MS_Invoice_Link__c

I tried following the example provided on this link, but got lost. 
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_email_templates_creating.htm

Any help is greatly appreciated! Thank you!!