• TiborM
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 10
    Questions
  • 13
    Replies

is somehow possible to add public calendar to multi user view ?

 

we need use it for projects planning (scheduling people) and need get some "overlay"

  • January 06, 2011
  • Like
  • 0

Is it possible to add public calendar to visual forca page with some standard controller and ID?

 

Click to "change button" is very uncomfortable way and I want to just show visualforce page with one click tab.

  • January 06, 2011
  • Like
  • 0

Hi,

 

i have list button in CASE object which Open visualforce page and have enabled Display checkboxes for muli-record selection.

 

I want to make some javascript for this button or some code for page which:

 

1. show alert and block all controls on page with standard CASE Button controller so user must click BACK in navigation

 

OR

 

2. Show alert windows when user click on list view button and there is no selection and after this alert will be no redirect to VF page

 

 

How Can I do it?

Hi,

 

what I have to do if I have picklist field from Case object and I want to show only 1 value from this picklist to user on Visualforce page?

 

And what I have to do to make some value default in picklist field?

Hi,

 

i need to add choice for user to insert data to "Internal Comment" field on CASE object.

 

But when I do this (below) i always get error Error: Invalid field Comments for SObject Case

Internal comment (comments) field is standard field for Case.

 

<apex:page standardController="Case" recordSetVar="cases" tabStyle="Case">
<apex:form >
    <apex:pageBlock title="Mass Close Cases" mode="edit">
        <apex:pageBlockButtons location="top">
            <apex:commandButton value="Save" action="{!save}"/>
            <apex:commandButton value="Cancel" action="{!cancel}"/>
        </apex:pageBlockButtons>
        
        <apex:pageBlockSection >
            <apex:inputField value="{!Case.Comments}" />
        </apex:pageBlockSection>

    </apex:pageBlock>
</apex:form>
You have selected cases with IDs: {!selected}.
</apex:page>

 

I have button in list view which allow multi-choice selection of items and opening this page. When I click on this button I want to see just this Internal comment field just once and SAVE / Cancel buttons.

 

 

Hi,

 

i have problem with picklist dependencies.

 

What I want to do:

Salesforce have integraetd Mass Case Close function, but we cant change layout of this page. Therefore we want build our custom visualforce page and put there all fields which we need.

 

My steps :

 

1. Create custom picklist which is dependent on standard picklist

 I've created Reason Code Specification (REASON_CODE_SPECIFICATION__c) field which is dependent on Case Reason (Reason) standard field.

2. i've created matrix of dependencies

3. i've created visual force page

<apex:page standardController="Case" recordSetVar="cases" tabStyle="Case">
<apex:form >
    <apex:pageBlock title="Mass Close Cases" mode="edit">
        <apex:pageBlockButtons location="top">
            <apex:commandButton value="Save" action="{!save}"/>
            <apex:commandButton value="Cancel" action="{!cancel}"/>
        </apex:pageBlockButtons>
        
        <apex:pageBlockSection >
            <apex:inputField value="{!Case.Status}"/>
        </apex:pageBlockSection>

        <apex:pageBlockSection >
            <apex:inputField value="{!Case.Reason}"/>
            <apex:inputField value="{!Case.Case_Reason_Specification__c}"/>
        </apex:pageBlockSection>
    </apex:pageBlock>
</apex:form>
You have selected cases with IDs: {!selected}.
</apex:page>

 This page accept all selected items from List View Button.

 

4. I've created List View Button for Case object

 Label: My own mass close

 Behavior: Display in existing window with sidebar

 Display type: List button

 Display Checkboxes (for multi-record selection): True

 Content Source: Visualforce page

 Visualforce Page: is page above

 

Now when I go to CASES tab and select some view I can see this button :) it's still OK :)

When I select some case and press my own Mass close button I was redirected to visualforce page.

But there is problem. When I select some Case Reason i still can select all of other values from Case Reason Specification even if I make field dependency.

 

I want update all {!selected} cases with this code and tpe values just once. I don't want type values for all seleced items, but only once for all selected records.

 

Please help how can I do this?

 

 

Hi,

 

I want run some method from class by pressing the button (List view button).

 

Could anyone paste me here sample of code which run my own method "CriticalAccountAgeOfOpenCases.Recalculate()" ?

 

Could you please paste me here sample of code for list view button how to run theese 2 lines?

CriticalAccountAgeOfOpenCases GetCases = new CriticalAccountAgeOfOpenCases();
ID batchprocessid = Database.executeBatch(GetCases, 90);

 Coul you please link me some documentation where it is described how to create code like above?

 

 Thank you

Hi,

 

we are using cases for our service and support department.  I need create some butoon or tool or page or whatever which on demand Close all selected cases. We sometime get email-to-case which is invalid and we don't want to delete them, but close with case reason as invalid. The best for us is modification of standard CASES page to add custome button like picture below, or add some custom tool which will contain this button.

 

Is it possible?

 

 

 

 

 

Hi all,

 

i need somehow make bulk operation in apec class for more than 100 records. To make easier to understand i write little example what I need to do. Please don't aske me why I need it - because.

 

 

global class AccountsOpenCases implements Schedulable {
	public static String CRON_EXP = '0 0 8 * * ?';
	
	global void execute(SchedulableContext SC)
	{
		Account[] accs = [SELECT id, name, NO_OF_OPEN_CASES__c from Account];
		for (Account item : accs)
		{
			int i = [SELECT count() from Case where STATUS != 'CLOSE' and status != 'PENDING CLOSE' and status != 'SERVICE REQUEST' and account = :item.id];
			item.NO_OF_OPEN_CASES__c = i;
			update item;
		}
	}
}

 

 

Hi everyone,

 

i'm new to Apex code and i hope that somebody helps me.

 

I need write test method for apex trigger for object Account, Contact and Lead.

 

I have trigger:

 

trigger AccountCountryPush on Account (before insert, before update) {

...
...

	if (Trigger.isUpdate)
	{
		for (Account item : Trigger.old)
		{ 	
			item.BillingCountry = item.Country__c;
	         }
	}
}

 

and I have "test" method which doesn't work:

 

@isTest
private class CountryPUSHTests {
    static testMethod void newAccountCountryUpdateTest()
    {
    	Account[] items = [Select id, name, Country__c from Account where Country__c = 'Slovakia'];
    	for (Account i : items)
    	{
    		i.Country__c = 'Russia';
    	}
    }
}

 

Country__c is custom obejct - picklist.

We are using it for territory management and we need when this field is changed on objects above then start trigger and in trigger change some others field to same value.

 

 

Please could anybody explain me what I'm doing bad ?

  • April 09, 2010
  • Like
  • 0

Hi,

 

i have list button in CASE object which Open visualforce page and have enabled Display checkboxes for muli-record selection.

 

I want to make some javascript for this button or some code for page which:

 

1. show alert and block all controls on page with standard CASE Button controller so user must click BACK in navigation

 

OR

 

2. Show alert windows when user click on list view button and there is no selection and after this alert will be no redirect to VF page

 

 

How Can I do it?

HI

    I have created a static VF page. I am able to view it if Iinclude it in other page.

 

   However if i give the URL directly like /home/staticVFpage then i dont see it...

Hi,

 

what I have to do if I have picklist field from Case object and I want to show only 1 value from this picklist to user on Visualforce page?

 

And what I have to do to make some value default in picklist field?

Hi,

 

i need to add choice for user to insert data to "Internal Comment" field on CASE object.

 

But when I do this (below) i always get error Error: Invalid field Comments for SObject Case

Internal comment (comments) field is standard field for Case.

 

<apex:page standardController="Case" recordSetVar="cases" tabStyle="Case">
<apex:form >
    <apex:pageBlock title="Mass Close Cases" mode="edit">
        <apex:pageBlockButtons location="top">
            <apex:commandButton value="Save" action="{!save}"/>
            <apex:commandButton value="Cancel" action="{!cancel}"/>
        </apex:pageBlockButtons>
        
        <apex:pageBlockSection >
            <apex:inputField value="{!Case.Comments}" />
        </apex:pageBlockSection>

    </apex:pageBlock>
</apex:form>
You have selected cases with IDs: {!selected}.
</apex:page>

 

I have button in list view which allow multi-choice selection of items and opening this page. When I click on this button I want to see just this Internal comment field just once and SAVE / Cancel buttons.

 

 

Hi,

 

i have problem with picklist dependencies.

 

What I want to do:

Salesforce have integraetd Mass Case Close function, but we cant change layout of this page. Therefore we want build our custom visualforce page and put there all fields which we need.

 

My steps :

 

1. Create custom picklist which is dependent on standard picklist

 I've created Reason Code Specification (REASON_CODE_SPECIFICATION__c) field which is dependent on Case Reason (Reason) standard field.

2. i've created matrix of dependencies

3. i've created visual force page

<apex:page standardController="Case" recordSetVar="cases" tabStyle="Case">
<apex:form >
    <apex:pageBlock title="Mass Close Cases" mode="edit">
        <apex:pageBlockButtons location="top">
            <apex:commandButton value="Save" action="{!save}"/>
            <apex:commandButton value="Cancel" action="{!cancel}"/>
        </apex:pageBlockButtons>
        
        <apex:pageBlockSection >
            <apex:inputField value="{!Case.Status}"/>
        </apex:pageBlockSection>

        <apex:pageBlockSection >
            <apex:inputField value="{!Case.Reason}"/>
            <apex:inputField value="{!Case.Case_Reason_Specification__c}"/>
        </apex:pageBlockSection>
    </apex:pageBlock>
</apex:form>
You have selected cases with IDs: {!selected}.
</apex:page>

 This page accept all selected items from List View Button.

 

4. I've created List View Button for Case object

 Label: My own mass close

 Behavior: Display in existing window with sidebar

 Display type: List button

 Display Checkboxes (for multi-record selection): True

 Content Source: Visualforce page

 Visualforce Page: is page above

 

Now when I go to CASES tab and select some view I can see this button :) it's still OK :)

When I select some case and press my own Mass close button I was redirected to visualforce page.

But there is problem. When I select some Case Reason i still can select all of other values from Case Reason Specification even if I make field dependency.

 

I want update all {!selected} cases with this code and tpe values just once. I don't want type values for all seleced items, but only once for all selected records.

 

Please help how can I do this?

 

 

Hi,

 

we are using cases for our service and support department.  I need create some butoon or tool or page or whatever which on demand Close all selected cases. We sometime get email-to-case which is invalid and we don't want to delete them, but close with case reason as invalid. The best for us is modification of standard CASES page to add custome button like picture below, or add some custom tool which will contain this button.

 

Is it possible?

 

 

 

 

 

Hi all,

 

i need somehow make bulk operation in apec class for more than 100 records. To make easier to understand i write little example what I need to do. Please don't aske me why I need it - because.

 

 

global class AccountsOpenCases implements Schedulable {
	public static String CRON_EXP = '0 0 8 * * ?';
	
	global void execute(SchedulableContext SC)
	{
		Account[] accs = [SELECT id, name, NO_OF_OPEN_CASES__c from Account];
		for (Account item : accs)
		{
			int i = [SELECT count() from Case where STATUS != 'CLOSE' and status != 'PENDING CLOSE' and status != 'SERVICE REQUEST' and account = :item.id];
			item.NO_OF_OPEN_CASES__c = i;
			update item;
		}
	}
}

 

 

Hi everyone,

 

i'm new to Apex code and i hope that somebody helps me.

 

I need write test method for apex trigger for object Account, Contact and Lead.

 

I have trigger:

 

trigger AccountCountryPush on Account (before insert, before update) {

...
...

	if (Trigger.isUpdate)
	{
		for (Account item : Trigger.old)
		{ 	
			item.BillingCountry = item.Country__c;
	         }
	}
}

 

and I have "test" method which doesn't work:

 

@isTest
private class CountryPUSHTests {
    static testMethod void newAccountCountryUpdateTest()
    {
    	Account[] items = [Select id, name, Country__c from Account where Country__c = 'Slovakia'];
    	for (Account i : items)
    	{
    		i.Country__c = 'Russia';
    	}
    }
}

 

Country__c is custom obejct - picklist.

We are using it for territory management and we need when this field is changed on objects above then start trigger and in trigger change some others field to same value.

 

 

Please could anybody explain me what I'm doing bad ?

  • April 09, 2010
  • Like
  • 0