• m.elmoussaoui
  • NEWBIE
  • 95 Points
  • Member since 2012


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

Having issues getting a VR to work.  I'm trying to force that all entries start with http:// or https:// in both lower and upper case:

 

OR (
NOT(BEGINS(Course_Information__c,"http")),
NOT(BEGINS(Course_Information__c,"https")),
NOT(BEGINS(Course_Information__c,"HTTP")),
NOT(BEGINS(Course_Information__c,"HTTPS"))
)

 

Only thing that works is using it a single time:

NOT(BEGINS(Course_Information__c,"http"))

I don't want someone to be able to change the date End_Date__c once a date has been entered

 

With this code it won't even allow anyone to enter a date at all, even if there was no prior date:

 

AND(ischanged( End_Date__c ))

 

How do I allow someone to enter a date, but then not change that date?

This seems to be the beginning of the the code, but I'm missing something:

 

IF(End_Date__c <> "")    AND(ischanged( End_Date__c ))

 

Thanks,

  • February 21, 2013
  • Like
  • 0

Could anyone help with this SOQL statement? It seems basic, but I can't get it right for some reason.

 

    String soql = 'select id, name from account';
    if(searchString != '' && searchString != null)
      soql = soql +  ' where name LIKE \'%' + searchString +'%\'';
    soql = soql + ' limit 25';

 all I'm trying to do is an an additional condition on the statement to say something like Industry = 'Education'

 

Any help would be appreciated!

User-added image
while developing an page with standard listcontrollers iam facing this isssue..
plz resolve 
any permission required???
hi.

I pass custom object List to visualforce component which assigns to apex varaible as same type.
But I get error like

ApexPagesHandledException: Cannot convert the value of '{!customObjectList}' to the expected type

<apex:component controller="MyController"  >
<apex:attribute name="customDetials" description="supplementary detials" type="CustomObject__c[ ]" assignTo="{!customeObjectList}"/>

public class MyContorller{

public List<CustomObject__c> customeObjectList{get;set;}

}


Both attribute name and apex variable are of same type but not being assigned.
Does anyone came across like this

Best Regards
suresh
Hi,

I have an object and everytime when I add new record, it should compare the new value with all of it's earlier values from the object.

For example, there is a date field in my custom object and everytime when I a new record it should validate me such a way that the recent record's date field should be greater than all of it's earlier records.  How can I do that.

Kindly explain me in detail.

Thanks
G. Barani

Hi all,

I used upsert sObject; statement , after executing this statement I need to know upsert is inserted or updated record

  • September 30, 2013
  • Like
  • 0

I have a strange thing happening here.

 

I have this working otherwise, however for one condition -

 

Whenever the Account_Division__c is null (i.e not entered in the system), this logic fails to even enter the Else loop thus giving me the Attempt to dereference a null object error.

 

Any ideas why ??  

 

 

List <Employee__C> empList = [SELECT ..........];

for(Employee__c emp : empList){
	        	
	system.debug('Check the vlaue of Branch Email: ' +emp.Branch__r.Branch_Email__c);
	system.debug('Check the Kelly Division: ' +emp.Account_Division__c);

if(emp.Account_Division__c.contains('DAO')) {
	            	
  emp.Email_Branch__c = CT_EmailFields__c.getInstance().Mailbox__c;
	            
} else if(!emp.Account_Division__c.contains('DAO') || emp.Account_Division__c==null){ 

  emp.Email_Branch__c = emp.Branch__r.Branch_Email__c;

}

}

 

Having issues getting a VR to work.  I'm trying to force that all entries start with http:// or https:// in both lower and upper case:

 

OR (
NOT(BEGINS(Course_Information__c,"http")),
NOT(BEGINS(Course_Information__c,"https")),
NOT(BEGINS(Course_Information__c,"HTTP")),
NOT(BEGINS(Course_Information__c,"HTTPS"))
)

 

Only thing that works is using it a single time:

NOT(BEGINS(Course_Information__c,"http"))

Hello,

Could anybody tell me in one field in object, Date is stored. So i need to get record showing Month for that date . Is there any method like oracle i.e. to_char(StoredDate,MM) 

 

Or any method like Month(StoredDate).

 

 

 

I am new to visual force and wanted to see if this concept is possible.

I created two custom object. If a status in one object changes for the record then the record should automatically get converted to the next object. Is that possible for custom objects? Can someone help?

Hi,

 

I am a newbie when it comes to apex and could do with some guidance. Basically, I am trying to create two different triggers, each firing under different scenarios.

 

On the first instance, I'd like a trigger which would fire when a checkbox is populated in an account and create a child record (populating the lookup and some fields on the child object) and on another instance, I'd like it to trigger when a certain value is selected from a picklist, creating a child record of the account and populating fields in both the account & child object.

 

Any ideas would be amazing!

 

Thanks.

  • March 17, 2013
  • Like
  • 0

I don't want someone to be able to change the date End_Date__c once a date has been entered

 

With this code it won't even allow anyone to enter a date at all, even if there was no prior date:

 

AND(ischanged( End_Date__c ))

 

How do I allow someone to enter a date, but then not change that date?

This seems to be the beginning of the the code, but I'm missing something:

 

IF(End_Date__c <> "")    AND(ischanged( End_Date__c ))

 

Thanks,

  • February 21, 2013
  • Like
  • 0

Could anyone help with this SOQL statement? It seems basic, but I can't get it right for some reason.

 

    String soql = 'select id, name from account';
    if(searchString != '' && searchString != null)
      soql = soql +  ' where name LIKE \'%' + searchString +'%\'';
    soql = soql + ' limit 25';

 all I'm trying to do is an an additional condition on the statement to say something like Industry = 'Education'

 

Any help would be appreciated!