• Sourabh Khosla
  • NEWBIE
  • 0 Points
  • Member since 2014

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

I have following query that I am trying to run: 

select X__Region__r.Name,  Operating_Unit__c from X__Worker__c where (X__Worker_Status_Current_WA__c = 'Active')

Where X__Region__c is a lookup to the Region table and Name is the value that I trying to retrieve. But I am getting this value returned: 

OrderedDict([(u'attributes', OrderedDict([(u'type', u'X__Region__c), (u'url', u'/services/data/v29.0/sobjects/X__Region__c/aKR0O0000008OIKWA2')])), (u'Name', u'AMER')])

The value that I am hoping to get is in the string above - AMER but the way it is being displayed is not correct as you can see. How do I modify my query?

I have the requirement to add the team member(based on the team role) to the split type = Overlay. I have been successfully able to achieve this via process builder - no issues at all.
But my problem comes when the user tries to "Add Default Team" - this does not fire my process builder. How do I circumvent this situation? What are my options?
Folks,
I have wrestled around this one for about one week.

I have a custom Parent Object where as soon as a button press happens, Status field on this custom object CH(C header) changes to processed. I want my rule(PB/Flow etc.)to fire when the CH.status==Processed, go to CL(C lines, basically similar to Opportunity Product lines), and check if any one of them have CL.Product2.Picklist ='picklist value'.... if yes, then go back to the CH(header)... and update the CH.IntegrationStatus='Ready'.
Is it achievable in a single PB, if yes how?
A. If I start from CH(modified or created)... I cannot choose any CL fields to check for the additional criteria... only CH fields are available as a criterion and CL are available for actions.

B. If I start from CL(modified or created)... it is not correct since CEL is never actually modified but CH is. Hence this logic itself is flawed to begin with.

C. I created a custom field at CL called CH's status ... created a PB to populate CL's status field every-time the CH status is changed to processed.. marking CL's record as modified and then using Step B. to check for CL.Product2.Picklist ='picklist value' {my criteria at CL) and then updating CH : CH.IntegrationStatus='Ready'.
So basically using 2 PBs, one to fire off a false 'modification' at line level when the status changes at header and other to check line level records and then update the CH.IntegrationStatus to ready.

This should have logically worked in theory but both of these PB ended up interfering with each other and now I am loss to understand how to even approach this problem.

Hey guys, 

I am trying to update a field on a master object based on couple of values(criteria needs to be if X=5(on the header - thats when it should fire), then check if Y(at line level)  is equal to 6 and then come back to header and update Z = 7) .

If yes then update checks that need to be performed) in the line level. I don't want this to fire on creation/edition of the record but rather when the particular criteria met(In my case as soon as X=5). So, basically PB and WF are out of picture I guess, since they fire only when the records are edited or created. 

Am I overcomplexing this? 

Hi Folks, 

I am trying to override the New Button from the Recent Views section of the Custom object. I guess you know why, because I cannot take it out and I don't want users to use this button to create new records for the Custom Object directly. So, they still need the access so that they can get this custom object record created but it needs to come thru an Account object and not directly thru the Custom object itself. 


Anyways, long story short... so I created this VF page and associated it to the button but it keeps on timing out.... not sure why... I am just displaying a single H1 tag thats all... no fetching, no querying... can anyone of you please assist? 
 
<apex:page docType="html-5.0" showHeader="false" standardStylesheets="false" standardController="Custom__c" >
    
    <h1>
         Sample error message
    </h1>
</apex:page>



It is really really really simple but I do not understand why would I be getting time out error on such a simple tag. 

Thanks in advance. 
I need a little help . I am almost there ... but need a little hand-holding. Agenda is to ALWAYS display the value converted in EUR - does not matter what the record currency is.
I am using this code below:
trigger convertToEuro on CustomObject(before update) { 
    List<CurrencyType> currencyTypeList = [select id,IsoCode,ConversionRate from CurrencyType where isActive = true] ;

    Map<String , Decimal> isoWithRateMap = new Map<String, Decimal>();

    for(CurrencyType c : currencyTypeList) {

        isoWithRateMap.put(c.IsoCode , c.ConversionRate) ;

    }



    for(CustomObject ce: trigger.new){

        if(ce.CurrencyIsoCode != 'EUR' && isoWithRateMap.containsKey(ce.CurrencyIsoCode)){

            ce.Amount_Converted__c = ce.ffps_iv__Amount__c/ isoWithRateMap.get(ce.CurrencyIsoCode);

        }

    }
}

It is doing everything fine except the fact that the Amount_Converted__c field's values are displayed as USD (& EUR) but EUR seems like display only value - the USD is what the Amount_Converted__c field is holding. I want to use Amount_Converted__c converted in EUR in my workflow but instead I am getting the USD value - how could I just get the EUR value? I don't really need the Record Currency type - I need my EUR currency to be used in my workflows/approvals.

User-added image
What could I be doing wrong?
In Opportunity we have amount field with multi-currencies such as USD, EUR, JPY, etc have created a custom field called usd_amount__c I need to store this amount in USD please suggest me how to convert this multicurrecny value in this custom field.

Thanks
Sudhir
Hi i need to check the currency for an object and have to set the currency of a field  to usd based on condition like this

if(opp.CurrencyIsoCode !='USD')
{
here i need to convert other currency to usd for a field called as salesprice__c

}
 
Hi,
We have an object called "Project", and a project has its own currency, for instance ARS 
There are 2 Number Fields that we use to get the conversion Rate between "Project Currency", EUR and $
Exchange USD - Number Field (10,8)
Exchange EUR - Number Field (10-8)
We have a Trigger, to get the conversion Rate. 
User-added image
And we have Set Currency Exchange to 6 Decimal Places
But on "Exchange USD" and "Exchange EUR", Number are rounded to 2 Decimals.
Does anyone know how to avoid the rounded decimal to 2?
We need to see 8 decimals, not rounded.
Thanks,
V
  • June 20, 2015
  • Like
  • 0

I am trying to clone attachments from opportunities to a custom object.

Once I create the custom object from the opportunity page I would like to have all the attachments from the opportunity cloned in the new related record.

 

Any idea or sample code for this?

 Thank you!!!