• erikdozsa
  • NEWBIE
  • 35 Points
  • Member since 2013

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 11
    Replies
Dear all,

I would like to ask for your suggestions regrarding the following situation:
I have to create a VF page to record expense line items. Since we don't want to add the rocords one by one the idea is to create some empty rows that the user can fill. We also need some required fields. I would like to have the fields required only if the user started to populate the row but for a completely empty row I would avoid the the error messages and would let the save complete:

Before Save

And this is what happens after save:
On Save

How can I avoid this error popping up for a completely empty row? Any idea is more than welcome.
 
<apex:column id="col1">
		<apex:facet name="header" >{!$ObjectType.Expenses_Line_Item__c.fields.SP_Expense_Category__c.label}</apex:facet>
		<apex:inputField value="{!item.SP_Expense_Category__c}" required="true" />	 
	</apex:column> 
	<apex:column id="col2">
		<apex:facet name="header" >{!$ObjectType.Expenses_Line_Item__c.fields.SP_Expense_Date__c.label}</apex:facet> 
		<apex:inputField value="{!item.SP_Expense_Date__c}" required="true"/>
	</apex:column>
	<apex:column id="col3">
		<apex:facet name="header" >{!$ObjectType.Expenses_Line_Item__c.fields.Value__c.label}</apex:facet>
		<apex:inputField value="{!item.Value__c}" required="true" />	 
	</apex:column>

Thank you in advance!

Erik








 
Hi Developers,

We would like to track Territory record deletion so I created a trigger which would archive some field values of the Territory record in another custom object. I tried "before delete" and "after delete" as well but even if the archivation is successful (in case of before delete) the following message shows up: "You cannot delete the territory because at least one territory rolls up to it." This is not the case and I am not able to actually delete the territory. If I remove my trigger I can delete the Territory record without issues. My approach works well on other objects but not on Territory.

Do you have any idea what could be wrong with my trigger or how could I avoid this error that I get?
 
trigger xxx_CORE_AFTER_TERR_DELETE on Territory (after delete) 
{
	
	list<xxx_CORE_Deleted_Record__c> deletedRecords = new list<xxx_CORE_Deleted_Record__c>();
	
	for(Territory t : trigger.old)
	{
		xxx_CORE_Deleted_Record__c deletedRecord = new xxx_CORE_Deleted_Record__c();
		
		deletedRecord.xxx_CORE_Country_Code__c = t.xxx_CORE_Country_Code__c;
		deletedRecord.xxx_CORE_Object_Name__c = 'Territory';
		deletedRecord.xxx_CORE_Record_ID__c = t.id;
		deletedRecord.xxx_CORE_Record_Name__c = t.Name;
		
		deletedRecords.add(deletedRecord);
		
	}	
	
	if(deletedRecords.size() <> 0)
		upsert deletedRecords;
	
}

Thanks in advance!




 

Hello,

 

I am trying to deploy the account object from SandBox to Prod and I am getting the following error:

 

 Account: No more than 6 columns may be specified in lookupFilterFields

 

Could you please help me fix this issue?

 

Thanks so much!

Dear all,

 

Could you please give me some example for the following case?

 

I have a picklist and based on the picked value I am doing some calculation in the background. I would like to display the calculated result in an outputText field right after I picked the value from the picklist.

 

How could I do that?

 

Thank you so much,

Hi,

 

I would like to add a new custom lookup input field on a custom VF page. How can I achieve this?

Expected result: when I click on the glass near the input field a new window should show up and let me choose from existing territories.

 

Thanks so much!

Dear all,

 

I have a VF page that contains a table. I would like to set the background color of the last column in the table. If I do not render it as PDF it works fine, but when I render it as PDF it does not change the bg color.

 

Do you have any ideas how to make it work?

 

<head>
  <style>
    body

    {

    font-family: Verdana;

    font-size: 12px;

    }


    @page
    {
    size: landscape;
    padding: 1px;
    }

    table tr td:last-child
    {
    background-color: red;
    }

</style>
</head>

 

<table style = "width: 100%" border = "1">
  <apex:repeat value="{!matrix}" var="r">
  <tr>
    <apex:repeat value="{!r}" var="c">
      <td>{!c}</td>
    </apex:repeat>
  </tr>
  </apex:repeat>
</table>

 

Thanks,

Hello all,

 

I would like to delete about 1.5 million records from a custom object. Which is the fastest way to do this?

 

Thank you,

Dear all,

I would like to ask for your suggestions regrarding the following situation:
I have to create a VF page to record expense line items. Since we don't want to add the rocords one by one the idea is to create some empty rows that the user can fill. We also need some required fields. I would like to have the fields required only if the user started to populate the row but for a completely empty row I would avoid the the error messages and would let the save complete:

Before Save

And this is what happens after save:
On Save

How can I avoid this error popping up for a completely empty row? Any idea is more than welcome.
 
<apex:column id="col1">
		<apex:facet name="header" >{!$ObjectType.Expenses_Line_Item__c.fields.SP_Expense_Category__c.label}</apex:facet>
		<apex:inputField value="{!item.SP_Expense_Category__c}" required="true" />	 
	</apex:column> 
	<apex:column id="col2">
		<apex:facet name="header" >{!$ObjectType.Expenses_Line_Item__c.fields.SP_Expense_Date__c.label}</apex:facet> 
		<apex:inputField value="{!item.SP_Expense_Date__c}" required="true"/>
	</apex:column>
	<apex:column id="col3">
		<apex:facet name="header" >{!$ObjectType.Expenses_Line_Item__c.fields.Value__c.label}</apex:facet>
		<apex:inputField value="{!item.Value__c}" required="true" />	 
	</apex:column>

Thank you in advance!

Erik








 
Hi Developers,

We would like to track Territory record deletion so I created a trigger which would archive some field values of the Territory record in another custom object. I tried "before delete" and "after delete" as well but even if the archivation is successful (in case of before delete) the following message shows up: "You cannot delete the territory because at least one territory rolls up to it." This is not the case and I am not able to actually delete the territory. If I remove my trigger I can delete the Territory record without issues. My approach works well on other objects but not on Territory.

Do you have any idea what could be wrong with my trigger or how could I avoid this error that I get?
 
trigger xxx_CORE_AFTER_TERR_DELETE on Territory (after delete) 
{
	
	list<xxx_CORE_Deleted_Record__c> deletedRecords = new list<xxx_CORE_Deleted_Record__c>();
	
	for(Territory t : trigger.old)
	{
		xxx_CORE_Deleted_Record__c deletedRecord = new xxx_CORE_Deleted_Record__c();
		
		deletedRecord.xxx_CORE_Country_Code__c = t.xxx_CORE_Country_Code__c;
		deletedRecord.xxx_CORE_Object_Name__c = 'Territory';
		deletedRecord.xxx_CORE_Record_ID__c = t.id;
		deletedRecord.xxx_CORE_Record_Name__c = t.Name;
		
		deletedRecords.add(deletedRecord);
		
	}	
	
	if(deletedRecords.size() <> 0)
		upsert deletedRecords;
	
}

Thanks in advance!




 

Dear all,

 

Could you please give me some example for the following case?

 

I have a picklist and based on the picked value I am doing some calculation in the background. I would like to display the calculated result in an outputText field right after I picked the value from the picklist.

 

How could I do that?

 

Thank you so much,

Hi,

 

I would like to add a new custom lookup input field on a custom VF page. How can I achieve this?

Expected result: when I click on the glass near the input field a new window should show up and let me choose from existing territories.

 

Thanks so much!

Dear all,

 

I have a VF page that contains a table. I would like to set the background color of the last column in the table. If I do not render it as PDF it works fine, but when I render it as PDF it does not change the bg color.

 

Do you have any ideas how to make it work?

 

<head>
  <style>
    body

    {

    font-family: Verdana;

    font-size: 12px;

    }


    @page
    {
    size: landscape;
    padding: 1px;
    }

    table tr td:last-child
    {
    background-color: red;
    }

</style>
</head>

 

<table style = "width: 100%" border = "1">
  <apex:repeat value="{!matrix}" var="r">
  <tr>
    <apex:repeat value="{!r}" var="c">
      <td>{!c}</td>
    </apex:repeat>
  </tr>
  </apex:repeat>
</table>

 

Thanks,

I'm attempting to add my company logo to a visual force page, which is then being rendered as a pdf, but have not been successful.  I've attempted to do so in three ways:

 

Image is on a website:

<apex:image url="http://www.tsysacquiring.com/graphics/logos/tsysacquiring_top_logo.gif" width="220" height="55"/>

 

Image has been loaded into Salesforce into documents, and is in the /alva/ folder:
<apex:image value="/alva/TSYS_logo_for_TSYS_Sales_App.jpg" width="220" height="55"/>

 

Image is on my C:\drive:

<apex:image value="C:\data\TSYS_Logo_for_TSYS_Sales_App.jpg" width="220" height="55"/>

 

All three attempts have resulted in a broken image icon being displayed.  This seems like a very straightforward thing I'm attempting, and I'd expect it to be rather simple.  Any one have a syntax example that they know works.

 

Thanks!

 

Hi,

 

 

I need to create one Grid Structure in Visualforce page. The row Headings and Column headings will get populatetd from 2 lists. Can anybody please tell me how to achieve this..

 

I will give one example. Say, I have a list of Strings containings Account Names and another List containing Contact Names. Now, I need to keep Account Names in rows and Contact names in columns. At least I am trying to acheve this before proceeding further.

 

Please help..

 

Thanks in advance,

Suvra

  • June 29, 2009
  • Like
  • 0