• Bob Hatcher
  • NEWBIE
  • 35 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 7
    Replies
I have a data model where I have an Object, Software_License__c, which contains a Lookup to an Account. There are Attachments against the Software License. I can safely assume the Software License has one attachment, but a given Account may have multiple Software Licenses. The Software License contains a DateTime called Date__c.

I need to return the Attachment (with Body) of the most recent Software License given the ID of the Account lookup.

I've tried a few things.
 
SELECT  Id , Date__c, (SELECT   Id, Body ,Name FROM Attachments LIMIT 1)
FROM    Software_License__c
WHERE   Account__c = :CurrentUser.AccountId
ORDER BY Date__c DESC


This does not work because you can't return binary data (e.g., the attachment body) from a subquery.
Then I tried:
select  Id, Body, Name  from    Attachment
where   ParentId in (select Id   from Software_License__c where Account__c =:CurrentUser.AccountId ORDER BY Date__c DESC LIMIT 1 )


that doesn't work because you need to select Date__c to ORDER BY it.

I can't think of a way to make this work with just one query. Anyone have a thought? TIA.
I keep getting an error on Item #4 "The custom set of fields that are highlighted on account records must be assigned to the required profile."

The requirement is asking for having highlights based on profiles, but as we know compact layouts are applied to the whole system not by profile.

I am not sure how to fix this, any help is appreciated.
I have a data model where I have an Object, Software_License__c, which contains a Lookup to an Account. There are Attachments against the Software License. I can safely assume the Software License has one attachment, but a given Account may have multiple Software Licenses. The Software License contains a DateTime called Date__c.

I need to return the Attachment (with Body) of the most recent Software License given the ID of the Account lookup.

I've tried a few things.
 
SELECT  Id , Date__c, (SELECT   Id, Body ,Name FROM Attachments LIMIT 1)
FROM    Software_License__c
WHERE   Account__c = :CurrentUser.AccountId
ORDER BY Date__c DESC


This does not work because you can't return binary data (e.g., the attachment body) from a subquery.
Then I tried:
select  Id, Body, Name  from    Attachment
where   ParentId in (select Id   from Software_License__c where Account__c =:CurrentUser.AccountId ORDER BY Date__c DESC LIMIT 1 )


that doesn't work because you need to select Date__c to ORDER BY it.

I can't think of a way to make this work with just one query. Anyone have a thought? TIA.
List<Asset> lst=  [select Id, ProductCode, Product_Family1__c, Product_Family__c from Asset WHERE AccountId = '0015000000IBGof' AND ( (NOT IB_Status__c Like '%eval%') OR (NOT IB_Status__c Like '%Under Right of Return%') OR (NOT IB_Status__c Like '%Sold - Demo%') OR (NOT IB_Status__c Like '%WRITTEN OFF%') ) AND Product_Family__c != 'Whitewater'];

I am getting below error
No such column 'ProductCode' on entity 'Asset'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.

Also I need to use group by (Product_Family1__c, Product_Family__c) this query But getting error
Hi I am looking for a easy way to print or export a large Field Dependency matrix in excel. I am new to saleforce please guide me with complete details.
  • January 30, 2014
  • Like
  • 0

Hi All,

 

As shown below the  execution of the process order is right  r not?if not so Please do the changes and let me know.

 

Validation

Apex class

Triggers

Workflows

 

Thanks

So this is a bit strange....

 

I have a VF page written that creates badges(labels) for contacts with their name and picture.

 

The way we are gettin multiple pictures is by refrerencing a .zip file as a static resource.

 

The funny thing about this is that when I try to upload the zip file to the static resource it does not work (the pictures come up broken) but....  when my collegue uploads it the exact same way, the files work great.

 

We are both using Mac osx.  My operating system is 10.6.7 and his is a bit newer.

 

Any ideas about this one???