• ArnoldFB
  • NEWBIE
  • 0 Points
  • Member since 2013

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

OK so I've got this approval process. I interrupt approval at one of the intermediate approval steps via trigger to require three custom fields, one of which is a contact lookup. I can't use validation because the record likely won't be edited, just approved so the validation will never fire.  The problem is the error code is a bad user experience.  It's a crappy font, they have to back out and cancel out of the approval to fill in the fields.  it's sub-optimal.  I'd Love to call a visualforce page and have them fill in the fields if any of them are blank but I've read I can't call a VF page from a trigger.  Soooooo.  what to do?  Visual workflow?   Advice welcome. 
I'll post my current trigger which throws the error.  It's clunky as hell, I know.
  Thanks, 

 

trigger ContractRequestTrigger on Contract_Request__c (Before insert, before update, before delete, after insert, after update, after delete) {  
    noTrigger__c settings = noTrigger__c.getInstance(userinfo.getUserId()); 
    Boolean goTrigger = settings.Enable_Triggers__c;    
    if(checkRecursive.runOnce() && goTrigger){
        //trigger to test for these values is needed because a normal validation rule fires after the record is
        //saved so using trigger logic lets us overcome SF order of operations and intervene in the approval
        // process steps.
        if(trigger.isupdate){
            for(Contract_Request__c request : Trigger.new){
            
                //This looks at the request and if both the client signing complete Checbox is true, and the record says
                //we're using docusign for signature, it checks the docusign box.  This functions within the approval process.  
                //The Approval step field updates can't check on the values of the fields, so we have a trigger working in 
                //conjunction with the approaval. 
                system.debug('before the if loop signing complete = '+request.Client_Signing_Complete__c);
                if (request.client_signing_complete__C == True && Request.Using_Docusign_for_Signature__c =='Yes') {
                    Request.DocuSign_Fully_Executed__c = True;         
                }
                // This diasllows asking for Docusign/Formal Signing to begin unless the three fields mentioned are complete.
                if(request.Process_Status__c == 'Draft Approved/Signature Pending' 
                && (request.Using_Docusign_for_Signature__c == null ||
                    request.Who_Signs_First__c              == null ||
                    request.Ultimate_Signee__c              == null )) {
                    request.addError('You must fill in Who Signs First, Ultimate Signee, and Using Docusign Info prior to beginning formal Signing Procedure with the client. Use your browser back button, cancel out of the approval, then fill in all the info and resubmit. Sorry for the trouble');      
                }    
            } 
        } //update trigger section ends here
    }      
}
 


 

I'm an admin, not a developer in my org.  Before seeking out a develper, I'm interested to know if it's possible to write a trigger which will run on a daily basis, iterate through our list of accounts and create account team member records based on a list of territory rules defining who should be assigned to these accounts based on Billing state.  I'm hearing from somone on my team that you can't create account team members with Apex.  I understand the Account team member object is a fickle beast in Saleforce as it's not really a standard object, but would like to know if what I'm proposing truly is impossible.  I really don't want to give up on this as in our org Account Team membership is a big deal & I spend all kinds of time on it that I could buy back with a well written trigger.   I've found a thread here referencing people doing something like this in Apex.   All input welcome. 

Thanks a million!

The Article:  http://wiki.developerforce.com/page/Authenticating_Users_on_Force.com_Sites

 

Teaches how to authenticate users to your Force.com site using customer portals.

They've been discontinued. 

My org doesn't have a Portal and can't ever get one at this point.

So now what?
My site says "Login not allowed,"  Period.

 

Chatter communities replaced Portals I understand, so how do we use communities to authenticate to Force.com sites?

 

The article needs to be taken down and a new one published.

 

Any input welcome.

Our Account Page layout is getting out of hand.  Too many sections.  We've implemented a Child object containing 75 fields, but the all the object's data has a 1:1 relationship to account.  The child exists solely to put the fields on another layout.  It's causing a lot of work as we want the data to flow to contacts.  Rather than write Triggers & Process Builders to push the data around, I'd like to move all the fields up to the Account object and create a tabbed view of Accounts via Visualforce.  The problem is all examples I'm finding use a seperate tab for the related lists.   In addition to doing that, I want to add a tab "Client Account Detail" and put the 75 pertinent fields only on that VF tab and not show them on the Master Account Layout.  

Soooo.....possibile?  I've not seen an example of this in practice and I've been digging a bit.  I'm new to VF development. Any examples you could point to would be most helpful. 

Thanks!!

Arnold

 

Hello

I would like to add to my account page some dashboard charts. I defined a visualforce page and I added the image src of a dashboard chart to my visualforce page. I would like to add another 2 additional charts, but I don’t know how to add them in parallel... Now they are all vertical among each other.

<apex:page standardController="Account">
  <apex:iframe src="https://cs7.salesforce.com/servlet/servlet.ChartServer?rsid=0FLM00000009w5D&ruid=00520000001Aiue&did=01Z20000000LSSY&s=8&fs=12&tfg=12&tfs=-16777216&explode=0&c=column&cs=2&title..." height="450" frameborder="false"/>
  <apex:iframe src="https://cs7.salesforce.com/servlet/servlet.ChartServer?rsid=0FLM00000009w7C&ruid=00520000001Aiue&did=01Z20000000LSSY&s=8&fs=12&tfg=12&tfs=-16777216&explode=0&c=column&cs=0&title..." height="450" frameborder="false"/>

</apex:page>

Second question, if I wish to make the chart account specific, perhaps I need to clone my reports and add a filter for parameter pv0 and add them to another new dashboard. So I could use their img src and I would have the account specific chart. Is that correct? Or I need to use something like that and linkt  direct to my report with filter?

<apex:page standardController="Account">
        <c:ReportChart reportId="00Oi0000000SeCQ" pv0="{!Account.Name}" />
</apex:page>

 However I dont understand the second line "

<c:ReportChart...
 


Any ideas?

  • July 10, 2013
  • Like
  • 0

I've been round-and-round with this one.  All I'm trying to do is create an AccountTeamMember object and then use sforceService.create() to add it.   I can do it if I don't set AccountAccessLevel = "Edit".  If I don't, AccountAccessLevel is set by default to "Read". The problem is, I want AccountAccessLevel to be "Edit".  If I set AccountAccessLevel = "Edit", then when I execute the create() method the following exception is thrown:

 

Unable to create/update fields: AccountAccessLevel. Please check the security settings of this field and verify that it is read/write for your profile.

 

I've tried everything to remedy this situation, including setting the API user to the top role of the company (CEO), making the API user the owner of the account, checking every capability in the API user's profile, and creating account sharing rules.  Nothing makes a difference.  In fact, I can log in as the API user and create AccountTeamMembers with "Edit" access at Salesforce.com-- just not with the API. 

 

Has anyone been able to do this?  Please help.

  • September 29, 2011
  • Like
  • 0

Hello

 

I have a field where a Full Name is entered - I need to split this into a First Name field and a Last Name field

 

I have created the fields - I need help on the formula

 

In many cases there are 4 entries

John abott-gacey

Mary Smith-Felch

Sam M. Wall

 

Thanks