• pooja biswas
  • NEWBIE
  • 315 Points
  • Member since 2016

  • Chatter
    Feed
  • 1
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 58
    Questions
  • 65
    Replies
can any one help me in giving brief description of sales cloud, service cloud and marketing cloud ? 

thank you,
Hi
I am aware we can call instance of batch apex trigger.
so batch apex asynchronous , trigger is synchronous.
so it can hit governor limit if batch process huge records.

From governor poitn of view its fine, I understood  but want to know eactly what are the other pitfalls and what will be errors coming?

thanks
pooja
Hello
I am trying to understand how to call a webservic eusing javascript remoting.
I have attached the code but after trying a lot it is not gving the desired result.
any help will be greatly appreciated.
global class remotingexample
{
    public String accountName { get; set; }
    public static Account account { get; set; }
    public remotingexample() { }
   
    @RemoteAction
    webservice static Account getAccount(String accountName)
    {
        account = [select id, name from Account where name=:accountName ];
        return account;
    }
}

<apex:page controller="remotingexample">
    <script type="text/javascript">
    function getAccountJS()
    {
        var accountNameJS = document.getElementById('accName').value;       
        sample.getAccount( accountNameJS,
        function(result, event)
        {
            if (event.status)
            {
                // demonstrates how to get ID for HTML and Visualforce tags
                document.getElementById("{!$Component.theBlock.thePageBlockSection.theFirstItem.accId}").innerHTML = result.Id;
                document.getElementById("{!$Component.theBlock.thePageBlockSection.theSecondItem.accNam}").innerHTML = result.Name;
            }
            else if (event.type === 'exception')
            {
                document.getElementById("errors-js").innerHTML = event.message;
            } else
            {
                document.getElementById("errors-js").innerHTML = event.message;
            }
        }, {escape:true});
    }
    </script>
    Account Name :<input id="accName" type="text" />
    <button onclick="getAccountJS()">Get Account</button>
    <div id="errors-js"> </div>
    <apex:pageBlock id="theBlock">
        <apex:pageBlockSection id="thePageBlockSection" columns="2">
            <apex:pageBlockSectionItem id="theFirstItem">
                <apex:outputText id="accId"/>
            </apex:pageBlockSectionItem>
            <apex:pageBlockSectionItem id="theSecondItem" >
                <apex:outputText id="accNam" />
            </apex:pageBlockSectionItem>
        </apex:pageBlockSection>
    </apex:pageBlock>
</apex:page>

Thanks
Pooja
Hi
I have a strange requirement. 
I am getting data from an external websersive after making HttpCallout and I want to load the data into LeadObject, say Name , phone etc.
Json data contains many records.
The problem is the fields in standard Lead object and json data do not match
Json field name : fullname , myphone while in Lead object it is firstname , lastname etc

case 1: how to map these fields

case 2. If json data is like this: fullname=salesforce#cloud, so in lead object I want to have  firstname=salesforce and lastname=cloud

How to handle this?
any inputs pls elaborate.

thanks
pooja

 
Hello 
I am getting data from an external webservice purely in json format, data is more than 1 lakh records.
My requirement not to store this data into an sobject but just display it in an visualforce page.

I do not need entire code but conceptually how this can be handled in the most efficient manner , I mean without hitting viewstate error.
I know about transient keyword , static to avoid viewstate
somebody told me about javascript remoting but I dont know how to go about it.

a) How to call external webservice in apex controller?

b) can we call the same webservice in visualforce page, if so what is the advantage

c) How to structure the vf page so has to handle pagination and also call remoting?

Please elaborate

Thanks
Pooja B

 
Hi
any one know pls let me know questions asked in interview for technical lead and architect from simple to advanced.

also simple to advanced scenarios using trigger will be helpful

thanks
pooja
 
Hi
I need to have a validation rule fire only when Lead object Email field is edited and not when inserted.
I did something like this on Lead object.

NOT(REGEX( Email  ,'([a-zA-Z0-9_\\-\\.]+)@((\\[a-z]{1,3}\\.[a-z]{1,3}\\.[a-z]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})'))

so this works when a new Lead is inserted or edit  and email not proeprly specified.

Now I did like this
NOT(REGEX( Email  ,'([a-zA-Z0-9_\\-\\.]+)@((\\[a-z]{1,3}\\.[a-z]{1,3}\\.[a-z]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})')) && NOT(ISNEW())

but its not working.
Need help on this.

thanks
pooja


 
Hi
I have a class which will update account field and contact field if some change occurs in opportunity.
I am calling instance of this class inside trigger written on opportunity object.

I am using Database.Update statement to perform DML .
Now if an error occurs while updating the contact field, then I should roll back the entire transaction including account.

Please let me know how to achieve this.

Thanks
Pooja
Hi
I have a lookup field on soime object which in turn updates another object based on some condition.
There is a validation rule which prevents me from doing the same.
I am aware of custom setting type="Hierarchy", but I do not want to do this becase it may affect other users.
is there a way I can perform the same without using custom setting?

Thanks
Pooja
I have a Boolean formula field which is turn to true while records created date more than 3 days.
f this formula field turn to true then a workflow will trigger to change a lookup field (User) value, this workflow rule Evaluation Criteria I set as (created, and any time it's edited to subsequently meet criteria)

But when the formula field turn to true but lookup value still remains the same (it doesnt change)

Is this possible in salesforce?

Pooja

 
Hi
I have a workflow rules define on Contact object which will udpate a custom text feld to some default value
Then on the same object , I have a trigger which will update the custom text field when the record is inserted or edited.

will it result in error?

My answer is NO , but pls validate my point.

Thanks
Pooja
Hi
Please validate my understanding
In Lead object, I have custom text field say Amount, data type=Number.
I have defined a validation rule on Lead object, if Amount < 1000 then ok else throw error
Now I have created a workflow rule on lead, some criteria, then field update on Amount object.

what happens when new Lead record created if amount > 1000, my guess it should throw error.
Please validate

Thanks
Pooja
Hello
I knw what is service cloud like we create case which has account and contact info, then we follow up
But I do not understand what is service console.
How do we enable a service console , how to register a case in service console and what are its featues?
How can I call an object of service console in visualforce page.

Thanks
pooja
Hello
I am new to apex design patterns.
I know only one design pattern that there should be one trigger per object.
Please help in further expanding what other types of real time design patterns available in salesforce?

Thanks
Pooja
Hello
I am looking for a scenario where I need to use @RemoteAction for an visualforce page.
Also please let me know exact differences between the two.

Thanks
Pooja 
 
Hi
I have a batch apex which performs a callout , I have given database.allowcallouts=true and database.stateful
My batch size=200 
I am still getting the error.
In query I have checked for NULLS , indexed where clause filters 
please let me know why I get this error:?

Thanks
Pooja
Hi

Has anyone worked on data migration from sibel crm to salesforce and vice versa?
And data migration from informatica power center to salesforce and vice versa?

I need an overview as how to proceed using HttpRequest & HTTP Response mechanism with endpoint url
what tools do I need to install on local machine?
is data in JSON / XML?
what api is used : rest / soap?

Thanks
Pooja 
Hi
Please help me clear the following concept.

a) Trying to understand what is account share and opportunity share   sobjects.
How they related to account and opportuntity
In what business case scenario do we use them
what is RowCause field? How does it affect Master-detail relationship?

b) How to resolve  " Field is not writeable: " error in apex?
  
Thanks
Pooja 
Hello
Has anyone worked on soap api & rest api testing & java application testing?
what are the commonly used tools?
how to perform technical & function testing?
what the pros and cons involved?

Pls provide explanation.

Thanks
Pooja
Hi
I want to know how to use externalID in data import wizard.
I created a custom field say MyExt in account object which is an externalID field.
I want to use this externalID field to insert new account and contact records in single CSV file
Can any one pls explain how to structure the csv file?

Thanks
pooja
Hi 
I am newbie to lightning components
scenario: The user will enter contact name in an inputtext box and it will show contact firstname and phone, when he clicks on the contact name
               hyperlink then it will show further details of contact object.

I have  created a static resource for bootstrap and I am calling the classes in the component & application
// 1. apex class to handle server side methods
public class ContactController 
{
   @AuraEnabled  
   public static List<Contact> FindAll()
   {
      return [select ID,Name,Phone from Contact LIMIT 20];
   }
   
    //Get contacts based on Contact Name
    @AuraEnabled
    public static List<Contact> FindByName(String searchKey)
   {
      String name='%'+searchKey+'%';
       return [select ID,Name,Phone from Contact where Name LIKE:name LIMIT 100];
   }
    
    //Get contacts based on Contact ID, single record
    @AuraEnabled
    public static Contact FindByID(String conID)
   {
      return [select ID,Name,Account.Name,Phone from Contact where ID=:conID LIMIT 100];
   }
}

// 2 lightning component : contactList_comp
<aura:component controller="ContactController">
    
	<aura:attribute name="contacts1"
                    type="Contact[]"/>  
    
    <aura:handler name="init"
                  value="{!this}"
                  action="{!c.doInit}"/>
    
    <ul class="list-group">
        <aura:iteration items="{!v.contacts1}"
                        var="con">
        <li class="list-group-item">
            <a href="{!'#con/'+con.ID}">
                <p>{!con.Name}</p>
                <p>{!con.Phone}</p>
            </a>
        </li>
   </aura:iteration>
    </ul>
</aura:component>

// 3 . client side controller for the component
({
	doInit : function(cmp,event)
    {
	    var action=cmp.get("c.FindAll");
        action.setCallback(this,function(a)
        {
            cmp.set("v.contacts1",a.getReturnValue());
                        
        });
        $A.enqueueAction(action);
  	},
    
    searchkeychange : function(cmp,event,helper)
    {
	    var search_key=event.getParam("c.searchkey1");
        var action=cmp.get("c.FindByName");
        
        action.setParams({"search_key":searchkey1});
        
        action.setCallback(this,function(a)
        {
           cmp.set("v.contacts1",a.getReturnValue());
        });
        $A.enqueueAction(action);
	}
})

//4 search bar component
<aura:component >
	<input type="text"
           class="form-control"
           onkeyup="{!c.searchkeychange}"
           placeholder="Enter contact Name">
    </input>
</aura:component>

//5 client side controller for search bar component
({
	searchkeychange:function(component,event,helper) 
    {
		var myEvent=$A.get("e.c:searchkeychange"); 
        
        myEvent.setParams({"searchkey1":event.target.value});
       
        myEvent.fire(); 
  	}
})

// 6 event for search bar component
<aura:event type="APPLICATION" 
            description="Event template">

    <aura:attribute name="searchkey1"
                    type="String">
    </aura:attribute>
</aura:event>

//7. Now I create a an application
<aura:application >
    <link href='/resource/bootstrap/' 
          rel="stylesheet">
    </link>
    
    <div class="navbar navbar-default navbar-static-top"
         role="navigation">
    
           <div class="container">
               <div class="navbar-header">
                <a href="#" class="navbar-brand">Lightning Contacts</a>
                   
               </div>
           
           </div>
    </div>
    <div class="container">
        <div class="row">
               <div class="col-sm-12">
                   <c:searchbar_comp />
                   <c:ContactList_comp />
              </div>
                   
        </div>
    </div>    
</aura:application>
when I preview the app, it displays list of contacts but when I enetr any contact name in textbox , it throws an error as follows:

" This page has an error. You might just need to refresh it. Action failed: c$searchbar_comp$controller$searchkeychange [myEvent is undefined] Failing descriptor: {c$searchbar_comp$controller$searchkeychange} "

Please help me out in understad this.

Thanks
pooja 



 
Hi
I have university as parent object & college as child object.
There is a master-detail relationship defined on child object i.e college

I have a parent-child soql as follows
List<University__c> univList=[select Name,(select Name from colleges__r) from university__c];
system.debug(univList);

Also I have a child-parent soql as follows
List<college__c> univList=[select Name,university__r.Name from college__c
system.debug(univList);

when I execute the parent-child query I do not get any child related records .
Also when I execute child-parent query I do get the name of the college but the university ID I get but I want the university name also not the ID

please let me know.

Thanks
pooja
 
Hi
I am updating account field rating='Hot' whenever Opportunity stageName='Closed won'.
I would like to understand 2 things
a) account field rating is not updated when I edit any opportunity record and set the StageName='Closed Won'
b) How to use Map function in order to avoid loop.correct me if I am wrong.
 
public class updateaccountrating
{
  public void updaterating(List<Opportunity> oppor)
  {
    // 1. Get opportunity accountID and store in a list.
    Set<ID> opporAccountID = new Set<ID>();
    
    for(Opportunity o:oppor)
    {
       opporAccountID.add(o.AccountID);
    } 
    
    List<Account> aFinal=new List<Account>();
    
    List<Account> acc=[select ID,rating from account where ID IN :opporAccountID];
    
    for(Opportunity o:oppor)
    {
      for(Account a:acc)
      {
         if (o.StageName == 'Closed Won')
         
             a.rating='Hot';
             aFinal.add(a);
         
      }
     
    }
    
    if (aFinal.size() > 0 && aFinal != NULL)
       Database.Insert(aFinal,false);
    }
}

trigger trg_updateaccountrating on Opportunity (before Insert,before Update)
{
  if (trigger.IsBefore)
  {
    if (trigger.IsUpdate)
    { 
     updateaccountrating a = new updateaccountrating();
     a.updaterating(Trigger.New);
    }
  }

}

Thanks
pooja
Hi
I have a strange requirement. 
I am getting data from an external websersive after making HttpCallout and I want to load the data into LeadObject, say Name , phone etc.
Json data contains many records.
The problem is the fields in standard Lead object and json data do not match
Json field name : fullname , myphone while in Lead object it is firstname , lastname etc

case 1: how to map these fields

case 2. If json data is like this: fullname=salesforce#cloud, so in lead object I want to have  firstname=salesforce and lastname=cloud

How to handle this?
any inputs pls elaborate.

thanks
pooja

 
Hi
I need to have a validation rule fire only when Lead object Email field is edited and not when inserted.
I did something like this on Lead object.

NOT(REGEX( Email  ,'([a-zA-Z0-9_\\-\\.]+)@((\\[a-z]{1,3}\\.[a-z]{1,3}\\.[a-z]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})'))

so this works when a new Lead is inserted or edit  and email not proeprly specified.

Now I did like this
NOT(REGEX( Email  ,'([a-zA-Z0-9_\\-\\.]+)@((\\[a-z]{1,3}\\.[a-z]{1,3}\\.[a-z]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})')) && NOT(ISNEW())

but its not working.
Need help on this.

thanks
pooja


 
I have a Boolean formula field which is turn to true while records created date more than 3 days.
f this formula field turn to true then a workflow will trigger to change a lookup field (User) value, this workflow rule Evaluation Criteria I set as (created, and any time it's edited to subsequently meet criteria)

But when the formula field turn to true but lookup value still remains the same (it doesnt change)

Is this possible in salesforce?

Pooja

 
Hi
I have a workflow rules define on Contact object which will udpate a custom text feld to some default value
Then on the same object , I have a trigger which will update the custom text field when the record is inserted or edited.

will it result in error?

My answer is NO , but pls validate my point.

Thanks
Pooja
Hi
Please validate my understanding
In Lead object, I have custom text field say Amount, data type=Number.
I have defined a validation rule on Lead object, if Amount < 1000 then ok else throw error
Now I have created a workflow rule on lead, some criteria, then field update on Amount object.

what happens when new Lead record created if amount > 1000, my guess it should throw error.
Please validate

Thanks
Pooja
Hello
I am new to apex design patterns.
I know only one design pattern that there should be one trigger per object.
Please help in further expanding what other types of real time design patterns available in salesforce?

Thanks
Pooja
Hello
I am looking for a scenario where I need to use @RemoteAction for an visualforce page.
Also please let me know exact differences between the two.

Thanks
Pooja 
 
Hi
I have a batch apex which performs a callout , I have given database.allowcallouts=true and database.stateful
My batch size=200 
I am still getting the error.
In query I have checked for NULLS , indexed where clause filters 
please let me know why I get this error:?

Thanks
Pooja
Hi
Please help me clear the following concept.

a) Trying to understand what is account share and opportunity share   sobjects.
How they related to account and opportuntity
In what business case scenario do we use them
what is RowCause field? How does it affect Master-detail relationship?

b) How to resolve  " Field is not writeable: " error in apex?
  
Thanks
Pooja 
Hello
Has anyone worked on soap api & rest api testing & java application testing?
what are the commonly used tools?
how to perform technical & function testing?
what the pros and cons involved?

Pls provide explanation.

Thanks
Pooja
Hi
I want to know how to use externalID in data import wizard.
I created a custom field say MyExt in account object which is an externalID field.
I want to use this externalID field to insert new account and contact records in single CSV file
Can any one pls explain how to structure the csv file?

Thanks
pooja
Hi 
I am newbie to lightning components
scenario: The user will enter contact name in an inputtext box and it will show contact firstname and phone, when he clicks on the contact name
               hyperlink then it will show further details of contact object.

I have  created a static resource for bootstrap and I am calling the classes in the component & application
// 1. apex class to handle server side methods
public class ContactController 
{
   @AuraEnabled  
   public static List<Contact> FindAll()
   {
      return [select ID,Name,Phone from Contact LIMIT 20];
   }
   
    //Get contacts based on Contact Name
    @AuraEnabled
    public static List<Contact> FindByName(String searchKey)
   {
      String name='%'+searchKey+'%';
       return [select ID,Name,Phone from Contact where Name LIKE:name LIMIT 100];
   }
    
    //Get contacts based on Contact ID, single record
    @AuraEnabled
    public static Contact FindByID(String conID)
   {
      return [select ID,Name,Account.Name,Phone from Contact where ID=:conID LIMIT 100];
   }
}

// 2 lightning component : contactList_comp
<aura:component controller="ContactController">
    
	<aura:attribute name="contacts1"
                    type="Contact[]"/>  
    
    <aura:handler name="init"
                  value="{!this}"
                  action="{!c.doInit}"/>
    
    <ul class="list-group">
        <aura:iteration items="{!v.contacts1}"
                        var="con">
        <li class="list-group-item">
            <a href="{!'#con/'+con.ID}">
                <p>{!con.Name}</p>
                <p>{!con.Phone}</p>
            </a>
        </li>
   </aura:iteration>
    </ul>
</aura:component>

// 3 . client side controller for the component
({
	doInit : function(cmp,event)
    {
	    var action=cmp.get("c.FindAll");
        action.setCallback(this,function(a)
        {
            cmp.set("v.contacts1",a.getReturnValue());
                        
        });
        $A.enqueueAction(action);
  	},
    
    searchkeychange : function(cmp,event,helper)
    {
	    var search_key=event.getParam("c.searchkey1");
        var action=cmp.get("c.FindByName");
        
        action.setParams({"search_key":searchkey1});
        
        action.setCallback(this,function(a)
        {
           cmp.set("v.contacts1",a.getReturnValue());
        });
        $A.enqueueAction(action);
	}
})

//4 search bar component
<aura:component >
	<input type="text"
           class="form-control"
           onkeyup="{!c.searchkeychange}"
           placeholder="Enter contact Name">
    </input>
</aura:component>

//5 client side controller for search bar component
({
	searchkeychange:function(component,event,helper) 
    {
		var myEvent=$A.get("e.c:searchkeychange"); 
        
        myEvent.setParams({"searchkey1":event.target.value});
       
        myEvent.fire(); 
  	}
})

// 6 event for search bar component
<aura:event type="APPLICATION" 
            description="Event template">

    <aura:attribute name="searchkey1"
                    type="String">
    </aura:attribute>
</aura:event>

//7. Now I create a an application
<aura:application >
    <link href='/resource/bootstrap/' 
          rel="stylesheet">
    </link>
    
    <div class="navbar navbar-default navbar-static-top"
         role="navigation">
    
           <div class="container">
               <div class="navbar-header">
                <a href="#" class="navbar-brand">Lightning Contacts</a>
                   
               </div>
           
           </div>
    </div>
    <div class="container">
        <div class="row">
               <div class="col-sm-12">
                   <c:searchbar_comp />
                   <c:ContactList_comp />
              </div>
                   
        </div>
    </div>    
</aura:application>
when I preview the app, it displays list of contacts but when I enetr any contact name in textbox , it throws an error as follows:

" This page has an error. You might just need to refresh it. Action failed: c$searchbar_comp$controller$searchkeychange [myEvent is undefined] Failing descriptor: {c$searchbar_comp$controller$searchkeychange} "

Please help me out in understad this.

Thanks
pooja 



 
Hello
I am relatively new to css hence struggling to find a solution.
My requirement is to have a dropdown which can hide and show (toggle) similar to quick access menu of salesforce.
I have written a css for dropwdown but I am unable to toggle it.

Request the members to please help me out.
 
<apex:page >
<style>
.dropbtn {
    background-color: #4CAF51;
    color: blue;
    padding: 16px;
    font-size: 10px;
    border: none;
    cursor: pointer;
}

.dropdown {
    position: relative;
    display: inline-block;
}
.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: #f9f9f0;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
}
.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}
.dropdown-content a:hover {background-color: #f1f1f1}
.dropdown:hover .dropdown-content
{
    display: block;
}
.dropdown:hover .dropbtn
{
    background-color: #3e8e41;
}
</style>

<div class="dropdown" style="float:right;">
  <button class="dropbtn">Quick Access Menu</button>
  <div class="dropdown-content">
    <a href="#">Link 1</a>
    <a href="#">Link 2</a>
    <a href="#">Link 3</a>
  </div>
</div>

</apex:page>



Thanks
Pooja B