• Heather Thompson
  • NEWBIE
  • 170 Points
  • Member since 2014

  • Chatter
    Feed
  • 4
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 3
    Questions
  • 31
    Replies
can anybody say how to restrict users to enter only '10' digit Mobile number in <apex:inputtext> field in vf page & to display error message if they enter an incorrect mobile number???
1. Why @future methods has to be static ?
2. Difference between Database.query() and simply querying [query].
3. In batch apex if one record fails for some reason will the entire batch fail ?
4. How to fetch failed update records of a Batch Apex ? 
  • October 08, 2017
  • Like
  • 0
Hello,

Is is possible to link same contact to two diffrent account ?

Thanks for feedback !

 
This is the first time I'm using visual flows and trying to combine it with login flows. The requirement is to have a service agreement accepted every quarter by users once they login. This only needs to be completed once a quarter so a record lookup is required to check if this has happened. I have started to create the flow using a screen where a user enters their username (again but only for testing the rest of the flow), I want to avoid this and perhaps see if it is possible to pull direct from the standard login page? This then checks the existing records (at the moment just on username) but here I want it to also check the date to make sure that there is a record within the quarter using the standard created date. If there is a record then no further action is required but if there isn’t, then a screen where the agreement is displayed appears and a user must agree to progress. Once they have the finish button should take them to the standard home.

My issue areas are:
  • Pulling the username from the standard login page if possible or another way without the user having to enter the information again. (in the background hopefully).
  • Checking criteria to see if a record exists for the current QTR.
  • If a record does exists then DO NOT enter the follow. (where my current screen just says no action required, it should bypass this and re-direct to home page with the user having to see this screen then click finish).

User-added image
I have a Visualforce page to create multiple EventRelations. The field EventRelation.RelationID does not show up for community users despite the user having permissions to view and edit events. What permissions should be needed for users to view this field?

As well, I can see the field as an administrator, but when I click the magnifying glass, it takes me to the contracts look-up page. I took some inspiration from Jeff Douglas here (http://blog.jeffdouglas.com/2011/08/12/roll-your-own-salesforce-lookup-popup-window/) and overwrote that button, but I would still like to know if anyone knows why the issue was occuring.
I've written a trigger on on object, that will autopopulate a firld based on the value of another flield, which is a lookup to a managed package page. I know that the trigger works as I have tested it out in the sandbox, but I cannot figure out a way to write test code because when I try to use DML statements to create the related record for the lookup field, the package's "custom validations" prevents this. I thought about trying to hard code the details into the test class, but then it would not work in production.

Any ideas?
The error message was for the following trigger:

trigger CreatePlaced on Submission__c (before update) {

for (Submission__C sub : Trigger.new) {

If (sub.stage__c == 'placed') {

Placement__c placed = new Placement__c ();
placed.name = sub.name;
sub.candidate__C = placed.employee__c;
sub.job__c = placed.job__c;
Insert placed;
}
}
}
Is it possible to render checkboxes in vf being rendered as word doc.
I want real-time select/unselect checkboxes. i.e the user can check/uncheck the checkbox in rendered word/pdf doc. 
I have tried apex and html input checkbox tags. The checkbox does not appear in rendered word .
 
Unable to locate this record. Is there a way to recover this record or is there a developer that can assit in retreving this?
Hello There,

I hope you all are well.

I have one field in the Opportunity named "Competitors" and right now there is validation rule assigned to it. So user (Of any profile) cannot save the opportunity if that field is blank.

And I have many types of profiles in my Org and one of is Sales profile (There is about 20 Sales profile like Sales User, Sales Admin etc). I would like to skip the validation for that field if the profile is of type Sales.

So in Short: All Sales profile should able to save the opportunity even "Competitor" field is blank

Any help will be really appreciated
1. Example where Flow will help but NOT Workflow or Process Builder.
2. How to decide whether to make a method static or not ? (Other than calling method directly from Class Name).  Example would be nice.
3. Why workflow works when there's Master-Detail but NOT when there's LookUp ?
  • October 09, 2017
  • Like
  • 0
Hello Developers,
Below is the requirement
I have a custom object with status and button where if the Status is "In Progress" then the button might say "Submit Order" which when pressed, changes the Order Status to "Order Submitted" and then removes that button and replaces it with one such as "Complete Order." Can anyone please mention the template or demo code so that I can proceed.
My org has External Sharing Model enabled. It has Custom object with Default External Access set to Private.

User-added image

Now I need that custom object to be shared with (read access) all users in specific profile.

Since the user is Community Plus, I'm unable to set View All permission on object level. Sharing rule can't be use with a profile.

User-added image

How do i achive this requirement ?
Hello guys, 
Below are parts of my apex class and test class.
This method is part of apex class that  is not covered.

Apex method class :

public List<Opportunity> getAccountOppList()
    {
        accountOppList = [SELECT id, Name, Donor_Name__c, Donor_Name_Id__c, CloseDate, Campaign_Fund__c, Amount, Type, Parent_Campaign__c, Gift_Method__c
            FROM Opportunity WHERE (ForecastCategoryName = 'Closed') AND (Account.id = :account.id OR Soft_Credit_Account__r.id = :account.id 
            OR Matched_Donor_Account__r.id = :account.id) ORDER BY Closedate DESC];
        
        return accountOppList;
        
    }

Part of Test class :
 List<Opportunity> accountOppList = New List<Opportunity>();
       accountOppList = [SELECT id, Name, Donor_Name__c, Donor_Name_Id__c, CloseDate, Campaign_Fund__c, Amount, Type, Parent_Campaign__c, Gift_Method__c
            FROM Opportunity WHERE (ForecastCategoryName = 'Closed') AND (Account.id = :accid OR Soft_Credit_Account__r.id = :accid 
            OR Matched_Donor_Account__r.id = :accid) ORDER BY Closedate DESC];
       System.AssertNotEquals(accountOppList,null);

Please let me know what do I need to add in the test class to increase the code coverage. 

Many thanks, 
Gina
can anybody say how to restrict users to enter only '10' digit Mobile number in <apex:inputtext> field in vf page & to display error message if they enter an incorrect mobile number???
1. Why @future methods has to be static ?
2. Difference between Database.query() and simply querying [query].
3. In batch apex if one record fails for some reason will the entire batch fail ?
4. How to fetch failed update records of a Batch Apex ? 
  • October 08, 2017
  • Like
  • 0
Is User De-provisioning also supported in Just In Time (JIT) User Provisioning Mechanism????


If I want to make a particular user inactive using JIT . Can this be done?
Hi All,
I have developed one App, I want to list this app as Salesfroce Ap Labs. How can I ? Any help is highly appriciated.

 
Hello, i am facing with an issue in vf page , while saving data from vf page form and accessing address compound fields .
Mailing state and Mailing country is not populating .
Note: we are not enabled state and country  picklist options.

Thanks in advance
Ishu.
Hello,

Is is possible to link same contact to two diffrent account ?

Thanks for feedback !

 
I have a series of Flows that run a Travel agency and thier processes of booking trips. There is a combination of flows and code but most of the logic is handled within the flows.
All record updates seem to be working as the data is coming in correctly across the whole of the trip however, we are getting a number of flow error emails every day.

Does anyone know if there is a way to turn off the error emails or some good tips on troubleshooting the process so we can find where the issue is and fix it.

Using the new Customer Community License, is it possible to add that user to a Chatter Group? They're not showing up in the user list. 

 

Alternatively, is there any way to have a non-public chatter conversation in the Community with the Customer Community license?

Hi,

 

After installing a managed package from AppExchange, we can assign the package licenses using manage licenses link. Is there any way either using APEX or any API (enterprise/partner/metadata) to retrieve the information about managed package license assignment for an org.

 

 

 

Best Regards,

Lakhan Prajapati

I have a visualforce page, that implemnts lightningStyleSheets="true" and has apex:tabPanel with multiple tabs. When user is in Lightnig Experience and any button is pressed on the same page, which causes a component rerendering, tabs styling changes to classic.

VF PAGE:
<apex:page controller="PracticeCompGrid_Cont" showHeader="true" lightningStylesheets="true">
            
    <!-- Create Tab panel -->
    <apex:tabPanel switchType="client" selectedTab="name2" id="AccountTabPanel"
        tabClass="activeTab" inactiveTabClass="inactiveTab">
        <apex:tab label="One" name="name1" id="tabOne">content for tab one</apex:tab>
        <apex:tab label="Two" name="name2" id="tabTwo">
                            
            <apex:pageBlock id="pbId">

                <apex:pageBlockButtons >
                    <apex:form >
                        <apex:commandButton action="{!debugFun}" rerender="pbId" value="Test" />
                    </apex:form>
                </apex:pageBlockButtons>
                <apex:pageBlockTable value="{!accList}" var="a">
                    <apex:column value="{!a.Name}" />
                </apex:pageBlockTable>
            </apex:pageBlock>
        </apex:tab>
    </apex:tabPanel>
</apex:page>

CONTROLLER:
public class PracticeCompGrid_Cont {

    public List <Account> accList {get;set;}
    
    public PracticeCompGrid_Cont (){
        accList = [SELECT Name FROM Account LIMIT 10];
    }
    
    public void debugFun(){
        System.debug('Acc: '+accList);
    }
}

BEFORE BUTTON IS PRESSED:
User-added image
AFTER BUTTON IS PRESSED AND RERENDER HAPPENED:
User-added image



Has anyone seen this before? If yes, any solutions?