• Bahtiyar Ishkabulov
  • NEWBIE
  • 20 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 12
    Replies
Hi all,
For a custom object PriceRequest__c I have a simple approval process containing only one step. The records of this object are created and updated during data import from external ERP system (REST exchange using JSON files). When the record is saved, the approval process may be started automatically from apex code. The list of approvers also comes from ERP (in JSON file) and it may differ for each record.
What is the best way to assign this list of approvers to the approval process step? I have a few options in my mind, but I don't like them much:
  1. In apex dynamically create a new Queue for each record, insert it to the DB and add all the approvers from JSON to this queue. But I'm not sure if I then will be able to assign this queue to the approval process step in the apex code? And is it normal to create a new queue for each record?
  2. Create 5-10 fields (Approver1__c, Approver2__c...) and set up the assignment in the Approval process settings (not in the apex).
Can someone tell me, maybe there is a better way for this task?
Hi everyone,
If I get a json file with 20000 records to create in SF, how can I do it not breaking the limit of 10000 DML operations? I can't use batch apex in this case, because I don't have any records in SF yet.
Hi everyone,
We created custom object Calcelled Opportunity Product (CancelledOpportunityLineItem__c) where we want to store opportunity products, that were initially present in customer's inquiry but then removed from it for some reason (master-detail relationship with Opportunity object). Now we want to have a button "Cancel Product" on the standard Opportunity Product's detail page that will move the product to the Cancelled Opportunity Products (delete the record from the OpportunityLineItem object and create new record in the CancelledOpportunityLineItem__c object). Also we want a separate window to appear before that, where user will input cancelling reason. Can anyone explain me, wich Salesforce platform tools should we use for this task?
Hi everyone,
We have two custom fields on opportunity: LostReason__c (Picklist) and LostReasonDetails__c (Long Text Area). When an opportunity is put to Closed Lost stage I want a small window to appear with these two fields, to allow user fill them in. How can I do it?
Hi everyone,
How to filter a SOQL query by two or more fields (key fields)? For example let's say I have an object with three fields: Person (String), Year (String) and Income (Number). Person and Year are key fields. And there are four records in the object:

Person                    Year                       Income
'Jhon'                      '2016'                      1000
'Jhon'                      '2017'                      950
'Mike'                      '2016'                       1100
'Mike'                      '2017'                       900

Then I want to retrieve data about Jhon's income in 2016 and Mike's income in 2017
In some SQL implementations I can do it in such way:
Select Person, Year, Income From MyObject Where (Person, Year) In (('Jhon', '2016'), ('Mike', '2017'))
What about SOQL? I was told that it won't accept such a query. Is there any means? Or I have to use "And" filter separately for every field and then use a loop?
Hi all,
For a custom object PriceRequest__c I have a simple approval process containing only one step. The records of this object are created and updated during data import from external ERP system (REST exchange using JSON files). When the record is saved, the approval process may be started automatically from apex code. The list of approvers also comes from ERP (in JSON file) and it may differ for each record.
What is the best way to assign this list of approvers to the approval process step? I have a few options in my mind, but I don't like them much:
  1. In apex dynamically create a new Queue for each record, insert it to the DB and add all the approvers from JSON to this queue. But I'm not sure if I then will be able to assign this queue to the approval process step in the apex code? And is it normal to create a new queue for each record?
  2. Create 5-10 fields (Approver1__c, Approver2__c...) and set up the assignment in the Approval process settings (not in the apex).
Can someone tell me, maybe there is a better way for this task?
Hi everyone,
We created custom object Calcelled Opportunity Product (CancelledOpportunityLineItem__c) where we want to store opportunity products, that were initially present in customer's inquiry but then removed from it for some reason (master-detail relationship with Opportunity object). Now we want to have a button "Cancel Product" on the standard Opportunity Product's detail page that will move the product to the Cancelled Opportunity Products (delete the record from the OpportunityLineItem object and create new record in the CancelledOpportunityLineItem__c object). Also we want a separate window to appear before that, where user will input cancelling reason. Can anyone explain me, wich Salesforce platform tools should we use for this task?
Hi everyone,
We have two custom fields on opportunity: LostReason__c (Picklist) and LostReasonDetails__c (Long Text Area). When an opportunity is put to Closed Lost stage I want a small window to appear with these two fields, to allow user fill them in. How can I do it?
Hi everyone,
How to filter a SOQL query by two or more fields (key fields)? For example let's say I have an object with three fields: Person (String), Year (String) and Income (Number). Person and Year are key fields. And there are four records in the object:

Person                    Year                       Income
'Jhon'                      '2016'                      1000
'Jhon'                      '2017'                      950
'Mike'                      '2016'                       1100
'Mike'                      '2017'                       900

Then I want to retrieve data about Jhon's income in 2016 and Mike's income in 2017
In some SQL implementations I can do it in such way:
Select Person, Year, Income From MyObject Where (Person, Year) In (('Jhon', '2016'), ('Mike', '2017'))
What about SOQL? I was told that it won't accept such a query. Is there any means? Or I have to use "And" filter separately for every field and then use a loop?