• venk1255
  • NEWBIE
  • 25 Points
  • Member since 2013

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 17
    Questions
  • 14
    Replies

Hi All,

 

 I need some help. In my custom object i have one formula field it is displaying user name based on value in the pick list value. Based on the picklist value the user value is displaying in one field for that created formula field. 

 

I created one look up field(User) in my object now i want to populate that field value based on the user name retrived in the formula field so now i want to update this look up field value based on the formula field for this in after insert have to do this update but salesforce does not allows to update the current record in the after insert event. So can any one help how to acheive this functionality.

 

Is there any other way to do this. Please help me on this

 

Thanks in advance.

 I have a visual force page,

 

I created a serach button in visual force page,the serach button return some records into pageblock table,i want to display CSV link to download the serch results any one can please suggest me on this 

 

it would be great helpfull.

 

Thanks In Adavace

Hi

 

display total number of Account created on month wise. Should have two column with header Monthwise and Number of accounts are created on that particular month.

 

Like this

 

Account created In              No of accounts created

Jan                            25

feb                            20

 

can any one provide me a sample code how to achive this it would be great thankfull.

 

Thanks In Advance

Hi

 

when i am creating account it should need to create a new contact,and when i am creating a new contact it should need to create a new account,when i m doing this it should going to infinte loop ,can any one please suggest me how to reslove this,can any one provide sample code it would be great helpfull.

Hi All,

 

I am facing the below error when i am using this hyperlink ,any one can please suggest me the solution ,it would be great appericated

 

 

Thanks in Advance

 

 

 

Error: Syntax error. Missing ')'

 

HYPERLINK("https://www.sunpowersupport.com/Stringsizer/flashDataReport?salesOrder="&ORDER_NUMBER__c &"&sessionid=" &$Api.Session_ID&"serverurl="https://c.cs3.visual.force.com/services/Soap/c/15.0/00D80000000ZF1L, "Get Flash Data Report","_blank")

 

 

 

HI All,

 

Can any one please tell me what this line is doing 

 

sCRDId = (controller.getId() != null) ? controller.getId() : '';

Hi Can any one please help me out for this trigger test class

 

Thanks In Advance

 

trigger trgSystemSize on oe_order_lines__c (before Insert, before Update)
{
    Set<String> ords = new Set<String>();
    for(oe_order_lines__c ord : Trigger.New){   
       if (String.isNotBlank(ord.ITEM_NUMBER__c))
             ords.add(ord.ITEM_NUMBER__c );
    }
 
    if(!ords.IsEmpty())
    {
        Map <String, Item__c> actt = new  Map <String, Item__c>();
        for (Item__c act : [SELECT id,Name,Item_ID__c, Product_Type__c, Item_Category_3__c FROM Item__c  WHERE Item_ID__c IN: ords])                            
                               
                              

                            
                            {
                            system.debug('########--actt--> ' + act);
            actt.put(act.Item_ID__c, act);      
        }
 SYSTEM.DEBUG('--actt--> ' + actt);       
        for(oe_order_lines__c ord1: trigger.new)
        {
            if(String.isNotBlank(ord1.ITEM_NUMBER__c) && actt.containskey(ord1.ITEM_NUMBER__c))
            {
                ord1.Item_Number_Order_Line__c = actt.get(ord1.ITEM_NUMBER__c).Id;                              
                      
                                 
                            
                }
            }            
        }        
    }

I have vf tab ,under the vf tab i am displaying 2 sub tabs Purchase orders tab,Booked Orders Tab,

i am dispalying different list views under the each sub tab,

The problem is when i am moving from  one list view to other list view in Booked order the page redirects to the purchase order tab ,

 

Any help that would be great appericated.

 

Thanks In Adavance.

 

Here is My code

 

 

<apex:page controller="DesignToolsController" showHeader="true" id="pg" >
<apex:pageMessages ></apex:pageMessages>

<apex:includeScript value="{!$Resource.partner_portal_gaq}"/>
<!-- set activetab attribute under case#00087202 -->
<apex:tabPanel value="{!activeTab}" switchType="server" id="OrdersTabPanel"
tabClass="activeTab" inactiveTabClass="inactiveTab" onclick="">

<apex:tab label="{!$Label.OrderDetails_PurchaseOrders}" name="PurchaseOrders" id="PurchaseOrdersTab"
rendered="{!OR(AND(isEUPartnerUser, IsUserAuthorizedToOrder),NOT(isPartnerUser),AND(isNAPremAuth, IsUserAuthorizedToOrder) )}">
<apex:ListViews id="POSelectedView" type="Purchase_Order__c" />
</apex:tab>
<!-- Adding Booked Orders Tab Sashi-->
<apex:tab label="{!$Label.BookedOrders}" name="BookedOrders" id="BookedOrdersTab">

<apex:ListViews id="POSelected" type="oe_order_headers__c" />
</apex:tab>

Hi I am displaying 2 subtabs under the visualforce tab,i had a differen list views for each tab,for suppose i select the  one list view in booked order tab again when i am going to change list view in booked orders tab,the page is going to be rerendered in to purchase order tab.can any one help on this it would be great apperciated .

 

Here is my code

Thanks In adavance

 

<apex:page controller="DesignToolsController" showHeader="true" tabStyle="Purchase_Order__c" id="pg" >
<apex:pageMessages ></apex:pageMessages>
  <apex:includeScript value="{!$Resource.partner_portal_gaq}"/>
  <!-- set activetab attribute under case#00087202 -->
  <apex:tabPanel value="{!activeTab}" switchType="server" id="OrdersTabPanel">
     
      <apex:tab label="{!$Label.OrderDetails_PurchaseOrders}" name="PurchaseOrders" id="PurchaseOrdersTab"
       rendered="{!OR(AND(isEUPartnerUser, IsUserAuthorizedToOrder),NOT(isPartnerUser),AND(isNAPremAuth, IsUserAuthorizedToOrder) )}"> 
         <apex:ListViews id="POSelectedView" type="Purchase_Order__c" />
      </apex:tab>  
<!-- Adding Booked Orders Tab Sashi-->
      <apex:tab label="{!$Label.BookedOrders}" name="BookedOrders" id="BookedOrdersTab">
           
              <apex:ListViews id="POSelected" type="oe_order_headers__c" />
              
    
      
      </apex:tab> 

Hi i want to update system.size field its not updateing can any one can help on this

 

it would be great appericated

 

trigger trgSystemSize on oe_order_lines__c (before insert, before update)
{

Set<Id> lstS = new Set<Id>();
for(oe_order_lines__c ool: trigger.new)
if(ool.Item_Number_Order_Line__c != null)
lstS.add(ool.Item_Number_Order_Line__c);


List<oe_order_lines__c> lstol= new List<oe_order_lines__c>();

if(!lstS.isEmpty())
{
for(oe_order_lines__c ool: Trigger.new)
{
Map<Id, Item__c> mI = new Map<Id, Item__c>([SELECT Name,Item_ID__c, Product_Type__c, Item_Category_3__c FROM Item__c WHERE Name IN: lstS]);

if((ool.Item_Number_Order_Line__c != null) && mI.containsKey(ool.Item_Number_Order_Line__c))
{

if( (mI.get(ool.Item_Number_Order_Line__c).Product_Type__c=='FG MODULE') &&
( (ool.INVENTORY_ITEM_ID__c == Integer.valueof(mI.get(ool.Item_Number_Order_Line__c).Item_ID__c) )
|| (ool.ITEM_NUMBER__c == String.valueof(Integer.valueof(mI.get(ool.Item_Number_Order_Line__c).Item_ID__c) ))) )

ool.System_Size__c = (ool.REQUESTED_QTY__c) * (Integer.valueof(mI.get(ool.Item_Number_Order_Line__c).Item_Category_3__c));
update ool;
}
else
{
ool.System_Size__c= null;
}

}
}
}

Hi

 

i have a standard Detailed Page,i want to display a link in top of the page, it ll bring back on to the standard list of records in to the partener portal.

 

Any help would be appreciated.

 

Thanks In Adavance.

 

 

Bill_to_Site__r.Address1__c + ','+ Bill_to_Site__r.Address2__c & BR() & Bill_to_Site__r.Address3__c + Bill_to_Site__r.City__c + ','+Bill_to_Site__r.State__c +  Bill_to_Site__r.Country__c +Bill_to_Site__r.Zip__c

 

Error: Field Country__c is a picklist field. Picklist fields are only supported in certain functions. Tell me more

Hi  i have a 2 objects ,PO and  SS, i want to populate the values of SS object into PO ?

 

Any help would be appreciated.

 

 

Thanks In Adavance .

 

 

 

Hi  anyone can you please suggest me how to create page layouts for different list views?

 

Thanks in Advance

Hi 

 

 i  created a visual force page with standard list view,its having list of records,for suppose  i opend the particular record ,i want to go back to the priveious list of records,can any one suggest me how to acheive this

When CRD Record is created following fields should be update d on the order

Fields on CRD screen

Beginning CRD = formula field we discussed today morning

Ending CRD should be entered by User and stored in ORDER_Change_REQUESTS__C.Request_DATE__C

SFDC Request ID should be a auto number field which should generate new ID every time a new record Is generated.

Create a Status Picklist field (SFDC_REQUEST_STATUS__C ) in CRD change object with Value ‘Pending’ ,’Approved’ and ‘Rescheduled’ – New record should have status Pending.

 

hi i am gettng below error can anyone help me out on this .

ErrorError: crdchangebutton1 Compile Error: Constructor not defined: [crdchangebutton1.wrap].<Constructor>(SOBJECT:ORDER_Change_REQUESTS__c, Boolean, Integer) at line 52 column 49

 

 

 

<apex:page Controller="crdchangebutton1" sidebar="false">
<apex:form id="f1">
<apex:pageBlock >
<apex:pageBlockTable value="{!Orderchange}" var="r" id="lstupdt">
<apex:column headerValue="Change">
<apex:outputLabel value="{!r.sno}" />
</apex:column>

<apex:column headerValue="Beginning CRD">
<apex:outputText value="{0,date,M/dd/yyyy}">
<apex:param value="{!r.emp.Current_Requested_Date__c}" />
</apex:outputText>
</apex:column>

<apex:column headerValue="Enging CRD" id="c4">
<apex:outputLabel value="{!rec.propRequest Date}" rendered="{!NOT(rec.propEditable)}" id="opLbl4"/>
<apex:inputText value="{!rec.propREQUEST_DATE__c}" rendered="{!rec.propEditable}" style="background-color:#EBFFAE" id="inTxt4"/>
</apex:column>


<apex:column headerValue="Status">
<apex:outputText style="font-style:Regular" value=" {0}">
<apex:param value="{!r.emp.Status__c}"/>
</apex:outputText>
</apex:column>

<!-- <apex:inlineEditSupport showOnEdit="lstupdt"
hideOnEdit="editButton" event="ondblclick"
changedStyleClass="myBoldClass" resetFunction="resetInlineEdit"/> -->

</apex:pageBlockTable>
<apex:pageBlockButtons >
<apex:commandButton action="{!SaveLast}" value="Save" reRender="pB" rendered="{!rec.propEditable}" id="cBtn">
<apex:param name="prmId" value="javascript&colon;document.getElementById('{$Component.inTxt4}').value;" assignTo="{!propChange}"/>
</apex:commandButton>
</apex:pageBlockButtons>

</apex:pageBlock>


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

 

 

classs

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

 

public with sharing class crdchangebutton1
{
public String rec { get; set; }
public String propChange { get; set; }
public Boolean propEditable { get; private set; }
public date lastupdate { get; set; }

public String getEmp() {
return null;
}


public PageReference save()
{
return null;
}


List<Wrap> Orderchange {get;set;}
public Pagereference SaveLast()
{
System.Debug('---> ' + propChange);
return null;
}


public ApexPages.StandardSetController controller
{
get
{
if(controller==null)
{
controller = new ApexPages.StandardSetController([Select Id, Current_Requested_Date__c,Status__c FROM ORDER_Change_REQUESTS__c]);

}

return(controller);
}
set;
}


public list<wrap> getOrderchange()

{
Orderchange =new list<wrap>();

integer sno=1;

for(ORDER_Change_REQUESTS__c em:(list<ORDER_Change_REQUESTS__c>)controller.getRecords())
{
Orderchange.add(new wrap(em,sno++));
Orderchange.add(sno++);
sno++;

}
return Orderchange;
}

public class wrap
{
public integer sno{get;set;}
public Boolean propEditable { get; private set; }
public ORDER_Change_REQUESTS__c emp{get;set;}

public wrap( ORDER_Change_REQUESTS__c e,integer sn,Boolean xEdt)
{
emp=e;
sno=sn;
propEditable = xEdt;
}


}
}

 

 how to display serial numbers for records in visual force page can any one suggest me ,on this 

 

              Thanks in Adavance...

i have scenario ,i want to display a radio button with account name in vf page,if i place mouse on the radio the account will display the related contacts for that account......

 

 

can any one suggest me to do this

 

 

Thanks In advance

Hi All,

 

 I need some help. In my custom object i have one formula field it is displaying user name based on value in the pick list value. Based on the picklist value the user value is displaying in one field for that created formula field. 

 

I created one look up field(User) in my object now i want to populate that field value based on the user name retrived in the formula field so now i want to update this look up field value based on the formula field for this in after insert have to do this update but salesforce does not allows to update the current record in the after insert event. So can any one help how to acheive this functionality.

 

Is there any other way to do this. Please help me on this

 

Thanks in advance.

 I have a visual force page,

 

I created a serach button in visual force page,the serach button return some records into pageblock table,i want to display CSV link to download the serch results any one can please suggest me on this 

 

it would be great helpfull.

 

Thanks In Adavace

Calculate how many working and how many weekends in between Start date and End date.

Bill_to_Site__r.Address1__c + ','+ Bill_to_Site__r.Address2__c & BR() & Bill_to_Site__r.Address3__c + Bill_to_Site__r.City__c + ','+Bill_to_Site__r.State__c +  Bill_to_Site__r.Country__c +Bill_to_Site__r.Zip__c

 

Error: Field Country__c is a picklist field. Picklist fields are only supported in certain functions. Tell me more

Hi  i have a 2 objects ,PO and  SS, i want to populate the values of SS object into PO ?

 

Any help would be appreciated.

 

 

Thanks In Adavance .

 

 

 

Hi  anyone can you please suggest me how to create page layouts for different list views?

 

Thanks in Advance

When CRD Record is created following fields should be update d on the order

Fields on CRD screen

Beginning CRD = formula field we discussed today morning

Ending CRD should be entered by User and stored in ORDER_Change_REQUESTS__C.Request_DATE__C

SFDC Request ID should be a auto number field which should generate new ID every time a new record Is generated.

Create a Status Picklist field (SFDC_REQUEST_STATUS__C ) in CRD change object with Value ‘Pending’ ,’Approved’ and ‘Rescheduled’ – New record should have status Pending.

 

hi i am gettng below error can anyone help me out on this .

ErrorError: crdchangebutton1 Compile Error: Constructor not defined: [crdchangebutton1.wrap].<Constructor>(SOBJECT:ORDER_Change_REQUESTS__c, Boolean, Integer) at line 52 column 49

 

 

 

<apex:page Controller="crdchangebutton1" sidebar="false">
<apex:form id="f1">
<apex:pageBlock >
<apex:pageBlockTable value="{!Orderchange}" var="r" id="lstupdt">
<apex:column headerValue="Change">
<apex:outputLabel value="{!r.sno}" />
</apex:column>

<apex:column headerValue="Beginning CRD">
<apex:outputText value="{0,date,M/dd/yyyy}">
<apex:param value="{!r.emp.Current_Requested_Date__c}" />
</apex:outputText>
</apex:column>

<apex:column headerValue="Enging CRD" id="c4">
<apex:outputLabel value="{!rec.propRequest Date}" rendered="{!NOT(rec.propEditable)}" id="opLbl4"/>
<apex:inputText value="{!rec.propREQUEST_DATE__c}" rendered="{!rec.propEditable}" style="background-color:#EBFFAE" id="inTxt4"/>
</apex:column>


<apex:column headerValue="Status">
<apex:outputText style="font-style:Regular" value=" {0}">
<apex:param value="{!r.emp.Status__c}"/>
</apex:outputText>
</apex:column>

<!-- <apex:inlineEditSupport showOnEdit="lstupdt"
hideOnEdit="editButton" event="ondblclick"
changedStyleClass="myBoldClass" resetFunction="resetInlineEdit"/> -->

</apex:pageBlockTable>
<apex:pageBlockButtons >
<apex:commandButton action="{!SaveLast}" value="Save" reRender="pB" rendered="{!rec.propEditable}" id="cBtn">
<apex:param name="prmId" value="javascript&colon;document.getElementById('{$Component.inTxt4}').value;" assignTo="{!propChange}"/>
</apex:commandButton>
</apex:pageBlockButtons>

</apex:pageBlock>


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

 

 

classs

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

 

public with sharing class crdchangebutton1
{
public String rec { get; set; }
public String propChange { get; set; }
public Boolean propEditable { get; private set; }
public date lastupdate { get; set; }

public String getEmp() {
return null;
}


public PageReference save()
{
return null;
}


List<Wrap> Orderchange {get;set;}
public Pagereference SaveLast()
{
System.Debug('---> ' + propChange);
return null;
}


public ApexPages.StandardSetController controller
{
get
{
if(controller==null)
{
controller = new ApexPages.StandardSetController([Select Id, Current_Requested_Date__c,Status__c FROM ORDER_Change_REQUESTS__c]);

}

return(controller);
}
set;
}


public list<wrap> getOrderchange()

{
Orderchange =new list<wrap>();

integer sno=1;

for(ORDER_Change_REQUESTS__c em:(list<ORDER_Change_REQUESTS__c>)controller.getRecords())
{
Orderchange.add(new wrap(em,sno++));
Orderchange.add(sno++);
sno++;

}
return Orderchange;
}

public class wrap
{
public integer sno{get;set;}
public Boolean propEditable { get; private set; }
public ORDER_Change_REQUESTS__c emp{get;set;}

public wrap( ORDER_Change_REQUESTS__c e,integer sn,Boolean xEdt)
{
emp=e;
sno=sn;
propEditable = xEdt;
}


}
}

 

 how to display serial numbers for records in visual force page can any one suggest me ,on this 

 

              Thanks in Adavance...

Hi Folks,

               How to update original object fields with update DML statement in trigger after insert event. My code:

 

trigger myTrigger on Account (after insert) {

Account myAccount = trigger.new[0];
myAccount.Type = 'Enterprise Customer';
update myAccount;
}

 

Here the update DML statement throws the exception: System.FinalException: Record is read-only:

 

Please let me know and all suggestions are appreciated with any sample code or correction to above code.

 

Thanks.

Hi,

 

I have a custom solution which displays records based on the criteria in the form of a data table.

Now, how can i export the results in Visualforce page to excel?

 

I would have a link/button that reads "Export to Excel" and should export the results.

 

Any ideas on how to accomplish this?

 

Thanks,

Sales4ce