• Arjunmca
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 34
    Questions
  • 30
    Replies
Hi,

I have to create data model with 5 levels of objects. All are master details relationships. 
Account --> Regions -->Country --> Unit --> Line Of Business.

An Account ( Pfizer) can have many regions - Europe, Asia, NA
A Region( Ex: Europe) can have many countries - UK, France, Germany.
A Country( UK )  have many units - Pfizer UK1, Pfizer UK2, Pfizer3.
An Unit ( Pfizer UK1) have many Line Of Business - Health , Carrier, Wealth.

As you all know that from child to parent we cant query more than 3 levels. Also i would like to do native reports. 
What is the best data model design to this problem

Thanks.

 
Hi,

I have implemented a lightning component,which has 4 images and it was placed in community page. 
When user click on, one of the image in lightning component, it should redirect to another community page.
How can i implement this?

Thanks.
Hi,

I have to change my visualforce code based on the app. If there a way to write if function without using any apex command?
Is there a better way to write the logic?

The below line gives app name.
   var myappname = document.getElementById("tsidLabel").innerText;

<apex:page>
<script>
    function getAppName(){
        var myappname = document.getElementById("tsidLabel").innerText;
    }
  </script>

  if(myappname =='Student")
    <apex:commandbutton id="test" value="Test"/>
 elseif(myappname =="Employee")
    <apex:Label id="lbl" value="Label">
else
    <apex:inputfield id="input" value="Input">


</apex:page>
 
I have created a custom object 'CaseTask__c'  and it has master detail relation ship with Case object.
When the case status is 'In-Progress', i need to lock the related list custom object record.

As you all know there are 3 ways to lock a record, 

1) Trigger
2) workflow rules
3) Validation rules

Please go through below link.

https://developer.salesforce.com/forums/ForumsMain?id=906F000000092MdIAI


I have created a record type and associated to a read only page layout. 
And also i have written a workflow rule field update to change the record type of a custom object, when the case status is 'In-Progress'.
Finally activated the workflow rule.

But record type is not changing to read only page layout, after case status changes to In-Progress.  why?





Our client using Person accounts. As you all know case object have lookup relation ship with Account and Contact.
While creating a case, if i select an account and then select a contact, i need to verify that the selected contact is associated with Account object or not.
If not associated i need to display a message. 

Can i write a trigger on case object to get the contacts associated with account  in to a map  and then verify the selected contact is in the map?
Does that work or is there special logic for person accounts?

Any suggestion or link appreciated. 
Thanks.


Hi,

I am writing a relationship query to getch multiple values in a single query.

'select contact.Account.ID,SUM(Contact.NoOfPagesPrinted__C) from contact where Contact.DatePrinted__c = LAST_N_DAYS:30 and Contact.Account.AccountType__c=:acType group by Contact.Account.ID'

The above query is working. But i want sum of pages  printed  for last 90 and 120 pages as well.
So i modified the query as below

'select contact.Account.ID,SUM(Select Contact.NoOfPagesPrinted__C from contact where Contact.DatePrinted__c = LAST_N_DAYS:30), sum( Select Contact.NoOfPagesPrinted__C from contact where Contact.DatePrinted__c = LAST_N_DAYS:90), sum( Select Contact.NoOfPagesPrinted__C from contact where Contact.DatePrinted__c = LAST_N_DAYS:120) from contact where Contact.Account.AccountType__c=:acType group by Contact.Account.ID'.

but its giving error. Can any body correct this query please.

Thanks.


Hi,

I need to wriate a SOQL query to get the aggregate value of Contacts object custom objects.
I have created two custom fields ( NoOfPagesPrinted__c, DatePrinted__c) in contact object.
I need to get sum of pages printed of each account. I have written below query. Please correct this query.

Select Account.ID, Account.Name, SUM(Select Contact.NoOfPagesPrinted__c from contact where Contact.DatePrinted__c = LAST_N_DAYS:30) from Account where Account.AccountType__c ='LES' group by Account.Name

-Thanks.




Hi,

 

Can any one explain the problems if we try to implement new salesforce development in an existing Salesforce Org which is having 1 Million records with Accounts, Contacts, Opportunities ,different records types, workflow rules, validation rules and triggers.

 

Suppose if we use same org for another business can we add Accounts, Contacts, Opportunities with different record types.

Can i use API calls? What problems we will face if implement two companies CRM data in one salesforce org?

 

 

 

 

 

 

 

Hi,

 

I have to display a page message based on few conditions, but i have to use onlly one apex:pagemessage tag.

 

<Apex:PageMessage rendered="{!IsSignOnSuccess ||  !!IsSignOnSuccess &&!!IsValidUser }"  summary="Not a ValidUser" />

 

 

!IsSignOnSuccess true then summary =' SignonSucess'

!!IsSignOnSuccess && !!IsValidUser true then summary="Not a valid User"

 

I need to display both summary messages using only one apex:pagemessage tag. How to do that.

 

Hi,

 

I have two output panels, by default first panel should display. when i click on command button in panel1, panel2 should display. If i click on command button in panel2 , then the panel1 should display. Onclick event is not working.

 

VF Page

-------------

<apex:page controller="ActionSupport_OnClick">
<apex:form >
<apex:outputPanel id="selectText">
      <apex:pageBlock rendered="{!show}" id="selectPub1">
        <apex:outputlabel id="label" value="1st Panel"/>
            <apex:commandbutton id="change" value="change">
                     <apex:actionSupport event="onclick" action="{!InvokeShow}" rerender="selectText,selectValues"/>
           </apex:commandbutton>
      </apex:pageBlock>
</apex:outputPanel>

<apex:outputPanel id="selectValues">
     <apex:pageBlock rendered="{!hide}" id="selectPub2">
           <apex:outputtext id="text" value="2nd Panel"/>
           <apex:commandbutton id="modify" value="modify">
                     <apex:actionSupport event="onclick" action="{!Invokehide}" rerender="selectText,selectValues"/>
           </apex:commandbutton>
    </apex:pageBlock>
</apex:outputPanel>
</apex:form>
</apex:page>

 

 

Controller

---------------

 

public with sharing class ActionSupport_OnClick {

       public boolean show{get;set;}
       public boolean hide{get;set;}

public ActionSupport_OnClick(){
       show=true;
       hide=false;
}

public void InvokeShow()
{
      show=false;
      hide=true;
      system.debug('Inside InvokeShow:');
}

public void Invokehide()
{
      show=true;
      hide=false;
}

 

 

}

 

 

 

Thanks.

 

 

Hi,

 

Can any body correct the test class.

 

Actual Class

----------------------

 

global public with sharing class OrgExpireQueryBatchable implements Database.Batchable<sObject>, Database.Stateful, Database.AllowsCallouts {


 public OrgExpireQueryBatchable(){
  
 }
 
 global Database.QueryLocator  start(Database.BatchableContext ctx) {
 
   return Database.getQuerylocator('Select Trial_Expiration_Date__c, Name, Master_Password__c, Master_Login__c, Login__c From Test_Org__c where Name like \'IO%\'');  
  
 }
  
 global void execute(Database.BatchableContext ctx, List<sObject> batchRecord) {
    Test_Org__c record =  (Test_Org__c)batchRecord[0];
    System.debug('Master Login' + record.Master_Login__c);
    Id OrgId =  record.Id;
    String loginName;
    String loginPassword;
    loginName = record.Master_Login__c;
    loginPassword = record.Master_Password__c;
    try{ 
        partnerSoapSforceCom.Soap stub = new partnerSoapSforceCom.Soap();
        partnerSoapSforceCom.LoginResult loginResult; 
        
        If(!Test.isRunningTest())
        {
           loginResult = stub.login(loginName,loginPassword);
        }
        stub.SessionHeader =  new partnerSoapSforceCom.SessionHeader_element();
        stub.endpoint_x = loginResult.serverURL;
        stub.SessionHeader.sessionId = loginResult.sessionId;
        string queryStringExpDate ='SELECT Id,TrialExpirationDate   FROM Organization';
        DateTime currentTime = DateTime.now() ;
        DateTime temp =  currentTime.addMinutes(-10);
        String tempStr =  temp.format('yyyy-MM-dd\'T\'kk:mm:ssZ');
        string queryStringLastLogin ='SELECT LoginTime from LoginHistory Where LoginTime < ' +  tempStr + ' order by LoginTime Desc Limit 1';
        partnerSoapSforceCom.QueryResult  qResultExpDate = stub.query(queryStringExpDate );
        partnerSoapSforceCom.QueryResult  qResultLastLogin = stub.query(queryStringLastLogin );
        System.debug('@@@@ query Results: ' + qResultExpDate );
        System.debug('@@@@ query Results.sOject_x: ' + qResultExpDate .records );
        
        DateTime ExpDate=qResultExpDate.records[0].TrialExpirationDate;
        DateTime LastLoginDate = qResultLastLogin.records[0].LoginTime;
        
        // Converting Datetime to Date
        Date dateTemp_ExpDate = Date.newInstance(ExpDate.year(),ExpDate.month(),ExpDate.day());
        Date dateTemp_LastLoginDate  = Date.newInstance(LastLoginDate.year(),LastLoginDate.month(),LastLoginDate.day());
        record.Trial_Expiration_Date__c = dateTemp_ExpDate;
        record.Last_Login_Date__C = dateTemp_LastLoginDate;
        
        update record;
    }catch(CalloutException ex)
    {
        
    }
 
 }
 
 global void finish(Database.BatchableContext ctx) {
    
 }
}

 

 

 

 

Test Class

-----------------

 

@IsTest
public class TestOrgExpireQueryBatchable
{
 
  @IsTest static void TestExecute()
  {
     string loginName='admin@xyz.com';
     string loginPassword= 'test1';
 
    
     Test_Org__c obj=new Test_Org__c();
     obj.Name= 'DEV96';
     obj.Master_Login__c = 'admin@xyz.com';
     obj.Master_Password__c ='test1';
     insert obj;
     
 
     List<SObject> batchobjs = new List<SObject>();
     batchobjs.add(obj);
     
     OrgExpireQueryBatchable objbatch= new OrgExpireQueryBatchable();
     objbatch.start(null);
     objbatch.execute(null, batchobjs );
     partnerSoapSforceCom.Soap stub = new partnerSoapSforceCom.Soap();
     partnerSoapSforceCom.LoginResult loginResult = new partnerSoapSforceCom.LoginResult();
     stub.SessionHeader.sessionId = loginResult.sessionId;
     stub.SessionHeader =  new partnerSoapSforceCom.SessionHeader_element();
     stub.endpoint_x = loginResult.serverURL;
     stub.SessionHeader.sessionId = loginResult.sessionId;
     string queryStringExpDate ='SELECT Id,TrialExpirationDate FROM Organization';
     
     Test_Org__c swbobj=new Test_Org__c();
     Date curdate = Date.today();
     swbobj.Trial_Expiration_Date__c = curdate;
     swbobj.Last_Login_Date__C = curdate.addDays(2);
     insert swbobj;
     
     swbobj.Last_Login_Date__C = curdate.addDays(3);
     update swbobj;
     
    
     System.assertEquals(curdate,swbobj.Trial_Expiration_Date__c);
     System.assertEquals(curdate.addDays(3),swbobj.Last_Login_Date__C);
     
   }

}

 

 

My test class is not covering below lines

 

 stub.SessionHeader.sessionId = loginResult.sessionId;
     stub.SessionHeader =  new partnerSoapSforceCom.SessionHeader_element();
     stub.endpoint_x = loginResult.serverURL;

 

 

Please correct this test case.

Hi,

 

I have a scenraio, can any body please suggest the solution.

 

I want to display administrator profile users in a picklist, that picklist should be placed on page layout.

While creating a new record i need to choose a user from picklist, that value should be saved in the record.

 

 

I am  planning to put picklist on visualforce page, and visualforce page would be added on the page layout.

If i do that how can i get the select value from picklist while saving the record?

 

I believe trigger doesnot work. How can i do that?  Can any body suggest me,

 

 

 

 

How can i create custom buttons in page, also i want to invoke controller methods on button click event.

 

Can any one show some light on this

 

 

Thanks.

 

 

HI,

 

I am trying to get two values from the user input .  I am getting error as 

 

<apex:inputField> can only be used with SObjects, or objects that are Visualforce field component resolvable.

 

 

 

Controller

---------------

 

public class  AdditionController
{
  
  public integer A;
  public integer B;
  
  public AdditionController addctl{get;set;}
  
  public integer getA()
  {
     return this.A;
  }
  
  public void setA(integer val)
  {
      this.A=val;
  }
  
  public integer getB()
  {
     return this.B;
  }
  
  public void setB(integer val)
  {
      this.B=val;
  }
   
 
}

 

 

VF Page

---------------

<apex:page controller="AdditionController">
    <apex:form >
        <apex:inputField id="A" value="{!addctl.A}"/>
        <apex:inputField id="B" value="{!addctl.B}"/>
   </apex:form>

</apex:page>

 

 

Thanks.

Hi,

 

I need to display  text  'No Records' or  put a button on visualforce page.

 

VF Page:

--------------

<apex:page controller="TestController">

 

<table border="0" width="100%" height="20">
  <tr>

     if({!count}<0)

         <h3> No Records</h3>

     else

     {

       <td>
         <input id="callintent_button" type="button" align="left" value = "More >>" onclick="enablerestoreCallIntent();"/>
        </td>

     }

  </tr>
</table>

</apex:page>

 

Controller:

---------------

 

public class TestController

{

   public integer count;

 

   public integer getCount()

   {

      return count;

   }

 

   public void setCount(integer value)

   {

        this.count=value;

   }

 

}

 

 

Should i use any apex command to check the condition. How can i do that. 

 

Thanks.

Hi,

 

I am getting error as ' outputField can only be used with SObject fields'

 

 

at   ' lnitems.Recurring_Price__r.Recurring_Price__c'

 

 

 

 

Controller

--------------

 

 

public

withsharingclass TestController

{

 

 

  

   

public List<Product_Options__c> getSPCartLineItems()

    {

               

        List<

Shopping_Cart_Line_Item__c> splnitem = [select product__C, quantity__c fromShopping_Cart_Line_Item__c];

        Map<Id, Id> lineItemProductMap =

new Map<Id, Id>();

       

//Map<Id, Id> lineItemProductMap = new Map<Id, Id>();

       

for (Shopping_Cart_Line_Item__c item : splnitem)

        {

        lineItemProductMap.put(item.Id, item.product__c);

        }

       

        List<

Product_Options__c> productOptionsList = [SELECT  Name, productd__r.Name, (select Promotional_Price__c, Recurring_Price__c, Frequency_of_Charge__c from Recurring_Price__r) FROMProduct_Options__cWHERE ProductD__C IN :lineItemProductMap.values()];

        System.debug(

'Test: productOptionsList=' + productOptionsList);

       

if (!productOptionsList.isEmpty())

        {

        System.debug(

'Test: Option Name=' + productOptionsList[0].Productd__r.Name);

        System.debug(

'Test: recurring price=' + productOptionsList[0].Recurring_Price__r[0].Recurring_Price__c);

        }

       

return productOptionsList;

    

    }

 

VisualForce

--------------------

 

                     <apex:pageblock >     

                       <apex:pageblocktable value="{!SPCartLineItems}"  var="lnitems">     

                                <apex:column headerValue="Products">                                       

                                    <apex:outputfield value="{!lnitems.Productd__r.Name}"/>                                 

                                       </apex:column>                                                                              

                                                <apex:column headerValue="Price">                                                   

                                                      <apex:outputfield value="{!lnitems.Recurring_Price__r.Recurring_Price__c}"/>                                           </apex:column>       

 

                          </apex:pageblocktable>                         

                     </apex:pageblock> 

 

   

   

      

}

 

 

Can any body please fix this issue.

 

Thanks.

Hi,

 

I have to get data from three objects which have relationships. Objects, fields and their relationships are as follows.

 

1) Proudct ( standard Object)

     Field:  ProductCode,Offer_category__r

 

 

2) Product_Options__C ( Custom Object )

     Field: Name, Product_Option_code

     RelationShip: Lookup(Product)

 

3) RecurringPrice__C ( Custom Object )

     Field: Current_Price__c

     Relationship: Master-Detail ( Product_Options__c)

 

for better understanding i am writing the relationship

Product -->(LookUp) Product_Options__C -->(Master-Detail) RecurringPrice__c

 

I want to get the value of Current_Price__C.

 

 

 

//For understanding i am writing SQL  query

 

Select Current_Price__C where

   Product.productcode  = ProductOption__c.Product_Option_code and

   ProductOption__c.Product_Option_code = RecurringPrice__C.Product_Option_code

from RecurringPrice__C.

 

 

 

Can any one help me in writing the SOQL query to get the value of Current_Price__c.

 

Thanks.

 

 

 

 

 

 

 

 

 

 

Hi,

 

I have created a service console application and entire screen has divided into four parts. 

 

I want to pass list of values from one page to another page.  I know if we maintain common controller, then we achieve it.

But inside service console does that work. How to pass values from one oage to anoter page inside service console.

 

Thanks.

Hi,

 

I have three  visual force pages. I need to display those three pages in three sections of the service console screen.

For example top, left and right portions of the screen.

 

I need two things. 

1) How to divide screen in to three  adjustable scroll panels

2) How to display each visual force page in each panel.

 

Thanks.

Hi,

 

I have two methods each are calling and parsing xml response. But i want those two methods call at a time. Lets say i have two methods. 

 

Method1();

Method2();

 

In the above case first Method1() calls and then Method2() calls. But i have a scenario where i need to call both the methods at a time. 

 

Is there any process to call those methods  Parallely?

 

Thanks.

I have created a custom object 'CaseTask__c'  and it has master detail relation ship with Case object.
When the case status is 'In-Progress', i need to lock the related list custom object record.

As you all know there are 3 ways to lock a record, 

1) Trigger
2) workflow rules
3) Validation rules

Please go through below link.

https://developer.salesforce.com/forums/ForumsMain?id=906F000000092MdIAI


I have created a record type and associated to a read only page layout. 
And also i have written a workflow rule field update to change the record type of a custom object, when the case status is 'In-Progress'.
Finally activated the workflow rule.

But record type is not changing to read only page layout, after case status changes to In-Progress.  why?





Hi,

I need to wriate a SOQL query to get the aggregate value of Contacts object custom objects.
I have created two custom fields ( NoOfPagesPrinted__c, DatePrinted__c) in contact object.
I need to get sum of pages printed of each account. I have written below query. Please correct this query.

Select Account.ID, Account.Name, SUM(Select Contact.NoOfPagesPrinted__c from contact where Contact.DatePrinted__c = LAST_N_DAYS:30) from Account where Account.AccountType__c ='LES' group by Account.Name

-Thanks.




Hi,

 

Can any body correct the test class.

 

Actual Class

----------------------

 

global public with sharing class OrgExpireQueryBatchable implements Database.Batchable<sObject>, Database.Stateful, Database.AllowsCallouts {


 public OrgExpireQueryBatchable(){
  
 }
 
 global Database.QueryLocator  start(Database.BatchableContext ctx) {
 
   return Database.getQuerylocator('Select Trial_Expiration_Date__c, Name, Master_Password__c, Master_Login__c, Login__c From Test_Org__c where Name like \'IO%\'');  
  
 }
  
 global void execute(Database.BatchableContext ctx, List<sObject> batchRecord) {
    Test_Org__c record =  (Test_Org__c)batchRecord[0];
    System.debug('Master Login' + record.Master_Login__c);
    Id OrgId =  record.Id;
    String loginName;
    String loginPassword;
    loginName = record.Master_Login__c;
    loginPassword = record.Master_Password__c;
    try{ 
        partnerSoapSforceCom.Soap stub = new partnerSoapSforceCom.Soap();
        partnerSoapSforceCom.LoginResult loginResult; 
        
        If(!Test.isRunningTest())
        {
           loginResult = stub.login(loginName,loginPassword);
        }
        stub.SessionHeader =  new partnerSoapSforceCom.SessionHeader_element();
        stub.endpoint_x = loginResult.serverURL;
        stub.SessionHeader.sessionId = loginResult.sessionId;
        string queryStringExpDate ='SELECT Id,TrialExpirationDate   FROM Organization';
        DateTime currentTime = DateTime.now() ;
        DateTime temp =  currentTime.addMinutes(-10);
        String tempStr =  temp.format('yyyy-MM-dd\'T\'kk:mm:ssZ');
        string queryStringLastLogin ='SELECT LoginTime from LoginHistory Where LoginTime < ' +  tempStr + ' order by LoginTime Desc Limit 1';
        partnerSoapSforceCom.QueryResult  qResultExpDate = stub.query(queryStringExpDate );
        partnerSoapSforceCom.QueryResult  qResultLastLogin = stub.query(queryStringLastLogin );
        System.debug('@@@@ query Results: ' + qResultExpDate );
        System.debug('@@@@ query Results.sOject_x: ' + qResultExpDate .records );
        
        DateTime ExpDate=qResultExpDate.records[0].TrialExpirationDate;
        DateTime LastLoginDate = qResultLastLogin.records[0].LoginTime;
        
        // Converting Datetime to Date
        Date dateTemp_ExpDate = Date.newInstance(ExpDate.year(),ExpDate.month(),ExpDate.day());
        Date dateTemp_LastLoginDate  = Date.newInstance(LastLoginDate.year(),LastLoginDate.month(),LastLoginDate.day());
        record.Trial_Expiration_Date__c = dateTemp_ExpDate;
        record.Last_Login_Date__C = dateTemp_LastLoginDate;
        
        update record;
    }catch(CalloutException ex)
    {
        
    }
 
 }
 
 global void finish(Database.BatchableContext ctx) {
    
 }
}

 

 

 

 

Test Class

-----------------

 

@IsTest
public class TestOrgExpireQueryBatchable
{
 
  @IsTest static void TestExecute()
  {
     string loginName='admin@xyz.com';
     string loginPassword= 'test1';
 
    
     Test_Org__c obj=new Test_Org__c();
     obj.Name= 'DEV96';
     obj.Master_Login__c = 'admin@xyz.com';
     obj.Master_Password__c ='test1';
     insert obj;
     
 
     List<SObject> batchobjs = new List<SObject>();
     batchobjs.add(obj);
     
     OrgExpireQueryBatchable objbatch= new OrgExpireQueryBatchable();
     objbatch.start(null);
     objbatch.execute(null, batchobjs );
     partnerSoapSforceCom.Soap stub = new partnerSoapSforceCom.Soap();
     partnerSoapSforceCom.LoginResult loginResult = new partnerSoapSforceCom.LoginResult();
     stub.SessionHeader.sessionId = loginResult.sessionId;
     stub.SessionHeader =  new partnerSoapSforceCom.SessionHeader_element();
     stub.endpoint_x = loginResult.serverURL;
     stub.SessionHeader.sessionId = loginResult.sessionId;
     string queryStringExpDate ='SELECT Id,TrialExpirationDate FROM Organization';
     
     Test_Org__c swbobj=new Test_Org__c();
     Date curdate = Date.today();
     swbobj.Trial_Expiration_Date__c = curdate;
     swbobj.Last_Login_Date__C = curdate.addDays(2);
     insert swbobj;
     
     swbobj.Last_Login_Date__C = curdate.addDays(3);
     update swbobj;
     
    
     System.assertEquals(curdate,swbobj.Trial_Expiration_Date__c);
     System.assertEquals(curdate.addDays(3),swbobj.Last_Login_Date__C);
     
   }

}

 

 

My test class is not covering below lines

 

 stub.SessionHeader.sessionId = loginResult.sessionId;
     stub.SessionHeader =  new partnerSoapSforceCom.SessionHeader_element();
     stub.endpoint_x = loginResult.serverURL;

 

 

Please correct this test case.

Hi,

 

I have a scenraio, can any body please suggest the solution.

 

I want to display administrator profile users in a picklist, that picklist should be placed on page layout.

While creating a new record i need to choose a user from picklist, that value should be saved in the record.

 

 

I am  planning to put picklist on visualforce page, and visualforce page would be added on the page layout.

If i do that how can i get the select value from picklist while saving the record?

 

I believe trigger doesnot work. How can i do that?  Can any body suggest me,

 

 

 

 

Hi,

 

I need to display  text  'No Records' or  put a button on visualforce page.

 

VF Page:

--------------

<apex:page controller="TestController">

 

<table border="0" width="100%" height="20">
  <tr>

     if({!count}<0)

         <h3> No Records</h3>

     else

     {

       <td>
         <input id="callintent_button" type="button" align="left" value = "More >>" onclick="enablerestoreCallIntent();"/>
        </td>

     }

  </tr>
</table>

</apex:page>

 

Controller:

---------------

 

public class TestController

{

   public integer count;

 

   public integer getCount()

   {

      return count;

   }

 

   public void setCount(integer value)

   {

        this.count=value;

   }

 

}

 

 

Should i use any apex command to check the condition. How can i do that. 

 

Thanks.

Hi,

 

I am getting error as ' outputField can only be used with SObject fields'

 

 

at   ' lnitems.Recurring_Price__r.Recurring_Price__c'

 

 

 

 

Controller

--------------

 

 

public

withsharingclass TestController

{

 

 

  

   

public List<Product_Options__c> getSPCartLineItems()

    {

               

        List<

Shopping_Cart_Line_Item__c> splnitem = [select product__C, quantity__c fromShopping_Cart_Line_Item__c];

        Map<Id, Id> lineItemProductMap =

new Map<Id, Id>();

       

//Map<Id, Id> lineItemProductMap = new Map<Id, Id>();

       

for (Shopping_Cart_Line_Item__c item : splnitem)

        {

        lineItemProductMap.put(item.Id, item.product__c);

        }

       

        List<

Product_Options__c> productOptionsList = [SELECT  Name, productd__r.Name, (select Promotional_Price__c, Recurring_Price__c, Frequency_of_Charge__c from Recurring_Price__r) FROMProduct_Options__cWHERE ProductD__C IN :lineItemProductMap.values()];

        System.debug(

'Test: productOptionsList=' + productOptionsList);

       

if (!productOptionsList.isEmpty())

        {

        System.debug(

'Test: Option Name=' + productOptionsList[0].Productd__r.Name);

        System.debug(

'Test: recurring price=' + productOptionsList[0].Recurring_Price__r[0].Recurring_Price__c);

        }

       

return productOptionsList;

    

    }

 

VisualForce

--------------------

 

                     <apex:pageblock >     

                       <apex:pageblocktable value="{!SPCartLineItems}"  var="lnitems">     

                                <apex:column headerValue="Products">                                       

                                    <apex:outputfield value="{!lnitems.Productd__r.Name}"/>                                 

                                       </apex:column>                                                                              

                                                <apex:column headerValue="Price">                                                   

                                                      <apex:outputfield value="{!lnitems.Recurring_Price__r.Recurring_Price__c}"/>                                           </apex:column>       

 

                          </apex:pageblocktable>                         

                     </apex:pageblock> 

 

   

   

      

}

 

 

Can any body please fix this issue.

 

Thanks.

Hi,

 

I have two methods each are calling and parsing xml response. But i want those two methods call at a time. Lets say i have two methods. 

 

Method1();

Method2();

 

In the above case first Method1() calls and then Method2() calls. But i have a scenario where i need to call both the methods at a time. 

 

Is there any process to call those methods  Parallely?

 

Thanks.

Hi,

 

I need to display list values as tab names. I dont want to hardcode the name of the tab. How can i do that.

 

<apex:tabPanel switchType="client" selectedTab="name2" id="theTabPanel">

          <apex:tab label="Programming" name="Programming" id="tabProgramming">

          </apex:tab>           

          <apex:tab label="HardWare" name="International" id="tabHardware">

          </apex:tab>           

         <apex:tab label="Bundles" name="Equipment" id="tabBundles">

         </apex:tab>

</apex:tabPanel>

 

//controller method

public List<String> getPackages()

{      

    List<string> strlist = new List<string>();      

   strlist.add('Programm');      

   strlist.add('International');      

   strlist.add('Equipment');

   return strlist;

}

 

Each list value to be binded to different tab. How can i do that.

 

Thanks.

 

 

Hi,

 

 

I have a WSDL which was developed in Java, it has many packages and nested classes. 

How can i generate classes from that WSDL in salesforce platform.

 

Thanks.

 

 

HI,

 

There is possibility to have blank values for a column in one of the object.

I am want to write a query to eliminate blank records.

 

I tried with distinct, but it doest work.  I know distinct is for eliminating duplicate records.

select dintinct(comments__c) from CsoObject__c where Product = 'Card';

 

Thanks

Arjun.

Hi,

 

I am getting read only error. How to fix this?

 

 

trigger BankDBSS_Update_Comments on BankDBSS__c (after insert , after update)
{
   Bank_DBSS_Support__c obj= new Bank_DBSS_Support__c();

   for(BankDBSS__c dbssComments: trigger.new)
   {
    
      if(Trigger.isUpdate)
      {

           if(dbssComments.Comments__c !=NULL)
           {
                obj.Analyst_Comments_History__c = dbssComments.Comments__c;
                obj.Analyst_Comments_Date__c = system.now();
           }
           if(dbssComments.Project_Comments__c !=NULL)
           {
                obj.Project_Comments_History__c = dbssComments.Project_Comments__c;
                obj.Project_Comments_Date__c = system.now();
  
           }
           if(dbssComments.Project_War__c !=NULL)
           {
                obj.Project_War_History__c = dbssComments.Project_War__c;
                obj.Project_War_Date__c = system.now();
            }
           insert obj;
       }

  }

 

}

 

Hi,

 

I need to verify 2 conditions based on 1 condition.

 

When IF condition is true then i need to check two more conditions.

 

 

If(InProgress__c == True)

{

     AND(  (ISPICKVALUE('YES') , (ISBLANK(EMP_Num__c) )

}

 

How can i write that formula.  

 

Thanks,

Arjun. 

What I'd like to do is disbable my entire VF page while an ajax request is running.  Not unlike opening a modal dialog box except there'd be no close button (except maybe a cancel).  I'm wondering if there's an example around using jQuery or extjs or something like that.  Here's the idea.

 

There an onchange= on a field.  That runs a javascript.  The javascript does something to disable the page using some standard library and puts up a message box, not unlike a modal dialog box, that says something like "Processing".  The javascript then calls an apex:actionFunction.

 

The oncomplete- on the actionFunction runs another javascript.  That javascript takes down the message box and reenables the page.

 

The big difference between this an a model dialog box is the user doesn't click a button to close the box.  The oncomplete does that.  I've seen examples using jQuery of doing something with a modal window but I want the script to be able to close it.

 

Anyone have an example of anything like that?