• Wolf Duttlinger 6
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 4
    Replies
Hi,

I did search but many answers did either simply use the language of the logged-on user or are relevant to VF where you might state the language in the apx:page tag.

I'm coding an APEX REST API. I.e. a class that is being called from external sites. Part of the data that comes in is a language code.

I need to feed back messages from the class. For these messages I did create custom labels in order to be able to use the translation mechanismn build into SF.

Now - in the program - I need to access the label based upon the language specified as a parameter.

I.E. instead of coding:
if ( lang == 'DE') {
                    returnString = 'Ihre Anfrage wurde weitergeleitet. Wir werden uns in Kürze bei Ihnen melden.';
                } else {
                    returnString = 'Your request has been forwarded. You will hear from us soon.';
                }
I want to have something like:
returnString = Label.hppMsg1( 'DE');
where hppMsg1 has been defined as a custom label.

Any ideas?



 
Hi all,

we are using cases in various recordtypes (A, B). Every A should normally have a B as a child. I'm trying to find those that haven't one.

select case.id, case.CaseNumber from case where case.id not in (select case.parentid from case) and case.recordtype.name = 'A'
--> The inner and outer selects should not be on the same object type

select case.id, case.CaseNumber from case where case.recordtype.name = 'Service Case' and (select count() from case.cases) = 0
--> Unknown error parsing query

select id, CaseNumber from case a where not exists (select id from case b where b.parentid = b.id ) and a.recordtype.name = 'A'
--> Unknown error parsing query

Any suggestions????

Thanks
Wolf
Hi all,

we are using cases in various recordtypes (A, B). Every A should normally have a B as a child. I'm trying to find those that haven't one.

select case.id, case.CaseNumber from case where case.id not in (select case.parentid from case) and case.recordtype.name = 'A'
--> The inner and outer selects should not be on the same object type

select case.id, case.CaseNumber from case where case.recordtype.name = 'Service Case' and (select count() from case.cases) = 0
--> Unknown error parsing query

select id, CaseNumber from case a where not exists (select id from case b where b.parentid = b.id ) and a.recordtype.name = 'A'
--> Unknown error parsing query

Any suggestions????

Thanks
Wolf
Every user record in our SFDC org has a User.Manager listed, except our CEO. SFDC won't allow a circular relationship, and every other user already reports to someone else, so SFDC won't let us list any other user as the CEO's manager (even, say, the CEO's assistant, or the VP of HR).

When using User.Manager to route approvals, this becomes a serious issue. We've implemented Expense Reports in SFDC, and use the Manager hierarchy for automatic routing. Finance is only triggered to pay approved expense reports. Therefore, we'd like the CEO's expense reports to route to our VP of Finance for approval.

We tried putting an inactive user in the CEO's User.Manager field, but it didn't work. When the CEO tries submitting an expense report for approval, SFDC complains that "This approval request requires the next approver to be determined by the Manager field. This value is empty. Please contact your administrator for more information." (Of course, the value isn't "empty," it's pointing to an inactive user.)

Any ideas for how to route approvals for the top of the manager hierarchy, i.e. our CEO?