• Vbourbeau
  • NEWBIE
  • 0 Points
  • Member since 2013

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

Hi

 

I want to implement a visual workflow to create contact. All work great but if the user enter a existing email adresse the flow give error. It's normal because we can't have duplicate contact email. So I use lookup to find if the email already exist if yes do error. It is fine if the user can lookup on all contact but most of our user don't have acces to all contact so the lookup work only for is contact.

 

So can I allow lookup on all contact even if the user don't own it? Or kind of validation on my email fields in the flow...

 

thank

 

Hi,

 

I'm new in Force IDE and I don't understand ... If I want to compile my code I need to save it right? But when I do that it took 10 min... It's to very long. Do I make it correctly?

 

thank

Hi,

 

I'm new in salesforce, I code something that working well but I can't make working the test method. When I call the "iWantMyJSValues" function I've got "Argument 1 cannot be null".

 

public withsharingclass CourseController {

 

privatefinalCourse__c course;   

private ApexPages.StandardController con ;   

   

public CourseController(ApexPages.StandardController controller) {

      con = controller;

      this.course = (course__c)controller.getRecord();   

   }

   

   public String valueOne { get; set; }

    integer i;

   

   

    public PageReference iWantMyJSValues() {

   

          valueOne = Apexpages.currentPage().getParameters().get('one');

           i = integer.valueof(valueOne);

   

    

if (i == 0) {    

this.course.v_end__c = this.course.v_end__c + i;

     } Else if (i == 1) {

this.course.v_start__c = this.course.v_start__c + i;

     } Else if (i == 2) {    

this.course.v_pause__c = this.course.v_pause__c + i;

     }

   

update course;

       

returnnull;

 }

   

public static testmethod void testiWantMyJSValues(){

 

    list<Course__c> courses = newlist<Course__c>{};

    Course__c testCourse = newCourse__c();

     testCourse.Language__c = 'English';

     testCourse.Training_Format__c ='On Demand';

     testCourse. Course__c = 'a0Ea000000J0G1e';

     courses.add(testCourse);

     insert courses;

 

ApexPages.StandardController to = new ApexPages.StandardController(testCourse) ;

 

CourseController controller = new CourseController(to) ;

Controller.iWantMyJSValues();

 

}

 

 

}

Hi

 

I want to implement a visual workflow to create contact. All work great but if the user enter a existing email adresse the flow give error. It's normal because we can't have duplicate contact email. So I use lookup to find if the email already exist if yes do error. It is fine if the user can lookup on all contact but most of our user don't have acces to all contact so the lookup work only for is contact.

 

So can I allow lookup on all contact even if the user don't own it? Or kind of validation on my email fields in the flow...

 

thank

 

Hi,

 

I'm new in Force IDE and I don't understand ... If I want to compile my code I need to save it right? But when I do that it took 10 min... It's to very long. Do I make it correctly?

 

thank

Hi,

 

I'm new in salesforce, I code something that working well but I can't make working the test method. When I call the "iWantMyJSValues" function I've got "Argument 1 cannot be null".

 

public withsharingclass CourseController {

 

privatefinalCourse__c course;   

private ApexPages.StandardController con ;   

   

public CourseController(ApexPages.StandardController controller) {

      con = controller;

      this.course = (course__c)controller.getRecord();   

   }

   

   public String valueOne { get; set; }

    integer i;

   

   

    public PageReference iWantMyJSValues() {

   

          valueOne = Apexpages.currentPage().getParameters().get('one');

           i = integer.valueof(valueOne);

   

    

if (i == 0) {    

this.course.v_end__c = this.course.v_end__c + i;

     } Else if (i == 1) {

this.course.v_start__c = this.course.v_start__c + i;

     } Else if (i == 2) {    

this.course.v_pause__c = this.course.v_pause__c + i;

     }

   

update course;

       

returnnull;

 }

   

public static testmethod void testiWantMyJSValues(){

 

    list<Course__c> courses = newlist<Course__c>{};

    Course__c testCourse = newCourse__c();

     testCourse.Language__c = 'English';

     testCourse.Training_Format__c ='On Demand';

     testCourse. Course__c = 'a0Ea000000J0G1e';

     courses.add(testCourse);

     insert courses;

 

ApexPages.StandardController to = new ApexPages.StandardController(testCourse) ;

 

CourseController controller = new CourseController(to) ;

Controller.iWantMyJSValues();

 

}

 

 

}