I've gotten stuck on the GoTo button.
Using the example from the sample integrating application I've constructed the code for Explorer_GoTo_Button:
I used this to determine to see how the selection was going.
This is what I found out. When under "Sales Transactions" I get something similar to:
ORDST2227 2STDORD BERRYMED0001
When under "Sales Line Items" I get something similar to:
2ORDST2226
00000000000000000000000000000000000000000000049152
Obviously these are strings as CustomerID (to be renamed appropriately later) is of type string.
I need the SOP Type and SOP Number in both instances. While I can see them and could probably parse the string for them - that is not the optimal solution as I cannot guarantee that the SOP Number will follow the same scheme.
What is the best way to retrieve both the SOP Type and SOP Number during the Explorer_GoTo_Button script?
Thanks in advance!
Using the example from the sample integrating application I've constructed the code for Explorer_GoTo_Button:
Code:
inout anonymous field IN_ListView;
in integer IN_Object_Dict_ID;
in integer IN_Object_Type;
in integer IN_GoTo_Dict_ID;
in integer IN_GoTo_Item;
local long selected_item;
local string LeadID;
local string CustomerID;
local integer l_current_status;
{Is this the Go To item added to the Customer object?}
if IN_Object_Dict_ID = DYNAMICS then
if IN_Object_Type = SMARTLIST_OBJECTTYPE_SALESTRANSACTIONS or IN_Object_Type = SMARTLIST_OBJECTTYPE_SALESLINEITEMS then
if IN_GoTo_Item = resourceid(form SOP_Inquiry) then
{Try to find the first customer selected in the list}
selected_item = ListView_SelectionGet(IN_ListView, 1);
if selected_item <> 0 then
CustomerID = ListView_ItemGetLabel(IN_ListView, selected_item);
warning CustomerID;
end if;
end if;
end if;
end if;
This is what I found out. When under "Sales Transactions" I get something similar to:
ORDST2227 2STDORD BERRYMED0001
When under "Sales Line Items" I get something similar to:
2ORDST2226
00000000000000000000000000000000000000000000049152
Obviously these are strings as CustomerID (to be renamed appropriately later) is of type string.
I need the SOP Type and SOP Number in both instances. While I can see them and could probably parse the string for them - that is not the optimal solution as I cannot guarantee that the SOP Number will follow the same scheme.
What is the best way to retrieve both the SOP Type and SOP Number during the Explorer_GoTo_Button script?
Thanks in advance!