• Nick White
  • NEWBIE
  • 20 Points
  • Member since 2015
  • Murata Electronics

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 4
    Replies
I currenty have some Image linked icons in Classic, which do not display well (or in some cases at all) in LEX.
I can find the following link, which clarifies that Image Links are avaiable in LEX, but can not find any resourse in order to find some updated images I could use as we try and transfer from Classic to LEX.
Image Link
Can anyone point me in the right direction please.

 
IMAGE(IF(OR(Ordered_Value__c = 0,Won_Value__c = 0), "/img/samples/stars_000.gif",
IF(Ordered_Value__c / Won_Value__c <0.2, "/img/samples/stars_100.gif",
IF(Ordered_Value__c / Won_Value__c <0.4, "/img/samples/stars_200.gif",
IF(Ordered_Value__c / Won_Value__c <0.6, "/img/samples/stars_300.gif",
IF(Ordered_Value__c / Won_Value__c <0.8, "/img/samples/stars_400.gif",
IF(Ordered_Value__c / Won_Value__c <1.2, "/img/samples/stars_500.gif",
IF(Ordered_Value__c / Won_Value__c <1.5, "img/msg_icons/warning16.png",
"img/msg_icons/error16.png")))))))
, "Error")

 
I have the following basic Trigger.  This works well when opening a new or amending an existing record and saving.

trigger QuoteUpdateGPN2 on Quotation_Detail__c (before update) {
    for (Quotation_Detail__c a : Trigger.new) {
        if (a.GPN_Link__c == null) {
            a.GPN_Link__c = [Select Id FROM Product2 Where Name =:a.Part_Number__c][0].Id;
        }
    }
}

Unfortunately it is not working as part of an "after insert" trigger, for when I upload data via Dataloader, as it indicated the field is Read Only.
I understand why, it is indicating as read only, as the field is active, but I am unable to solve.

How can I make this trigger work with "after insert", as well as "before update"

Many thanks
I have a Junction Object = Linkage__c
When field Confidential_Link__c [Checkbox:Boolean] is updated I wish for the trigger to update another Checkbox field in a linked Object, TripReport__c.
I am not an experienced Apex programmer, so trying to keep it simple and have the following.

trigger Update_TR_ConfFlag on Linkage__c (after insert, after update){
for(Linkage__c c : Trigger.new)
TripReport__c.Confidential_Flg__c = c.Confidential_Link__c;
}

...but I get: "Error: Compile Error: Expression cannot be assigned at line -1 column -1"

Can anyone help?
Help :-)

I wish to update field PN_Link__c in Object Quotation_Detail__c, (which is a Lookup Field to Object Product2).
Reason, when I upload Quotation Data into Salesforce, I want this trigger to fill the Lookup Field PN_Link__c with the Part Number that is uploaded, so that it creates a relationship between Quotation_Detail and Product2.

trigger QuoteUpdatePN on Quotation_Detail__c (before insert, after insert, before update, after update) {
    Quotation_Detail__c.PN_Link__c =
        [SELECT ID from Product2
         where Product2.UPSERTID__c = :Quotation_Detail__c.Part_Number__c];
}

Problem is I get the above Invalid Bind error, and can not work out why.  Any ideas all?
I have the following basic Trigger.  This works well when opening a new or amending an existing record and saving.

trigger QuoteUpdateGPN2 on Quotation_Detail__c (before update) {
    for (Quotation_Detail__c a : Trigger.new) {
        if (a.GPN_Link__c == null) {
            a.GPN_Link__c = [Select Id FROM Product2 Where Name =:a.Part_Number__c][0].Id;
        }
    }
}

Unfortunately it is not working as part of an "after insert" trigger, for when I upload data via Dataloader, as it indicated the field is Read Only.
I understand why, it is indicating as read only, as the field is active, but I am unable to solve.

How can I make this trigger work with "after insert", as well as "before update"

Many thanks
I have a Junction Object = Linkage__c
When field Confidential_Link__c [Checkbox:Boolean] is updated I wish for the trigger to update another Checkbox field in a linked Object, TripReport__c.
I am not an experienced Apex programmer, so trying to keep it simple and have the following.

trigger Update_TR_ConfFlag on Linkage__c (after insert, after update){
for(Linkage__c c : Trigger.new)
TripReport__c.Confidential_Flg__c = c.Confidential_Link__c;
}

...but I get: "Error: Compile Error: Expression cannot be assigned at line -1 column -1"

Can anyone help?
Help :-)

I wish to update field PN_Link__c in Object Quotation_Detail__c, (which is a Lookup Field to Object Product2).
Reason, when I upload Quotation Data into Salesforce, I want this trigger to fill the Lookup Field PN_Link__c with the Part Number that is uploaded, so that it creates a relationship between Quotation_Detail and Product2.

trigger QuoteUpdatePN on Quotation_Detail__c (before insert, after insert, before update, after update) {
    Quotation_Detail__c.PN_Link__c =
        [SELECT ID from Product2
         where Product2.UPSERTID__c = :Quotation_Detail__c.Part_Number__c];
}

Problem is I get the above Invalid Bind error, and can not work out why.  Any ideas all?