• Randi Thompson
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 2
    Questions
  • 3
    Replies
Good morning! I'm hoping someone here can help me finish the sample Opportunity trigger that comes with the Milestones PM+ implementation guide. I'm not sure why I can't use a Lookup field to the Opportunity, as the guide says that's acceptable for creating projects from Accounts, but I'm just following instructions. The provided code is below and I've bolded the part where I'm having trouble.

INTEGRATE SALESFORCE ACCOUNTS WITH OPPORTUNITIES

One of the more popular “integrations” between Milestones PM+ and Salesforce is linking Projects to Opportunities.

Presently, to set this up, you will need access to a developer to write an easy trigger that will call our global method for automatically creating projects. The trigger should look like this:

trigger MPM4_Your_Object_Name on Your_Object_Name__c (after insert, after update) { if(Trigger.isAfter){ Type pcu = System.Type.forName('MPM4_BASE', 'Milestone1_Project_Creation_Utility'); if(pcu != null){ MPM4_BASE.Milestone1_Project_Creation_Utility projCreationUtil = (MPM4_BASE.Milestone1_Project_Creation_Utility) pcu.newInstance(); if(Trigger.isAfter){ projCreationUtil.CreateChildProject(trigger.oldMap, trigger.newMap, new Map<string, object>{ 'projectCreationField', 'projectLookupField1', 'projectLookupField2', 'secondaryLookup', 'projectNamingConventionField' }); } } } }

Here's the detailed explanation of the bolded fields:
In the CreateChildProject method, there are multiple parameters.

The 'projectCreationField'  parameter is a MANDATORY text field representing the API name for the field containing the value that represents which project template document to search for. It also is the field that when set triggers project creation. Important: You will want to make sure that when creating project templates that you have your template named (document named) according to the value specified by this field. For example, if the value in the API field name referenced by the projectCreationField parameter is "Standard", you will need to make sure that you have a project template named, "Standard" or containing the word "Standard".

The 'projectLookupField1' parameter is a MANDATORY text field representing the API name for the primary lookup on the project object that will connect to your newly created object to the parent object on which the project was automatically created.

The 'projectLookupField2' parameter is an OPTIONAL text field representing the API name for a second lookup on the project object that will connect to your newly created object to an additional parent object.

The 'secondaryLookup' parameter is an OPTIONAL text field representing the API name for an additional lookup fields on the parent object on which the project automatically created. For example, Opportunities have accounts as their parent and if you are creating a project from an opportunity, you can set the Opportunity.'AccountID' field in this field to relate the project to both the opportunity it's account.

The 'Project_Naming_Convention__c' parameter is a MANDATORY text field representing the API name containing the field or formula field that sets the name of your newly created project.

I have heard that PB could be used in lieu of a trigger, which I would be happy to do, but I'm not clear on how to set that up, either. 
Thanks for the help!
Hoping someone can help me figure out where I'm going wrong with this custom URL button I'm trying to create. Use Case: From the Case page, I want my service users to be able to create Tasks that have some of the case info filled in in the task fields. Additionally, I want the record type to be the Customer Service record type. I've tried two different ways of putting this together and each comes with it's own problems. 

Way the 1st:
/OOT/e?What_id={!Case.Id}&RecordType=Customer+Service&00Na0000002f1pX={!cas6}&00Na0000002f1pc={!00Na000000BRANK}&tsk10={!cas11}&retURL=%2F{Case.Id}&ent=Task

So what I am trying to accomplish here is: Record Type = Customer Service, Task custom field Category = Case Reason (cas6), Task custom field Sub Category = custom Case field Type, task Type field = case Case Origin field, and then save and return to the case. 

Errors:  "missing }" error for this {!00Na000000BRANK};cas6 does not exist; and cas11 does not exist.

Way the 2nd:

/OOT/e?What_id={!Case.Id}&RecordType=Customer+Service&00Na0000002f1pX={!Case.Reason}&00Na0000002f1pc={!Case.Case_Type__c}&tsk10={!Case.Origin}&retURL=%2F{Case.Id}&ent=Task

Syntax all checks out but when I go to Preview it or click on the button from the Case page, I get "Insufficient Privileges". I'm the Admin, I have full access to everything. I did, just as a double check, create a Sharing Rule to make sure SF understood that I can CRUD the account I am testing on. No dice. Here's the URL details when I get the Insufficent Privileges error from clicking the button: https://na13.salesforce.com/OOT/e?What_id=500a000000quWXN&RecordType=Customer+Service&00Na0000002f1pX=Base+Stock&00Na0000002f1pc=Reorder+-+No+Changes&tsk10=800%23&retURL=%2F{Case.Id}&ent=Task

Does anyone have any ideas about where I'm going wrong here? Thanks so much!!
 
Good morning! I'm hoping someone here can help me finish the sample Opportunity trigger that comes with the Milestones PM+ implementation guide. I'm not sure why I can't use a Lookup field to the Opportunity, as the guide says that's acceptable for creating projects from Accounts, but I'm just following instructions. The provided code is below and I've bolded the part where I'm having trouble.

INTEGRATE SALESFORCE ACCOUNTS WITH OPPORTUNITIES

One of the more popular “integrations” between Milestones PM+ and Salesforce is linking Projects to Opportunities.

Presently, to set this up, you will need access to a developer to write an easy trigger that will call our global method for automatically creating projects. The trigger should look like this:

trigger MPM4_Your_Object_Name on Your_Object_Name__c (after insert, after update) { if(Trigger.isAfter){ Type pcu = System.Type.forName('MPM4_BASE', 'Milestone1_Project_Creation_Utility'); if(pcu != null){ MPM4_BASE.Milestone1_Project_Creation_Utility projCreationUtil = (MPM4_BASE.Milestone1_Project_Creation_Utility) pcu.newInstance(); if(Trigger.isAfter){ projCreationUtil.CreateChildProject(trigger.oldMap, trigger.newMap, new Map<string, object>{ 'projectCreationField', 'projectLookupField1', 'projectLookupField2', 'secondaryLookup', 'projectNamingConventionField' }); } } } }

Here's the detailed explanation of the bolded fields:
In the CreateChildProject method, there are multiple parameters.

The 'projectCreationField'  parameter is a MANDATORY text field representing the API name for the field containing the value that represents which project template document to search for. It also is the field that when set triggers project creation. Important: You will want to make sure that when creating project templates that you have your template named (document named) according to the value specified by this field. For example, if the value in the API field name referenced by the projectCreationField parameter is "Standard", you will need to make sure that you have a project template named, "Standard" or containing the word "Standard".

The 'projectLookupField1' parameter is a MANDATORY text field representing the API name for the primary lookup on the project object that will connect to your newly created object to the parent object on which the project was automatically created.

The 'projectLookupField2' parameter is an OPTIONAL text field representing the API name for a second lookup on the project object that will connect to your newly created object to an additional parent object.

The 'secondaryLookup' parameter is an OPTIONAL text field representing the API name for an additional lookup fields on the parent object on which the project automatically created. For example, Opportunities have accounts as their parent and if you are creating a project from an opportunity, you can set the Opportunity.'AccountID' field in this field to relate the project to both the opportunity it's account.

The 'Project_Naming_Convention__c' parameter is a MANDATORY text field representing the API name containing the field or formula field that sets the name of your newly created project.

I have heard that PB could be used in lieu of a trigger, which I would be happy to do, but I'm not clear on how to set that up, either. 
Thanks for the help!
Hoping someone can help me figure out where I'm going wrong with this custom URL button I'm trying to create. Use Case: From the Case page, I want my service users to be able to create Tasks that have some of the case info filled in in the task fields. Additionally, I want the record type to be the Customer Service record type. I've tried two different ways of putting this together and each comes with it's own problems. 

Way the 1st:
/OOT/e?What_id={!Case.Id}&RecordType=Customer+Service&00Na0000002f1pX={!cas6}&00Na0000002f1pc={!00Na000000BRANK}&tsk10={!cas11}&retURL=%2F{Case.Id}&ent=Task

So what I am trying to accomplish here is: Record Type = Customer Service, Task custom field Category = Case Reason (cas6), Task custom field Sub Category = custom Case field Type, task Type field = case Case Origin field, and then save and return to the case. 

Errors:  "missing }" error for this {!00Na000000BRANK};cas6 does not exist; and cas11 does not exist.

Way the 2nd:

/OOT/e?What_id={!Case.Id}&RecordType=Customer+Service&00Na0000002f1pX={!Case.Reason}&00Na0000002f1pc={!Case.Case_Type__c}&tsk10={!Case.Origin}&retURL=%2F{Case.Id}&ent=Task

Syntax all checks out but when I go to Preview it or click on the button from the Case page, I get "Insufficient Privileges". I'm the Admin, I have full access to everything. I did, just as a double check, create a Sharing Rule to make sure SF understood that I can CRUD the account I am testing on. No dice. Here's the URL details when I get the Insufficent Privileges error from clicking the button: https://na13.salesforce.com/OOT/e?What_id=500a000000quWXN&RecordType=Customer+Service&00Na0000002f1pX=Base+Stock&00Na0000002f1pc=Reorder+-+No+Changes&tsk10=800%23&retURL=%2F{Case.Id}&ent=Task

Does anyone have any ideas about where I'm going wrong here? Thanks so much!!
 
Hi! I'm working to integrate Milestones PM+ with a custom object. Essentially, I'm looking for my Apex Trigger to create a Milestones PM+ Project associated with my custom object once a specific status is reached. However, using their admin guide template (http://www.passagetechnology.com/mpm-admin-guide), I'm not able to get the Milestones PM+ Project created "after update." But, it works "after insert." Any thoughts, anyone?

trigger ObjectTrigger on Object__c (after insert, after update) {
    
    if(Trigger.isAfter){

        for (Object__c object : Trigger.new) {
                
                if(object.Status__c == 'Executed') {
                                                                
                Type pcu = System.Type.forName('MPM4_BASE', 'Milestone1_Project_Creation_Utility');
                    
                if(pcu != null) {
        
                    MPM4_BASE.Milestone1_Project_Creation_Utility projCreationUtil = (MPM4_BASE.Milestone1_Project_Creation_Utility) pcu.newInstance();
                        
                    if(Trigger.isAfter){               
                        projCreationUtil.CreateChildProject(trigger.oldMap, trigger.newMap, new Map<string, object>{
                            'projectCreationField' => 'Project_Template__c',
                            'projectLookupField1' => 'Object__c',
                            'projectNamingConventionField' => 'Project_Name__c'
                        });
                    }
                }
            }
        }
    }
}