• Ranu Jain
  • NEWBIE
  • 115 Points
  • Member since 2011

  • Chatter
    Feed
  • 4
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 77
    Questions
  • 74
    Replies

Is it posible to require a field to be non-blank based on an action of a different field on the same page layout via standard SFDC functionality?

 

Use case: I have a Picklist and Picklist (Multi-Select) which combine (logically) to require or not require an entry in a Text field. For example, the Picklist includes: car, truck, plane, boat. The Picklist (Multi-Select) includes: engine, control unit, driver, passenger, luggage. The Text field must be non-blank if Picklist does not = "car" or "truck" AND Picklist (Multi-Select) = "luggage" ONLY

 

Can this be done without VF / Apex code?

 

I tried various combinations of IF / INCLUDES / AND / NOT logic and either I built it wrong or this won't work.

 

TIA!

Hi I have a custom setting(CS) field where am saving a SOQL Query. I am passing this query thru the CS field to a global SOBJECT. Now I want to access the field in the sObject which was predefined in the Query. 

 

Query saved in CustomSetting: "login_cred " field "Soqlogin" = "SELECT Id,Registration_Approved__c,SiteProfile__c,SiteProfile__r.Name__c,SiteProfile__r.Default_Home_Page__r.Name__c FROM Contact WHERE UserName__c = username.toLowerCase() AND Password__C = :password "

 

global static SObject currentContact;

List<login_cred__c> logcredlist =[SELECT soqlogin__c FROM login_cred__c LIMIT 1];
string logcred = logcredlist[0].soqlogin__c;

currentContact = Database.query(logcred);

String profileName = currentContact.SiteProfile__r.Name__c;

 

 

Here am getting an error something like :"Save error: Field expression not allowed for generic SObject " 

 

Thanks in advance.

Sathya.S

I am working on year end processes and need to delete some zero records from a custom object.  I have written a trigger that will fire when a field on a custom object is set to YES for delete zero records.  The trigger appears to be working correctly until ready to delete the record.  I am getting the following error.

EXCEPTION_THROWN|[28]|System.DmlException: Delete failed. First exception on row 0 with id a0AJ0000005AY6fMAG; first error: ENTITY_IS_DELETED, entity is deleted: []
09:37:48.247 (1247331000)|FATAL_ERROR|System.DmlException: Delete failed. First exception on row 0 with id a0AJ0000005AY6fMAG; first error: ENTITY_IS_DELETED, entity is deleted: []

 

Here is the Trigger code:

 

trigger DeleteZeroOrders onStart_Budget__c (afterupdate) {

 

if(trigger.isUpdate)

{   

Start_Budget__c sb = [Select Delete_Zero_Open_Orders__c fromStart_Budget__c];

system.debug('Delete Open Orders = ' + sb.Delete_Zero_Open_Orders__c);

  

    If(sb.Delete_Zero_Open_Orders__c == 'Yes'){

 

 

 

 

List<Open_Order__c> OrdersToDelete = new List<Open_Order__c>();  

 

for(Open_Order__c o : [Select Id,Current_Year_YTD__c,Future_Year_YTD__c fromOpen_Order__c])

  {   

   

system.debug('Selected Open Orders = ' + o);

   

if(o.Current_Year_YTD__c == 0){

 

    IF(o.Future_Year_YTD__c == 0){

     

     OrdersToDelete.add(o); 

  

system.debug('Orders to Delete = ' + OrdersToDelete);    

  }

    }

    If(OrdersToDelete.size() != 0)

 

Delete OrdersToDelete;

 

  }

    }

}

}

  • December 28, 2012
  • Like
  • 0

Hi,

 

There is one custom object namely "Position" in my application. I have created a new Profile namely "Profile1".

 

For this profile, I have set "Read" permission for object "Position".

 

But when I loggedIn using the credentials of an user of that profile, I was unable to view records of that object. 

 

Tab is visible. But records are not visible. Please help.

 

 

Thanks,

Arunkumar

What is End Date is Schedule Apex?
Go to setup -> Classes -> Schedule Apex

HI,

 

How to determine who was the first approver of the record.

 

 

 

Hi All,

 

I have two object - 1. Opportunity 2. Agreement(Custom object)

I created a junction  object between them whose primary master is Agreement.

 

User don't have modify all permission on opportunity objet. Only have read,create,edit access on profile level.

Sharing sharing of opportunity is set to private.

There is an opportunity whose owner is in upper hierarchy and created by also is in upper level hierarchy but user is able to to view and edit this opportunity. So we can assume that there should be some sharing rules by which user is able to view this opportunity.

 

 
User have all level of access on junction object.

 

User wants to create new junction record by taking two fields - 

Opportunity -  above describe opportunity

agreement -  created by himself

But getting Insufficient privilege exception error.

 

 

If I provide modify all permission on Opportunity to the user's profile  , everything works fine.

 

Please help

 

 

-- 
Thanks 

Ranu

Hii,

 

I have a requirement in which we need to send reminder notification to the user for following dates 0 

 

90 dates before Agreement End date

60 dates before Agreement End date

30 dates before Agreement End date

21 dates before Agreement End date

 

14 dates before Agreement End date

7 dates before Agreement End date

 

But mail should go start after record is activated.

 

let assume Agreement end date is 31st May. Record is activated on 16th May.

My issue is - email alert are shcheduled for past dates also. for 90,60,30,21 dates before Agreement End date.

 

In my case this time email alert should schedule for only - 7,14 days before agreement end date.

 

What should be the best approach for this except  creating deffernet workflow rules.

 Baiscally i want to stop notification for past dates.

 

 

Thanks

Ranu

Hi All,

We can create a public group in salesforce. list of users is assigned to this group. If we want to send email alert to all these users it is the best way to create the group and assigned these users to this group and use in Email Alert.
But this email goes to all user's personal email box. What If I want to send the email to Admin mailbox  not to all personal email box.

No user is created with this Admin email address.

HI ,

We have found an unexpected behaviour on our Test org.  we were able to edit classes and could open developer console by system admin profile.

 

BUt since last hours we are not able to do all these stuffs. Its looking like PROD org.

What can be happend ..please help.

 

 

Hi,

 

Can any one please help me to understnad session header. I just want to know the basic concept of this.

And how is setup when we get error -  "invalid session id"

Hii ,

 

I am not much familier with web services . Cam any one help me what wrong in below code -

 

1. Its a home page component  - Remove Save and New

<div id="save_component">
&nbsp; <script src="/soap/ajax/11.0/connection.js" type="text/javascript"> 
 <script src="/soap/ajax/10.0/apex.js" type="text/javascript">     
 <script>  
   var result ;
   function addLoadEvent(func) {  
     var oldonload = window.onload;   
     if (typeof window.onload != 'function') {    
  	   window.onload = func;                           
      }          
	  else {
  	    window.onload = function() 
		{                                                               
		  if (oldonload) {   
		    oldonload();   
		  }                                               
		  func();                                       
	   }                     
	 }         
	}        
	addLoadEvent(function() {
 	 result = sforce.apex.execute("test_ranu1","createLinkSimple",'ranu');
	alert(result);    
	})    </script>&nbsp; </div>

 2.  its the class which have webservice method

 

global  class test_ranu1 {
public string flag{get;set;}
public test_ranu1 () {
  flag  = UserInfo.getProfileId();

}

webservice static string createLinkSimple(string url)
    {
          string returnVar = url;
             
           return returnVar;
    }

}

 

I am not getting alert message.

 

 

Thanks

Ranu

 

 

How to get profile id ot Name in java script ?

 

I am using java script in home page component.

 

Hii,

 

I have created a VF page - test-ranu,controller - test_ranu

code is here - 

<apex:page controller="test_ranu">
<apex:form >
  <apex:pageblock >
  <apex:outputPanel id="op">****{!**bleep**s }</apex:outputPanel>
    <apex:pageblockButtons >
      <apex:commandButton value="done" action="{!done}" reRender="op"/>
    </apex:pageblockButtons> 
  </apex:pageblock>
</apex:form>
</apex:page>



public with sharing class test_ranu {
  Apttus__APTS_Agreement__c  agg;
  public boolean **bleep**s {get;set;}
  public  test_ranu () {
    agg = [select id from Apttus__APTS_Agreement__c where id =     'a3SV0000000c614' limit 1];
  
  }
  public void done() {
    try {
      agg .Apts_Legal_Review_Flag__c = true;
      system.debug('=========1');
      update agg;
      if( Schema.sObjectType.Apttus__APTS_Agreement__c.isUpdateable()   )
      **bleep**s  = true;
  
    }catch(Exception e) {
      system.debug('==============2'+e);
    }
  
  }//end of method

}//end of class

 

 

User - Su om (Not system admin), permission on profile - No access on Agreement Object

Created a permission and assign permissions -  Read, Create.  (On Agreement object)

Assigned this permission set to this user.

 

There is no sharing for this object.

 

when I check for Isupdateable - its give me 'false' for this user.

But when I click on dene button record is udpdated successfully and no exception come on update.

 

I tested for both 'With Sharing'  and 'Without Sharing' . I found same behaviour.

 

Please help.

 

 

Hi,

 

I have integrated MS Word with salesforce. now my requirement -

 

page 1 ( should be displayed whte condition1 =  true)

page2 displayed

 

if condition1 - false then also a blank page is coming in my doc. What cna be the solution for this?

 

Thanks

Ranu

Hi All,

I have installed an app exchange package "GridBuddy"  in my org . but dont know how to use this.

Here is link given for tricks -http://salesforceappbuddy.com/tips-and-tricks.html

but I am not able to go to the wizards its explaining. I am trying by /apex/wizard1 , but its giving error.

 

Hi ,

 

I have an formula field on Agreement object which keep address in proper formate -

 

customer name

Street,City 

postal code

 

there is an 'generate button' on this agreement record. when I click on generate button doc file is generated. 

in this doc file these next line tag is shown line <br> . or if i use ^p its dispaly as it is.

 

What is used for next line in dec file . Please suggest its a urgent requirement.

 

 

 

 

Hi All,

 

I have an variable of Sobject type in my controller.  

There is an chile obect Agreement and master Account. I have written qery 

 

public Sobject comp {get;set;};
class C {
comp = [select name , Account_r.name from Agreement ];
}


VF page :

<form>
Agreement field  {!comp['Name']}   Maseter field [here i want to display Account Name]

</form>

 

 

but i could not find out the way to display master's fields?

 

Hi ,

 

I came to a code where I see below syntax  in class :

this.Debug =  ' XXX';

 

Here no Debug varibale is defined.

 

When I tried to write this syntax to my code it gives me error : Error: Compile Error: Variable does not exist: Debug at line 

I am not getting what this syntax mean to in that code?

Hi,

 

I have an master object 'Account' and its child 'Agreement ' .

This child object have a picklist field Agg category which have following values - Data,multiple offering.

 

I want to run a query on Account and want to retrieve tagg with its one child (limit 1 in child query).

 

but requirement is if there is 'Data' category available than it should be retrieved and if 'Data' is not available than we will retrieve 'multiple offering'.

 Is this possible by writing only one SOQl query?

 

 

Can we change existing HTML template to VF template?

Hi ,

 

I am working on a VF page . When I hit 'Generate' button of this page I got a error message -

Error:INVALID_FIELD: No such column value_under_contract__c on entity apttus__apts_agreement__c. If you are attempting to use a custom field, be sure to append the __c after the custom field name.
 
the class which is being used in above VF page is part of managed package .
 
I have deleted field - value_under_contract__c and I was able to delete this field after removing references but this managed class was not in list (given by eclips).  
 
what can be the possibilty - that this field is referenced where? 
 
 

Hi ,

 

What permission is required to clone a record?

There is insufficient preveledge error when I clone a record . I have read,Create , Edit , delete  permission.

Hi,

 

my requirement is :

send an email notification to Accout Owner on Agreement Object .

There is two fields : 1.contract End date 

                                     2. 'Notification days' -  In whihc user set  how many days before contract end date he wnat notifications.

 

I go for the workflow ,Time dependent workflow ,but found I was not able to do this by workflow .I have to use Trigger. 

am I correct? is there any way to do this by workflow.

i have to login into salesforce  org by an html page outside the salesforce....please giv some suggestion what to do for it ...n  i have to include below file

<script src="/soap/ajax/11.0/connection.js"></script>
<script src="/soap/ajax/11.0/apex.js"></script>

 should i have to download it ...? from where

Is it posible to require a field to be non-blank based on an action of a different field on the same page layout via standard SFDC functionality?

 

Use case: I have a Picklist and Picklist (Multi-Select) which combine (logically) to require or not require an entry in a Text field. For example, the Picklist includes: car, truck, plane, boat. The Picklist (Multi-Select) includes: engine, control unit, driver, passenger, luggage. The Text field must be non-blank if Picklist does not = "car" or "truck" AND Picklist (Multi-Select) = "luggage" ONLY

 

Can this be done without VF / Apex code?

 

I tried various combinations of IF / INCLUDES / AND / NOT logic and either I built it wrong or this won't work.

 

TIA!

 

Hi All,

 

I have two object - 1. Opportunity 2. Agreement(Custom object)

I created a junction  object between them whose primary master is Agreement.

 

User don't have modify all permission on opportunity objet. Only have read,create,edit access on profile level.

Sharing sharing of opportunity is set to private.

There is an opportunity whose owner is in upper hierarchy and created by also is in upper level hierarchy but user is able to to view and edit this opportunity. So we can assume that there should be some sharing rules by which user is able to view this opportunity.

 

 
User have all level of access on junction object.

 

User wants to create new junction record by taking two fields - 

Opportunity -  above describe opportunity

agreement -  created by himself

But getting Insufficient privilege exception error.

 

 

If I provide modify all permission on Opportunity to the user's profile  , everything works fine.

 

Please help

 

 

-- 
Thanks 

Ranu

someone help me with this scenario

In my contact object,i have a field ‘email’.whenever a email address of contact is updated we want send an email notification to contact stating that your email address has been changed

Hii,

 

I have a requirement in which we need to send reminder notification to the user for following dates 0 

 

90 dates before Agreement End date

60 dates before Agreement End date

30 dates before Agreement End date

21 dates before Agreement End date

 

14 dates before Agreement End date

7 dates before Agreement End date

 

But mail should go start after record is activated.

 

let assume Agreement end date is 31st May. Record is activated on 16th May.

My issue is - email alert are shcheduled for past dates also. for 90,60,30,21 dates before Agreement End date.

 

In my case this time email alert should schedule for only - 7,14 days before agreement end date.

 

What should be the best approach for this except  creating deffernet workflow rules.

 Baiscally i want to stop notification for past dates.

 

 

Thanks

Ranu

Hi everyone.

 

Wow - an overwhelming amount of information.  Excellent in so many ways, a little  disconcerting for someone new. While I practically know very little about Force.com, I have an extensive background in BI, with a good understanding of tools like Informatica and Cognos. 

 

 

In a nutshell - I have an app idea (who doesn't ...), but I honestly don't know where to start.  Watched a few YouTube videos, read some posts - but still need  help.  My gut tells me that a good place to start would be a solid DB model with:

 

  • standard objects left untouched
  • standard objects repurposed (renamed etc)
  • standard objects modified (e.g. adding custom fields)
  • custom objetcs

This model would have to be based on what the app would want to accomplish, perhaps expressed as use cases initially.  I am sure that some process maps would be useful sooner than later.

 

How should I reconcile all of the above - I need some blueprint of the app before I jump into "no-coding" it.  Also, any specific tools in Force.com that would allow me to keep all these requirements in one place, mark them as complete as I implement them, divide them up in releases etc?

 

If anyone knows of a logical and comprehensive resource on architecting an app - please let me know.

 

Thanks, much appreciated!

Dan

  • May 13, 2013
  • Like
  • 0

Hey there, im customizing our SalesForce database and can foresee some possible problems in logic and  future reporting. Im wondering hows the best way to handle this situation.  Basically I need to know if its possible to report on one field 3, ifs its empty to report on field 2 if that’s empty report on field 1. Its for addresses, (client address, shipping address, physical location address)

 

I don’t want the user to have to enter in the address 3 times if they are all the same, which is often. But just as often all 3 can be different (which they will have to enter them in), or client and shipping will be the same and physical address is different. I want our cases to be by physical address of the sign, but its not always going to be there if same as and of the other two… etc..

 

I also can see problem right away with shipping address on the ivoice template ive already built using Conga Merge trial. If its the same as client address its not always going to be on my invoice. Whats the best way to handle this logic? Make the users enter in the address 3 times wont be fun.

 

I hope this is clear enough. Its a simple but yet tricky problem.

  • April 30, 2013
  • Like
  • 0

Hi all,

 

I need to run a report for this year sales with the design of the table asked for is like

 

Agents           Jan 2013       Feb 2013       Mar 2013          April 2013
                     Nbr of Mbrs      Nbr of Mbrs    Nbr of Mbrs      Nbr of Mbrs

 

With the total.

 

 

I dont know which kind of report to use and how. Please help me with this.

 

Thank you

  • April 29, 2013
  • Like
  • 0

what is meant by Versioning Apex in Salesforce

 

Thanks

Hi All ,

 

         I am not awre how to use java script in visualforce , I have a requriment if the user provides some value in input text box and if he click on command button then i need an aleret , i am awre that how to call to java script function when user click on command button, but i am not awre how add condition in java script function if(opp!=null) then alert('WC');

 

however it's working fine.

<script>

  function check() {

  alert('Welccome ');

}

</script>

<apex:commandbutton value="DO" action={!submit} onclick="return check();"/>

 

If change my code to this. it's not working.

 

<script>

  function check() {

 if(opp!=null){

  alert('Welccome ');

} }

</script>

<apex:commandbutton value="DO" action={!submit} onclick="return check();"/>

<apex:inputtext value="{!opp}"/>

 

and one more thing. i have outputlink when i click on that it will redirects to new page.however if my selectlist value is null menas i don't want to call this method and i need a pop up says please select existing record. 

 

 

 

Hi I have a custom setting(CS) field where am saving a SOQL Query. I am passing this query thru the CS field to a global SOBJECT. Now I want to access the field in the sObject which was predefined in the Query. 

 

Query saved in CustomSetting: "login_cred " field "Soqlogin" = "SELECT Id,Registration_Approved__c,SiteProfile__c,SiteProfile__r.Name__c,SiteProfile__r.Default_Home_Page__r.Name__c FROM Contact WHERE UserName__c = username.toLowerCase() AND Password__C = :password "

 

global static SObject currentContact;

List<login_cred__c> logcredlist =[SELECT soqlogin__c FROM login_cred__c LIMIT 1];
string logcred = logcredlist[0].soqlogin__c;

currentContact = Database.query(logcred);

String profileName = currentContact.SiteProfile__r.Name__c;

 

 

Here am getting an error something like :"Save error: Field expression not allowed for generic SObject " 

 

Thanks in advance.

Sathya.S

Can any one helps me . 
Scenario i have student object having 2 record types having picklist name : 'Group'
for example 
Record type 1 have these picklist values :
Group 1
Group 2
Record type 2 have these piclist values :
Group 3

Group 4

Group 5
these are showing fine if we just use the standard layout .
the problem is that on visual force page i am only creating the students record of record type 1 so i just want to display the picklist in visual force having the exact same values as they are showing in layout..
i.e
page :
<apex:inputField value="{!instance.Group__c}"/>
controller:
student__c instance = new student__c();


i know that i will achieve it by custom picklist but i wnat to know the standard method if exists..
thanks in advance :-)

trigger EstimateUpdateOnAccount1 on Estimates__c(after insert,after update)
{

 List<Account> accsToUpdate = new List<Account>(); 
              
for(Estimates__c EST : trigger.new)
{
 if( Trigger.isInsert)
 {
    if (est.year__c == '2012')
    {
    accsToUpdate.add(new Account(Id = EST.Account__c, Most_Recent_Estimate_Date__c =EST.Created_Date_Value__c, Estimate_Amount__c = EST.Estimate_Total_Fiscal__c ));
    
    }
    
    else
    
    
    {accsToUpdate.add(new Account(Id = EST.Account__c, Most_Recent_Estimate_Date_2__c =EST.Created_Date_Value__c, Estimate_Amount_2__c = EST.Estimate_Total_Fiscal__c ));
    }
    
    if (accsToUpdate != null && !accsToUpdate.isEmpty())
    Database.update(accsToUpdate);
 }
 
 if( Trigger.isUpdate)
 {
    if (est.year__c == '2012')
    {
    accsToUpdate.add(new Account(Id = EST.Account__c, Most_Recent_Estimate_Date__c =EST.Created_Date_Value__c, Estimate_Amount__c = EST.Estimate_Total_Fiscal__c ));
    
    }
    
    else
    
    
    {accsToUpdate.add(new Account(Id = EST.Account__c, Most_Recent_Estimate_Date_2__c =EST.Created_Date_Value__c, Estimate_Amount_2__c = EST.Estimate_Total_Fiscal__c ));
    }
    
    if (accsToUpdate != null && !accsToUpdate.isEmpty())
    Database.update(accsToUpdate);
 }
}
}

 

When am doing upsert operation through data loader. Am getting the following error like "Too Many DML Rows:10001"  can any one help me on this. why am getting this issue.wht mistake  i done in trigger. Please give inputs on this ASAP. thanks in advance

  • March 05, 2013
  • Like
  • 0

Hi

 

Is it possible to specifiy different Approval Processes based on different recordtypes for a given object?

 

Many thanks

Ross

 

can yanyone  tell me how can i display the fields of custom object on vf page along with checkboxex attached to each field.Can i use param and assign to for this??if yes can anyone show me an example

Where will be used Record Types..Explain with Examples

 

 

 

Thanks,

SFDC_Learner

i need to write controller for  retriving soundex for lead's first name ,last name and email address from a utility class and render it on a visual force page and need to put radio buttons as the first coulmn and the next columns will have the first name,last name and email address of the lead.

We have a Visualforce page that is used to upload multiple images. The problem is that to validate, if it shows any errors, the page loses all of the images path.

I understand that safety is a value that is not retained. Anyone know a way I do not miss the path?

Thanks
  • February 07, 2013
  • Like
  • 0