NSSource and UserDefinedFields GetDeleted();

lock
push_pin
done
Answered
0

Hello Team,

 

I am trying to set up a script that will prevent our users to close sales that have depracated Sources or in our case, "Sale Department" (Custom Field).
After reviewing the documentation, I noticed the Source does not have the GetDeleted() method, and I can't seem to find any information on UserDefinedFields, other than getting them from EventData or mapping them via the Sale Entity.

Do you know how I could go about getting the "Deleted" flag for these two?

Thank you!

#setLanguageLevel 3;

EventData ed = getEventData();

/*Source*/
Integer sourceId = ed.getInputValue("SaleEntity.Source.Id").toInteger(); 
Integer saleId = ed.getInputValue("SaleEntity.SaleId").toInteger();

NSSaleAgent saleAgent;
NSSaleEntity saleEntity = saleAgent.GetSaleEntity(saleId);
NSSource source = saleEntity.GetSource();

String name = source.GetValue();


/*Sale Dpt*/
//“SaleEntity.CustomFields.SuperOffice:3:DisplayText": "1234 SaleDepartment",
//"SaleEntity.CustomFields.SuperOffice:3:DisplayTooltip": "Tolltip",
//"SaleEntity.CustomFields.SuperOffice:3:org": "[I:45]"
String saleAzetsCompany = ed.getInputValue("SaleEntity.UserDefinedFields.SuperOffice:3");

15 Jul 2024 | 12:26 PM

All Replies (0)

Add reply