• Devendra Sawant
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 39
    Questions
  • 56
    Replies

 

Hi,

 

I have two object School and Student.
They are having master detail relationship where School(Master) --> Student(Child)

Each school must contain student name with unique values.

For e.g. School Name : DOn Bosco
        Student Name: Ajay
        Student Name : Kunal
       
    It should not allow another record with student name as 'Ajay', because it is already available under DOn Bosco.

But student Name "Ajay" can allow to add under different school name (say under St. Xaviers), simply because "Ajay" belongs to different school.

How to resolve this problem?

Cheers,
Devendra S    

 

Hi,

 

How to avoid user from creating duplicate roles ?

 

Regards,

Devendra S

 

 

 

Hi,

 

I am using custom button (Back) on detail page. I want to give a functionality same as Cancel button.

 

What javascript should i write to achive proper result?

 

Cheers,

Devendra S

 

Hi,

 

I have created one visualforce page where multiple tabs are taken to display different objects.

 

I have used <apex:enhancedlist> to display records under each tab.

 

When the page loads it only display records on that particular tab/first tab. On other tabs, records are not displayed automatically. The records on other tabs are visible only when i click on Refresh button.

 

Why this is happening? If i use List view all the records are visible. But when i used enhanced list it is giving the problem.

 

How to resolve this issue??

 

Cheers,

Devendra S

 

Hi,

 

On any detail page you can click the Back to List: link to return to your most recently viewed list page. The kind of list that you will be returning to is appended after the colon. For example, if the last list page you viewed was the 'D' page of the “All Accounts” view, clicking Back to List: Accounts returns you to that page. Similarly, if your most recently viewed list page was a list of cases, then the link would be Back to List: Cases. The link isn't available if you haven't viewed any list pages in your current session.

 

I want to remove this option, which is available on detail page.

 

How to remove this option from detail page??

 

Cheers,

Devendra S



 

Hi,

 

Whenever we click the Delete button, the “Are you sure?” message pops up. 

 

Can we able to Change the text to say “Are you sure? This record will be stored in Recycle Bin!”

 

In short can we customize this message?

 

Cheers,

Devendra S



 

Hi,

I have created one vf page where i can create a User for my org. When i save a record after entering the required fields(Send EMail Notification functionality to that user is not works).

Is it because i am customizing Create User functionality on vf page?

Because when we create a User from Setup->Manage Users option salesforce automatically sends the email to that particular user.


Cheers,
Devendra S 

 

Hi,

I have created one vf page where i have listed all the roles from the org.

When i click on particular role to view detail page, i get the following error message,

"An internal server error has occurred
An error has occurred while processing your request. The salesforce.com support team has been notified of the problem. If you believe you have additional information that may be of help in reproducing or correcting the error, please contact Salesforce Support. Please indicate the URL of the page you were requesting, any error id shown on this page as well as any other related information. We apologize for the inconvenience. "

May i know why this error is coming and how to resolve this issue?

Cheers,
Devendra S




Hi,

 

Can I able to see my app from ipad device?

 

The development of an app is still in the process and I want to check it out how it looks and works on ipad.

 

Cheers,

Devendra S

 



Hi,

 

I can easily dragged the text area field. How can i restrict user from dragging or stretching textarea??

 

Cheers,

Devendra S

 

Hi,

 

May i know what would be validation rule for entering first name, last name etc.??

 

Cheers,

Devendra S

 

Hi,

How can i make standard field- Name Text(80) as Unique?

It is taking duplicate values and i want to avoid the same.

Cheers,
Devendra S

 

Hi,

 

I am creating one field as ZIp Code. As there is no standard datatype available for zip, what would be the ideal datatype for Zip (Number or Text)?

 

How can i validate zip code?

 

Regards,

Devendra S

Hi,

 

I have three objects, Account, Contact, Merge_Account_Contact(It has all the contact fields and one account name field)

When i create new Account and its related Contacts, trigger event should occur and Merge_Account_Contact should be Created.

One account has many contacts. So i am confused how to retrive those values and save into the Merge_Account_Contact.


It would be greate if anyone helps me in writting this trigger.


Thanks in advance.

Cheers,
Devendra S 

 

Hi,

 

I am a new bie to write a trigger code. I seek some help.

There are four objects namely: Job, Job Task, Schdule Template and Schedule Template Item.

In first relationship Job is Child and ScheduleTemplate is Master where they have lookup relationship.(Job has lookup to Schedule Template)

In second relationship,

Schedule Template (Master) and  Schedule Template Item (Child) : Master-Detail Relationship

When a particular Job is created then i want to save Job Name(which belongs to job) and Schedule Template Item fields into the Job Task object.

Scedule Template can contain many schedule template items.

How i can write a trigger code to implement this functionality??

Cheers,
Devendra S


 

Hi,

 

http://www.salesforce.com/us/developer/docs/pages/Content/pages_quick_start_tabs.htm

 

Please go through the above link and see the image inside,

 

App has list of first level tabs.

 

1) I am on Account tab, when i click on particular Account record it will show the second level tabs (which has Detail, Opportunity, Open Activities etc.)

 

Suppose i am clicking on Opportunity Tab, it will display number of opportunities. I can create new opprtunity by clicking on NewOpportunity button.

I have SAVE and CANCEL button on UI of new opportunity. If i click on Cancel it should navigate to the Opportunity tab. But it is navigating to the Details tab when i click on CANCEL button of New Opportunity.

 

How can i navigate to the List of Opportunities instead of Detail tab?

 

2 ) When i clicks on New Opportunity button to enter new opportunity. The second level tabs gets vanished. I want to maintain/displya those tabs when i click on New Opportunity button.

 

Will it be possible?? If yes then how to do it?

 

Cheers,

Devendra S

 

Hi,

 

How to create Role and Assignment functionality of Role to Users using visualforce and apex?

 

I have object schema of Userrole. But i dont know how to use object schema to implement the above functionality.

 

Cheers,

Devendra S

 

Hi,

 

Is it possible to implement "Create New Role functionality" using visualforce and apex?

 

If yes, then how to do it??

 

Cheers,

Devendra S

 

 

Hi,

 

How to create Role functionality on a visualforce page.?

 

I want to first create a role and then assigned users to those roles?

 

How it can be done using visualforce and apex?

 

Cheers,

Devendra S

 



 

Hi,

 

I have created one object called Job which has lookup relationship with Schedule Template object.

I have another object Schedule Template Item which has master-detail relationship with Schedule Template object.


Job (Master) and Schedule Template (Child) : Lookup Relationship

Schedule Template (Master) and  Schedule Template Item (Child) : Master-Detail Relationship

I want to retrive Schedule Template Items.

How to do it?

Using visualforce,apex code how can i display related Schedule Template Items of particular Schedule Template?

 

Cheers,

Devendra S

 

Hi,

 

I have two object School and Student.
They are having master detail relationship where School(Master) --> Student(Child)

Each school must contain student name with unique values.

For e.g. School Name : DOn Bosco
        Student Name: Ajay
        Student Name : Kunal
       
    It should not allow another record with student name as 'Ajay', because it is already available under DOn Bosco.

But student Name "Ajay" can allow to add under different school name (say under St. Xaviers), simply because "Ajay" belongs to different school.

How to resolve this problem?

Cheers,
Devendra S    

 

Hi,

 

How to avoid user from creating duplicate roles ?

 

Regards,

Devendra S

 

 

 

Hi,

 

Whenever we click the Delete button, the “Are you sure?” message pops up. 

 

Can we able to Change the text to say “Are you sure? This record will be stored in Recycle Bin!”

 

In short can we customize this message?

 

Cheers,

Devendra S



 

Hi,

I have created one vf page where i have listed all the roles from the org.

When i click on particular role to view detail page, i get the following error message,

"An internal server error has occurred
An error has occurred while processing your request. The salesforce.com support team has been notified of the problem. If you believe you have additional information that may be of help in reproducing or correcting the error, please contact Salesforce Support. Please indicate the URL of the page you were requesting, any error id shown on this page as well as any other related information. We apologize for the inconvenience. "

May i know why this error is coming and how to resolve this issue?

Cheers,
Devendra S




 

Hi,

 

May i know what would be validation rule for entering first name, last name etc.??

 

Cheers,

Devendra S

 

Hi,

How can i make standard field- Name Text(80) as Unique?

It is taking duplicate values and i want to avoid the same.

Cheers,
Devendra S

 

Hi,

 

I am creating one field as ZIp Code. As there is no standard datatype available for zip, what would be the ideal datatype for Zip (Number or Text)?

 

How can i validate zip code?

 

Regards,

Devendra S

Hi,

 

I have three objects, Account, Contact, Merge_Account_Contact(It has all the contact fields and one account name field)

When i create new Account and its related Contacts, trigger event should occur and Merge_Account_Contact should be Created.

One account has many contacts. So i am confused how to retrive those values and save into the Merge_Account_Contact.


It would be greate if anyone helps me in writting this trigger.


Thanks in advance.

Cheers,
Devendra S 

 

Hi,

 

I am a new bie to write a trigger code. I seek some help.

There are four objects namely: Job, Job Task, Schdule Template and Schedule Template Item.

In first relationship Job is Child and ScheduleTemplate is Master where they have lookup relationship.(Job has lookup to Schedule Template)

In second relationship,

Schedule Template (Master) and  Schedule Template Item (Child) : Master-Detail Relationship

When a particular Job is created then i want to save Job Name(which belongs to job) and Schedule Template Item fields into the Job Task object.

Scedule Template can contain many schedule template items.

How i can write a trigger code to implement this functionality??

Cheers,
Devendra S


 

Hi,

 

How can i create new user using Visualforce page?

 

What is the code to do it the same?

 

Cheers,

Devendra S

 

Hi,

 

I want to know if we have multiple user profiles set in the org. Then can we get counts by user types in LMA.

 

For e.g. I sell the product with 10 licenses. I create two user types...Type 1and Type 2. I create 3 Type 1 users and 4 Type 2 users manually from Admin profile. Then in LMA can I get the count separately? 

 

 

Regards,

Devendra S

Hi,

 

I'm new to Apex, and please advise me about Apex Trigger.

I could create a trigger for custom object to find duplicates and check a checkbox.

Below is my code. This trigger can check the checkbox of new record.

But I want to check the existing record's one.

How can i do this?

 

trigger CheckIsRevised on No__c (before insert, before update) {
   if (Trigger.isInsert)
   {
   	      for (No__c no : Trigger.new){
     
         No__c[] nos= [select id from No__c where Ano__c = :no.Ano__c ];
     
         if (nos.size() > 0) {
             no.revised_flag__c=true;
         }  
      }
   }
   else if (Trigger.isUpdate)
   {
       for (No__c no : Trigger.new)
       {
          No__c oldNo=Trigger.oldMap.get(no.id);
          if (no.Ano__c != oldNo.Ano__c)
          {
             No__c[] nos= [select id from No__c where Ano__c = :no.Ano__c];
     
             if (nos.size() > 0) 
             {
                no.revised_flag__c=true;
             }
              
          }
       }
   }	
}

 Thanks in advance!

Anybody is able to control the behavior of apex listviews component within the apex tabpanel

this is the code if i take some number of tabs within the tabpanel and using the listviews component within the tab component  and try to click any of the filters like A,B,C,..... etc or next or previous link , my page get refreshes and it lands to default tab of tabpanel showing unexpected behavior of tab within one apex page. this is the code. Any comment will be appreciated.

<apex:page showHeader="false">
   <apex:tabPanel switchType="client" id="tabpanel">
   <apex:tab label="TAB 1" id="object1">
   <apex:ListViews type="Case"/>
   </apex:tab>    
 
    <apex:tab label="TAB 2" id="object2">
            <apex:listViews type="account"/>
    </apex:tab> 
    </apex:tabPanel>
</apex:page>

 

Thank you

OK, here's the thing:

 

We have a VF page consisting mostly of an <apex:tabPanel> containing several <apex:tab> components.  The contents of these tabs are somewhat complex and take a bit of time to build, so we don't want to ever re-render the tabPanel if we can help it.

 

Each tab contains controls that allow navigation away from this page (e.g. one contains a related list with the standard Edit/New controls). When we do so, and now we're on whatever other page, and we hit Save or Cancel, we are returned to our VF page as expected, and it is re-rendered at that time.  

 

Back on our VF page, though, we are now sitting on the page's default tab, as opposed to the tab we were on when we navigated away.  This is the problem I'm trying to solve.  I have envisioned the following approaches:

 

1) Inject the currently active tab (name or Id) into the current URL via a page parameter, whenever a tab is selected. 

 

I have not gotten this to work because I cannot modify the current URL without causing the whole page to re-render, and that is unacceptable because of load time.  I tried modifying the current URL both in the controller (via an actionFunction linked to the 'ontabenter' event of the tab - NOT by setting the tabPanel's 'switchType' attribute to 'ajax' or 'server', which also causes a page re-render), and via javascript, modifying 'window.location.search' directly, but neither allows me to sneak the parameter into the page without re-rendering it.  Which I suppose is to be expected.

 

2) Remember the currently active tab in a cookie.  Then, when the page is initialized (or re-initialized when we return to it), grab the cookie and use its value to set the active tab.  

 

If I could get the cookie value back into the controller as part of its initialization, then this would work easily, as I could then use it to set a controller property, and bind it to the tabPanel's 'value' attribute before the tabPanel gets rendered.  But I don't know of any way to do that.

 

Alternatively, I could conceivably use the cookie directly in Javascript to poke whatever information into the underlying HTML to 'spoof' a tab selection.  I did actually look into this, inspecting the HTML of a sample page, and I see style classes like 'dr-tbpnl-tbcell-inact' vs. 'dr-tbpnl-tbcell-act' that I could maybe toggle on the appropriate page components.  Or maybe there's some JS method that already exists, buried in main.js or somewhere, that could be leveraged?  Seems a little risky to me, reverse-engineering SF functionality - dodgy at best and non-forward-compatible at worst.

 

Anybody got any suggestions about this?  Remember, the key point here is to keep track of tab changes without re-rendering the tabPanel, in a way that survives navigating away from + back to the page.

 

Thanks!

 

  • January 28, 2010
  • Like
  • 0

Hello All,

 

whether its possible to ctrate user using custom pages and controller extensions using own save method?

 

Regards

Anilkumar

hi, I found out that after i enabled "enhanced list view" feature, when i toggle between different view in an object, the URL address in the browser address bar does not change, for example, when i change from "closed this month" from "new this month" in opportunity, the URL address is same/does not change. So I am having difficulty to get the correct URL addresses for different list views.

  • August 01, 2008
  • Like
  • 0
I'm having trouble setting the selectedTab attribute of a tabPanel dynamically.  It works fine if I set selectedTab to a string in the visualforce page, but if I try and use something set by the controller it doesn't work.  Am I missing something obvious or is there an issue with the tabPanel tag?  

Controller:

Code:
public class testTabController {
 String tabInFocus = System.currentPageReference().getParameters().get('tab');
 public String getTabInFocus() {
  return tabInFocus;
 }
 public void setTabInFocus( String s ) {
  this.tabInFocus = s;
 }
}

 Page:
Code:
<apex:page controller="testTabController" sidebar="false" showheader="true">

 <p>tabInFocus: &lt;{!TabInFocus}&gt;</p>
 <apex:tabPanel switchType="client" selectedTab="{!TabInFocus}" id="testTabs">
  
  <apex:tab label="Label 1" name="oneTab" id="tab1" >
   <p>This is number one</p>
  </apex:tab>
  
  <apex:tab label="Label 2" name="twoTab" id="tab2" >
   <p>This is number two</p>
  </apex:tab>
  
  <apex:tab label="Label 3" name="threeTab" id="tab3" >
   <p>This is number three</p>
  </apex:tab>
  
 </apex:tabPanel>

</apex:page>

URL:
Code:
/apex/test_tab?tab=twoTab

 


 
The tab is selected properly if I use a static string, e.g.:

Code:
<apex:tabPanel switchType="client" selectedTab="twoTab" id="testTabs">

 
Any ideas?