• johny joker
  • NEWBIE
  • 0 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 3
    Likes Given
  • 0
    Questions
  • 3
    Replies
Hello friends, does anyone knows or have an idea how to print a page from Salesforce 1 / Android ?

Thanks
  • October 13, 2014
  • Like
  • 1
Hi,

I created one visualforce page with a html5 tag <input id="image" type="file"/>.

When I access that page from salesforce1 and click on "Choose File" button, then salesforce1 app gets crashed. But if I access the same page from Safari browser of my iPad then it works fine. Also in last version of Salesforce1(6.0) was working fine with ios7.

Thus, it looks like Salesforce1 might have a compatibility issue with ios8.0.2.

Thanks,
Vishal
I am a beginner with coding and looking for help

The code I have below works for getting 100% coverage and passes the trailhead evaluation however I also wanted to assert that the Error message is correct.

because I wanted to set up all test data outside of the starttest() and I wanted to check and valid insert as well as a invalid one I need to write the saveresults to a list. Everything works fine untill i tried to access the  error messages.
I have played with every variation but cannot figure out the syntax

system.debug(r1.getErrors());  gives me  DEBUG|(Database.Error[getFields=();getMessage=The Last Name "INVALIDNAME" is not allowed for DML;getStatusCode=FIELD_CUSTOM_VALIDATION_EXCEPTION;])

system.debug(r1.getErrors().getMessage);  doesn't compile " Initial term of field expression must be a concrete SObject: List<Database.Error>"
system.debug(r1.getErrors().getMessage()); doesn't  Method does not exist or incorrect signature: [List<Database.Error>].getmessage()

And so my tries Have gone on!

how do I get the getMessage field from the getErrors?

 
@istest
private class TestRestrictContactByName {
    @isTest Static void TestRestictedname(){
        List<contact> testcontacts = New List<contact>();
        contact c0 = new contact(LastName = 'Testcontact');
        testcontacts.add(c0);
        Contact c1 = new contact(LastName = 'INVALIDNAME');
        testcontacts.add(c1);
        Test.startTest(); 
        Database.SaveResult[] srList = Database.insert(testcontacts, false); 
        Test.stopTest();
        Database.SaveResult R0 = srlist[0];
        Database.SaveResult R1 = srlist[1];
        
        System.assert(r0.isSuccess());
        System.assert(!r1.isSuccess());
                      
                      }
                      }

 
How does one add the Salesforce Trailhead Badges (link) on their Linkedin Profile? When I edit my Linkedin profile where do I do this?
Thanks!
Hi,

I have a number field (Number, 0) but when i put valuee 10000 in it it will diplay it as 10,000 i want to display it without comma.
I have selected number field because i need to select Max number from it and add 1 in Max number for new entry.
Can any body help me how i can do it.

Thanks,
Faraz