• Aurora Ganguly 10
  • NEWBIE
  • 40 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 48
    Questions
  • 38
    Replies
Hi , 
I need a clarity on how to save this data . the scenario is . I have one custom object Campaign and another one Campaign member both are custom and have a lookup relationship . when I open the a campaign record in the below related list i have campaign member section and there is a new button. onclickof that new button am fetching all contact details . and I am able to select one and multiple contact at a time.I jave provided a Add button , just to save the selected contact with that particular Campign , in the related list . But am unable to structure it . 
am sharing the code .in this related list i want to add

User-added image
please tellme how to add this .
vf page : - 
<apex:page controller="wrapperClassController" sidebar="false" showHeader="false">
 <script type="text/javascript">
        function selectAllCheckboxes(obj,receivedInputID){
            var inputCheckBox = document.getElementsByTagName("input");
            for(var i=0; i<inputCheckBox.length; i++){
                if(inputCheckBox[i].id.indexOf(receivedInputID)!=-1){
                    inputCheckBox[i].checked = obj.checked;
                }
            }
        }
    </script>
    <apex:form >
        <apex:pageBlock >
            <apex:pageBlockButtons >
                <apex:commandButton value="Process Selected" action="{!processSelected}"/>
            </apex:pageBlockButtons>
            <!-- In our table we are displaying the cContact records -->
            <apex:pageBlockTable value="{!contacts}" var="c" id="table">
                <!--<apex:column >-->
                    <!-- This is our selected Boolean property in our wrapper class -->
                  <!--  <apex:inputCheckbox value="{!c.selected}"/>-->
               <!-- </apex:column>-->
                <apex:column >
                        <apex:facet name="header">
                            <apex:inputCheckbox onclick="selectAllCheckboxes(this,'inputId')"/>
                        </apex:facet>
                        <apex:inputCheckbox value="{!c.selected}" id="inputId"/>
                    </apex:column>
                <!-- This is how we access the contact values within our cContact container/wrapper -->
                <apex:column value="{!c.con.Name}" />
                <apex:column value="{!c.con.Email}" />
                <apex:column value="{!c.con.Phone}" />
            </apex:pageBlockTable>
        </apex:pageBlock>
    </apex:form>
</apex:page>




Controller :- 


public class wrapperClassController {

    //Our collection of the class/wrapper objects cContact 
    public List<cContact> contactList {get; set;}

    //This method uses a simple SOQL query to return a List of Contacts
    public List<cContact> getContacts() {
        if(contactList == null) {
            contactList = new List<cContact>();
            for(Contact c: [select Id, Name, Email, Phone from Contact limit 10]) {
                // As each contact is processed we create a new cContact object and add it to the contactList
                contactList.add(new cContact(c));
            }
        }
        return contactList;
    }


    public PageReference processSelected() {

                //We create a new list of Contacts that we be populated only with Contacts if they are selected
        List<Contact> selectedContacts = new List<Contact>();

        //We will cycle through our list of cContacts and will check to see if the selected property is set to true, if it is we add the Contact to the selectedContacts list
        for(cContact cCon: getContacts()) {
            if(cCon.selected == true) {
                selectedContacts.add(cCon.con);
            }
          // insert selectedContacts;
        }

        // Now we have our list of selected contacts and can perform any type of logic we want, sending emails, updating a field on the Contact, etc
        System.debug('These are the selected Contacts...');
        for(Contact con: selectedContacts) {
            system.debug(con);
        }
        contactList=null; // we need this line if we performed a write operation  because getContacts gets a fresh list now
        return null;
    }


    // This is our wrapper/container class. A container class is a class, a data structure, or an abstract data type whose instances are collections of other objects. In this example a wrapper class contains both the standard salesforce object Contact and a Boolean value
    public class cContact {
        public Contact con {get; set;}
        public Boolean selected {get; set;}

        //This is the contructor method. When we create a new cContact object we pass a Contact that is set to the con property. We also set the selected value to false
        public cContact(Contact c) {
            con = c;
            selected = false;
        }
    }
}

 
Hi All ,
I am generating a pdf and onclick of button I am saving that in notes and attachemnt in quote object .When am opening the Email quote I want my attachment should auto populate their instead of manual uploading. 
How to achieve this functionality . 

Please revert .
Thanks .
Hi All,
How do I change mass lead owner from lightning . The functionality is there in lightning , but unable to aceess from lightning . If I need to change I need to do individually . 
Is there any alternative solution for this functionality .


plz revert .
Thanks 
Hi All, 
Actualy I was using lightning , and there in the Home Page i am using Items To Approve the standard component , the thin gis that when some approval is coming its showing in the home page Itms to Approve section , as soon as I click on that I am getting a error message in  a popup . 
Actualy i have different users so when going for approvals its showing that message for evrry users . and sometimes not for every users . 
am sharing the screesnhost . 
plz add your valuable feedback on this
.User-added image

Thanks !
Looking for your revert.
Hi
I have an general issue regarding the Dashboard , for opportunity  i am creating an funnel dashboard but the thing its showing in different format.
am sharing the image , User-added image

instead of 109M , I want the full amount in Rs.
Hi , 
I have a query on the currency field , in standard Account object there is Annual Revenue field .If i want to set the amount as 12,50,000 after saving its coming in different way like 1,250,000. How to modify this amount ? the comma is not coming properly . But from the company prfoile its already set as INR .

Plz reply .
Thanks .
Looking for your valuable revert.
Hi All, 
here is issue as stated ..

Use Case -
As a account Manager, If I create a task/Event for a particular Account and assigned to me, it automatically shows on my Homepage as an upcoming tasks. The ask is that even Sales Ops(who is Inside Sales for this Account and mapped against this Account Manager), should also be able to see this Task under "My Tasks components" on the Home Page which I created.
Eg. Adam is Account Manager and created a task for Account "XYZ", it's shows under under Adam Task section on Home Page. Now,  Bhanu is Sales Ops mapped to account Manager Adam, even if Adam did not assign this task to Bhanu, Bhanu should also be able to view this Task under his ''My Tasks List'' on his Home Page.


plz reply on this 
Thanks !
Hi All, 
Suppose i am an account manager ,  if i want to assign a task to myself it is visible in my task in home page of lightning ,how can i make sure it will be visble to the users who are working under me in their home , say, XYZ has an upcoming task like this . 

i want my subordinate also to know what task are there for mine. 


Plz reply 
Thanks 
Hi 
plz help me in solving this code 
trigger Testordersopp on Order (after insert,after update) {
        // Get all related opportunities from orders
    Set<Id> opportunityIds = new Set<Id>();
   List<Order> orderList = new List<Order>();
    for(Order o : Trigger.new)
    {
        if(o.QuoteId != NULL)
        {
            opportunityIds.add(o.QuoteId);
            orderList.add(o);
        }
    }

    // Query for all opportunities with their related opportunity line items
    //Map<Id,Quote> oppsWithLineItems = new Map<Id,quote>([SELECT Id, (SELECT Description,Id,ListPrice,Name,QuoteId,Product2Id,ProductCode,Quantity,TotalPrice,UnitPrice FROM QuoteLineItems) WHERE Id IN :opportunityIds]);
    Map<Id, Quote> oppsWithLineItems = new Map<Id, Quote>([SELECT Id, (SELECT Description,Id,ListPrice,Name,QuoteId,Product2Id,ProductCode,Quantity,TotalPrice,UnitPrice FROM QuoteLineItems) WHERE Id IN :opportunityIds]);

    if(opportunityIds.size() > 0)
    {
        // Loop through orders
        List<OrderItem> orderItemsForInsert = new List<OrderItem>();
        for(Order o : ordersList)
        {
            // For each order get the related opportunity and line items, loop through the line items and add a new order line item to the order line item list for each matching opportunity line item
            Quote oppWithLineItem = oppsWithLineItems.get(o.QuoteId);
            for(QuoteLineItem oli : oppWithLineItem.QuoteLineItems)
            {
                orderItemsForInsert.add(new OrderItem(AvailableQuantity=Quantity,OrderId=o.Id));
            }
        }
        // If we have order line items, insert data
        if(orderItemsForInsert.size() > 0)
        {
            insert orderItemsForInsert;
        }
    }


}

lokking for your reply
Thanks​
Hi ,
am using enterprise edition for standard process, where from opportunity am creating quotes. (in quote i have one custom pocklist SERVICE TYPE)which am selecting while generating the quote , so once quote is generated i need to add quote line item .so based on the service type selection i want to populate those products related to that service which i have given while creating quote . In product i have same  custom field service category , so my quote service type should map with prouduct service type and should populate those products when i click add products from quote line items.

Plz reply if its possible to solve
Looking for your reply
Thanks
 
Hi All

in enterprise edition in classic view when i open a quote , in the related list i can see Order, but same when i open in lightning, at that time order in related list is not coming
Hi All,
Can anyone help me out in writing this test class for this apex class.
public with sharing class DeleteWithCheckboxController {
 
 @AuraEnabled
 public static list < contact > fetchContact() {
  list < contact > returnConList = new List < contact > ();
 
  List < contact > lstCon = [SELECT Name, firstName, LastName, Department, MobilePhone From contact LIMIT 50];
  // play for loop on lstCon and add each contact to returnConList List.
  for (contact c: lstCon) {
   returnConList.add(c);
  }
 // return the List of contacts
  return returnConList;
 }
 
 
 @AuraEnabled
 public static List < String > deleteRecords(List < String > lstRecordId) {
  // for store Error Messages  
  List < String > oErrorMsg = new List < String > ();
  // Query Records for delete where id in lstRecordId [which is pass from client side controller] 
  List < contact > lstDeleteRec = [select Id from contact where id IN: lstRecordId];
  
  // delte contact list with Database.DeleteResult[] database class.
  // It deletes some queried contacts using <samp class="codeph apex_code">Database.<span class="statement">delete</span></samp> 
  // with a false second parameter to allow partial processing of records on failure.
  // Next, it iterates through the results to determine whether the operation was successful or not
  // for each record. and check if delete contact successful so print msg on debug, 
  // else add error message to oErrorMsg List and return the list  
  Database.DeleteResult[] DR_Dels = Database.delete(lstDeleteRec, false);
  // Iterate through each returned result
  for (Database.DeleteResult dr: DR_Dels) {
   if (dr.isSuccess()) {
      system.debug('successful delete contact');
     // Operation was successful
   } else {
    // Operation failed, so get all errors   
    oErrorMsg.add('');
    for (Database.Error err: dr.getErrors()) {
     // add Error message to oErrorMsg list and return the list
     oErrorMsg.add(err.getStatusCode() + ': ' + err.getMessage());
    }
   }
  }
  return oErrorMsg;
 
 }
}
Looking for your help.
Aurora.
 
Hi , I have created a vf page , am sharing the preview of my page . I want to reduce the width between all the fields so that many more fields can be added .how to reduce the space between two fields .To make it come close . 

please advice on the same .User-added image
<apex:page Controller="AddmultipleAccountsController">
<apex:form >
<apex:pageBlock >
<apex:pageBlockTable value="{!listAccount}" var="acc">

<apex:column headerValue="Account Name">
<apex:inputField value="{!acc.Name}"/>
</apex:column>

<apex:column headerValue="Account Number">
<apex:inputField value="{!acc.AccountNumber}"/>
</apex:column>

<apex:column headerValue="Account Type">
<apex:inputField value="{!acc.Type}"/>
</apex:column>

<apex:column headerValue="Industry">
<apex:inputField value="{!acc.Industry}"/>
</apex:column>

</apex:pageBlockTable>
<apex:pageBlockButtons >

<apex:commandButton value="Add Accounts Row" action="{!addAccount}"/>
<apex:commandButton value="Save Accounts" action="{!saveAccount}"/>
</apex:pageBlockButtons>

</apex:pageBlock>
</apex:form>
</apex:page>

 
Hi All,
i have created a dynamic pdf component,  am sharing the code . :
<apex:component > <apex:attribute required="true" type="string" name="type" description="specify header and footer type" /> <apex:stylesheet value="{!$Resource.dynaPdf}"/> <div class="{!type}" style="background-color:none;box-shadow: 80mm 10mm #888888;margin-bottom:100px"> <apex:componentBody /> </div> </apex:component>

and its generating the pdf, i want to take the print out of this pdf from  Epson TM T81 model,  link : https://www.epson.com.au/businesssystems/products/receiptprinters/DisplaySpecs.asp?id=tmt81

but am not getting where to make the changes , now the pdf is in A4 format , how and where to change . as per this thermal printer .

Plz reply . 
Thanks .
Looking for your valuable reply .
Hi All,
I have generated a vf page and in that done rendered as pdf and want to print that from my samsung tab via EPSON TM M81 , below is the link of printer, 

https://www.google.co.in/search?q=EPSON+TM+M81+PRINTER&source=lnms&tbm=isch&sa=X&ved=0ahUKEwi6i_uP-uLWAhUSS48KHdcBDjgQ_AUICigB&biw=1242&bih=579. 

Bu the scenario is , its not coming properly . so by this type of POS printer is it possible or what is the right way , 

Hope getting my point . 

Plz reply soon .
Thanks All
hi All,

How to  call Web services from sfdc.  Can any one tell how to call some Web services from another system which offers Web services? 

and how to  create the Web services class. 

Plz provide some solution.,

​Regards Aurora
hello all,
Can anyone help me in fixing this test class. I tried and written some portion , but its not showing any thing , although it is not solved , so am sharing my controller, for which i want the test class. 
plz share if any one could solve. 

Regard Aurora,


Below is the controller .
public with sharing class ctrl_outsidemenu {

   Public String Dishname { get; set;}
   Public Double Price { get; set;}
   Public Integer qty { get; set;}
   Public String remarks { get; set;}
   Public id  oid { get; set;}
    
    public ctrl_outsidemenu(ApexPages.StandardController controller) {
    			Menu__c m = new Menu__c();
    }
    
    String s = 'Food';
    public String getString() {
        return s;
    }
            
    public void setString(String s) {
        this.s = s;
    }
    
    public PageReference csave(){
    
       try{
       oid = ApexPages.currentPage().getParameters().get('id');
       Menu__c m = new Menu__c();
       m.Dish_Name__c =Dishname;
       m.Price__c =Price;
       m.Category__c = s;
       m.SubCategory__c ='Extra';
       m.Status__c ='Not available';
       insert m;
       
       
       OLI__c oli = new OLI__c();
       oli.Menu__c = m.id;
       oli.Order__c = oid;
       oli.Qty__c = qty;
       oli.Remarks__c = remarks;
       insert oli;
       }
       catch(Exception e){
         ApexPages.Message myMsg = new ApexPages.Message(ApexPages.Severity.FATAL,e.getmessage());
         ApexPages.addMessage(myMsg);
       }
      PageReference retURL = new PageReference('/'+oid);
      retURL.setRedirect(true);
      return retURL;
    }
    public PageReference ccancel(){
    
      oid = ApexPages.currentPage().getParameters().get('id');
      PageReference retURL = new PageReference('/'+oid);
      retURL.setRedirect(true);
      return retURL;
    }
}

 
Hi All, 
Need some advice on this query , plz provide .

How to make API calls from SalesForce to another system.Say SAP or Any other application?
Is there any Apex coding to call the APIs? Where to get the exact idea for this or for any further help.?


​Thanks
Hi All,
Actualy i want to know , i have a sandbox inside that under Develop am not getting the site . it is not there .but in my production org it is there .
What can be the issue of that ? How can i get  that site in sandbox inorder to create a site from sandbox . 
I raised a case also but didnt got any specific reply from them .  I need that site in my sandbox ,can any one tell how to enable that or how can i get that site in my sandbox .
Plz reply soon .
Hi
I have an general issue regarding the Dashboard , for opportunity  i am creating an funnel dashboard but the thing its showing in different format.
am sharing the image , User-added image

instead of 109M , I want the full amount in Rs.
Hi , 
I have a query on the currency field , in standard Account object there is Annual Revenue field .If i want to set the amount as 12,50,000 after saving its coming in different way like 1,250,000. How to modify this amount ? the comma is not coming properly . But from the company prfoile its already set as INR .

Plz reply .
Thanks .
Looking for your valuable revert.
Hi All,
Can anyone help me out in writing this test class for this apex class.
public with sharing class DeleteWithCheckboxController {
 
 @AuraEnabled
 public static list < contact > fetchContact() {
  list < contact > returnConList = new List < contact > ();
 
  List < contact > lstCon = [SELECT Name, firstName, LastName, Department, MobilePhone From contact LIMIT 50];
  // play for loop on lstCon and add each contact to returnConList List.
  for (contact c: lstCon) {
   returnConList.add(c);
  }
 // return the List of contacts
  return returnConList;
 }
 
 
 @AuraEnabled
 public static List < String > deleteRecords(List < String > lstRecordId) {
  // for store Error Messages  
  List < String > oErrorMsg = new List < String > ();
  // Query Records for delete where id in lstRecordId [which is pass from client side controller] 
  List < contact > lstDeleteRec = [select Id from contact where id IN: lstRecordId];
  
  // delte contact list with Database.DeleteResult[] database class.
  // It deletes some queried contacts using <samp class="codeph apex_code">Database.<span class="statement">delete</span></samp> 
  // with a false second parameter to allow partial processing of records on failure.
  // Next, it iterates through the results to determine whether the operation was successful or not
  // for each record. and check if delete contact successful so print msg on debug, 
  // else add error message to oErrorMsg List and return the list  
  Database.DeleteResult[] DR_Dels = Database.delete(lstDeleteRec, false);
  // Iterate through each returned result
  for (Database.DeleteResult dr: DR_Dels) {
   if (dr.isSuccess()) {
      system.debug('successful delete contact');
     // Operation was successful
   } else {
    // Operation failed, so get all errors   
    oErrorMsg.add('');
    for (Database.Error err: dr.getErrors()) {
     // add Error message to oErrorMsg list and return the list
     oErrorMsg.add(err.getStatusCode() + ': ' + err.getMessage());
    }
   }
  }
  return oErrorMsg;
 
 }
}
Looking for your help.
Aurora.
 
Hi , I have created a vf page , am sharing the preview of my page . I want to reduce the width between all the fields so that many more fields can be added .how to reduce the space between two fields .To make it come close . 

please advice on the same .User-added image
<apex:page Controller="AddmultipleAccountsController">
<apex:form >
<apex:pageBlock >
<apex:pageBlockTable value="{!listAccount}" var="acc">

<apex:column headerValue="Account Name">
<apex:inputField value="{!acc.Name}"/>
</apex:column>

<apex:column headerValue="Account Number">
<apex:inputField value="{!acc.AccountNumber}"/>
</apex:column>

<apex:column headerValue="Account Type">
<apex:inputField value="{!acc.Type}"/>
</apex:column>

<apex:column headerValue="Industry">
<apex:inputField value="{!acc.Industry}"/>
</apex:column>

</apex:pageBlockTable>
<apex:pageBlockButtons >

<apex:commandButton value="Add Accounts Row" action="{!addAccount}"/>
<apex:commandButton value="Save Accounts" action="{!saveAccount}"/>
</apex:pageBlockButtons>

</apex:pageBlock>
</apex:form>
</apex:page>

 
Hi All,
Actualy i want to know , i have a sandbox inside that under Develop am not getting the site . it is not there .but in my production org it is there .
What can be the issue of that ? How can i get  that site in sandbox inorder to create a site from sandbox . 
I raised a case also but didnt got any specific reply from them .  I need that site in my sandbox ,can any one tell how to enable that or how can i get that site in my sandbox .
Plz reply soon .
Hi All,
In the standard contact object I used the birthday field .So when i am creating a birthday for any person so I want that . say for any of the person the birthday is on 2nd july , so for that person how can i get to know in that particular day that this person has birthday . As i mean to say i want the notification aler that , this person has birthday today . 
How can i automate this .
Plz revert .
Regards Aurora
hi All,
I have created a vf page , same time with two question and 3 radio button , when i click on the first questions its showing the blue color but for the seconf question when i am clicking again the first question radio button is getting active , 
am sharing the image , u can see .
just unable to find the solnUser-added image
plz share ur reply
hi All,
I have made a oppurtunity page as vf page , but it is not responsive in simulator, all the fields are not aligned, 

just see the effect.
i have bootstrap also,User-added image

plz reply ,
Hi All,
am using Simple Shopping Cart Plugin With jQuery And Bootstrap - mycart, am sharing two links where i have dout , ,
the code is in this link : 1> http://www.jqueryscript.net/other/Simple-Shopping-Cart-Plugin-With-jQuery-Bootstrap-mycart.html
 the output is in this link : 2>http://www.jqueryscript.net/demo/Simple-Shopping-Cart-Plugin-With-jQuery-Bootstrap-mycart/#
My question is there are two button one is close and other is Checkout , onclick of checkout the cart is reseting to zero, i just want to know to do that for close button also, i mean to say onclick of close button, the cart should get refreshed ,how to do that changes
let me know yours reply ,
Thanks
Hi All, 
as you can see i used this code : '<input type="radio" name="type" value="exp"> <label>Bill to Room</label>'+
                                '<select>'+
                                '<option> --- </option>'+
                                '<option> Room 1 </option>'+
                                '<option> Room 2 </option>'+
                                '<option> Room 3 </option>'+
                                '<option> Room 4 </option>'+
                                '<option> Room 5 </option>'+
                                '<option> Room 6 </option>'+
                                
                                  '</select>'+
                                '<input type="radio" name="type" value="fresher"> PAY NOW'+
                                '<br/>'+
                                '<br/>'+
since i have two radio button , and fro this i used the script , this code: $(document).ready(function(){
                  
     $('select').hide();

     $('input').on('change', function(){
      $('select').show();
     })
});
but the thing is , i want when i will click on the first radio button it will populate the dropdown options and onclick of the second radio button it should hide, but its not happening, whenever i click on anyone of the radio button it is showing the dropdown menu , how to restrict that , can anyone share your views based on my coding parts
thanks