function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion


I want to get subscriptiongroupId by passing the contactId by using function.

Any help on this appreciated.i will answer any questions u may have.



What is a subscriptiongroupid and how does this relate to a contactid?


If its as simple as the subscriptiongroup has a lookup to a contact, then something like the following should do it:


List<Subscription_Group__c> subs=[select id, Name from Subscription_Group__c where Contact__c=:contactId];