• Natarajan _Periyasamy__c
  • NEWBIE
  • 70 Points
  • Member since 2017
  • Head of Salesforce Practice / TA
  • Creation Technology Solutions


  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 13
    Replies
Isnt a M-D relationship the correct relationship between opportunity & Opportunity Product ? When a Opportuntiy is deleted, I want the OP records to be deleted. Hnece doesnt a MD rleationship makes sense?
I am creating a Opportunity & Opportunity Products via a Apex Code. I am able to create a Opportunity. For the created Opportunity, I want to add some Opportunity Product (OpportunityLineItem) recirds. My Code is

ID OppID;
OppID = opps[0].ID;  //Get the ID for the added Opportunity

//Now I want to add Products
OLI = new OpportunityLineItem();
 OLI.Opportunity.ID = oppID; // Getting runtime error = Attempt to de-reference a NULL Object
 OLI.product2.ID = cdtl.product__r.ID; // This works

Pl. help
Isnt a M-D relationship the correct relationship between opportunity & Opportunity Product ? When a Opportuntiy is deleted, I want the OP records to be deleted. Hnece doesnt a MD rleationship makes sense?
i have a scenario .I have a custom object party  having fields 'related contact' and 'related  companies'.
These fields are lookup to Contact Object and companies object.
each party record will have a related contact and related companies value.
I have a custom object named  invoices .
For all companies we will have 1 invoices record.
on invoices object  i want the list of all contacts in fields user 1 ,user 2 ,user 3
example
Record PARTY -1            james  jo                  acme ltd
            Party -2               marc                          acme ltd
          party 3                   lily                             pvd ltd
      party  4                      james jo                      amx ltd
     Party 5                      silly                            amx ltd

for record  invoice with name acme ltd.
user 1=james jo (auto poulated by apex trigger or formulae)
user 2 = marc (auto poulated by apex trigger or formulae)

for record  invoice with name amx ltd.
user 1=james jo (auto poulated by apex trigger or formulae)
user 2 = silly (auto poulated by apex trigger or formulae)
 
Our tasks are drawn from a common pool, I am trying to track the close rate for each user. To do that it seems I need to reassign the task to the user editing/closing it. Salesforce support indicates this is possible, but I have no idea where to get start. Anyone have any ideas how to go about this?

*We are in Salesforce classic if it matters. 
I am creating a Opportunity & Opportunity Products via a Apex Code. I am able to create a Opportunity. For the created Opportunity, I want to add some Opportunity Product (OpportunityLineItem) recirds. My Code is

ID OppID;
OppID = opps[0].ID;  //Get the ID for the added Opportunity

//Now I want to add Products
OLI = new OpportunityLineItem();
 OLI.Opportunity.ID = oppID; // Getting runtime error = Attempt to de-reference a NULL Object
 OLI.product2.ID = cdtl.product__r.ID; // This works

Pl. help
Good day experts.  I have a trigger that I created to replace our orgs validation rules.  I need a way to bypass them while doing doing a mass update via data loader.  I did end up getting that figured out by adding logic to the validation trigger, however, I'm now having an issue updating a field after the update.

if(c.skip_validation__c = true){
return;
}

so when the case update is loaded, I add the value of "skip_validation__c" to true, which will bypass it.  At the end of the validation trigger (or a separate one), I would like to update any case that has "case_validation__c" as "true" and update it false, so it doesn't bypass the validation trigger going forward.  How would I accomplish this?  Tried via process builder, but doesn't work since it would be saved not meeting the criteria.  
We have two lookup field on user object manager and oManager... so the scenario is for the oManager != null, if  oManager is not changed and not equal to manager then it should update the manager field as whatever value we are enterling in the lookup field oManager
and 
if anytime updating the manager name then it should auto reflect to oManager also.......

please help me to write the trigger for this scenario...
I was always confused to write the trigger... but I think it should be before insert and before update....
 
  • December 07, 2018
  • Like
  • 0
Hello!

I am trying to make a process that will check the record for certain conditions, and add points to a new field based on which conditions were met.

So for example,

1st Condition. If Gender is Male --> Update ABC field with 3 points. ([Object__c].ABC__c + 3)
2nd Condition . If City is London --> Update ABC field with 1 points. ([Object__c].ABC__c + 1)

So at the end of these two conditions, the value of field ABC should be 4. However, whenever I run it, it always ends up being just 1. I have checked this several times with more and varied conditions, and it the field ABC always just take the value from the last condition. 

The default value of field ABC is set as 0 so that can't be the problem. Is this a limitation of PB? That the field can only be updated once during a process? Or that the formula always uses the orginal value of the field ABC which existed before the process started?

I even tried building an invocable process for each condition, but the same problem still persists..

Is there any workaround for this? Would really appriciate some help!

Thank you! 



 
I have to send outobund http request by using PATCH method, but salesforce httprequest.setMethod(), not support PATCH method, So please help me how can I achive this?